445151 Commits

Author SHA1 Message Date
markchien
b174e14fa0 Add TetheringServiceTest unitest
Bug: 145490751
Test: atest TetheringTests
Change-Id: I68cd403302848c041444e6d47652435d67f59273
2020-04-06 12:02:17 +08:00
Chalard Jean
90ef10894c Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I5f8f6d962ee3317e101d19518c767b3c327c0c47
2020-04-06 12:46:19 +09:00
Tianjie Xu
74a5df06af Merge "Change the parameter type of offset in read" 2020-04-04 20:00:20 +00:00
Songchun Fan
3a4e4452b2 Merge "Update the SettingsProvider OWNERS file" 2020-04-04 19:39:05 +00:00
Yuta Yamada
cb0ec54adc Show QS data saver info dialog until enabled
Currently the quick settings 'data saver' info dialog is
only shown once when the quick settings button is tapped,
regardless of whether the end user selects OK or cancel.

This commit changes the behaviour slightly where the feature
info will be displayed until the end user has actually enabled
the feature for the first time.

Bug: 153108714
Test: Manual
Change-Id: I0fb44fc388bc7dcf8ae35eb60c52c09ce0317828
2020-04-04 15:44:57 +02:00
Treehugger Robot
423f102ab7 Merge "OWNERS: add philburk@" 2020-04-04 11:25:46 +00:00
Lorenzo Colitti
1d334a3a5e Refactor the Nat464Xlat function for simplicity.
This makes the code easier to understand by making state
transitions more explicit. It also makes it easier to address a
TODO to turn the class into a StateMachine.

This should be an exact no-op refactoring. The current cases
covered by the code (all mutually exclusive) are:

1. requiresClat && !isPrefixDiscoveryStarted
   Action: startPrefixDiscovery()
   Equivalent to IDLE && requiresClat, because
   isPrefixDiscoveryStarted returns true for every state except
   IDLE.

2. requiresClat && isPrefixDiscoveryStarted && shouldStartClat
   Action: start()
   Equivalent to DISCOVERING && shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but start() does nothing if mState is
   STARTING or RUNNING.

3. requiresClat && isPrefixDiscoveryStarted && !shouldStartClat
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but stop() does nothing if mState is
   not STARTING or RUNNING.

4. !requiresClat && isStarted
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !requiresClat,
   because isStarted() is only true in STARTING and RUNNING.

5. !requiresClat && !isStarted && isPrefixDiscoveryStarted
   Action: leaveStartedState()
   Equivalent to DISCOVERING && !requiresClat, because
   the only state with isPrefixDiscoveryStarted and !isStarted
   is DISCOVERING.

Also, simplify case #5. In this case, calling leaveStartedState
is superfluous, because in the DISCOVERING state:
- There is no need to call unregisterObserver, since the observer
  is only registered when entering STARTING and is unregistered
  when going back to DISCOVERING or IDLE.
- mIface and mBaseIface don't need to be set to null because they
  are only set to non-null when entering STARTING and nulled out
  when going back to DISCOVERING or IDLE.

Bug: 126113090
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
2020-04-04 16:24:58 +09:00
Lorenzo Colitti
dbd215ede1 Migrate to TetherOffloadRuleParcel in IpServer
The netd tethering offload IPCs are changing from taking a list
of primitives to taking a TetherOffloadRuleParcel. Modify their
only caller.

Bug: 140541991
Test: atest IpServerTest
Change-Id: I83718c80ef9d31199c87021b4dd5821717fd5ba5
2020-04-04 16:24:58 +09:00
Nathan Harold
3a87f98eb6 Merge "Check HIDL Discriminator for CSG Info" 2020-04-03 23:28:39 +00:00
Jing Ji
2bded37dfc Merge "Multiply the total memory by mem_unit" 2020-04-03 23:20:24 +00:00
Nathan Harold
8f19e4f21f Check HIDL Discriminator for CSG Info
ART throws an exception if an unpopulated safe union element
is accessed at runtime, so instead we have to check the
hidl_discriminator to see whether the element is populated
before trying to access it (and thus we skip the null check).

Bug: 152486447
Test: atest testCellIdentityLte_1_5_CsgInfo \
        testCellIdentityWcdma_1_5_CsgInfo \
        testCellIdentityTdscdma_1_5_CsgInfo
Merged-In: I08dc0d2050a9f4d4b574178e1c68a23d015768e4
Change-Id: I08dc0d2050a9f4d4b574178e1c68a23d015768e4
(cherry picked from commit f85a2e9220cb523dcb8c05d04a7bcb8b2cfcaf6d)
2020-04-03 15:25:03 -07:00
Daniel Bright
5e423ac87c Merge "SIM De-personalization" 2020-04-03 22:18:13 +00:00
Treehugger Robot
afa19b5208 Merge "Throw RuntimeException/ImsException when binder is null." 2020-04-03 21:41:30 +00:00
Jing Ji
bfdf2d2ea3 Multiply the total memory by mem_unit
Bug: 153107152
Test: Manual
Change-Id: If268b1ea63d7166158ac546dd8a1f445eb3d09f9
2020-04-03 14:32:27 -07:00
James.cf Lin
c111ead0c5 [RCS] Add apis to register and unregister UCE publish state changed.
Provide register and unregister callback apis for clients to receive the UCE publish state changed.

Bug: 139262111
Test: atest UserCapabilityExchangeImplTest
Change-Id: I3248e78d3146be5e966876b80f76d47014694b33
2020-04-03 19:12:44 +00:00
Phil Burk
240615270a OWNERS: add philburk@
So I can work on MIDI services.

Test: review the file
Change-Id: I0b4b82fd31951a0510a87a1ac4fb74869a134676
2020-04-03 12:09:46 -07:00
Treehugger Robot
9b88b3732d Merge "Include exception as cause of BadParcelableException" 2020-04-03 18:37:25 +00:00
Treehugger Robot
79ce5ef0b2 Merge "Don't check for changeid permissions in system server" 2020-04-03 18:08:03 +00:00
Peter Collingbourne
f78e085068 Implement initial policy for memory tag checks.
System apps and the system_server receive async tag checks, while all other
app processes have it disabled. Developers may enable async tag checks
per application with:

$ adb shell am compat 135772972 <app.name>

Bug: 135772972
Change-Id: I154623941eec8e79af347453fbca1b062346c85b
Merged-In: I154623941eec8e79af347453fbca1b062346c85b
2020-04-03 11:04:51 -07:00
Eugene Susla
f86d2fb44d Merge "Prevent HandlerThread from losing interrupted flag" 2020-04-03 16:58:18 +00:00
Frank Li
ca0ddfb793 Merge "Define rcode=12~15 (UNASSIGNED) in rcode enum type" 2020-04-03 16:13:51 +00:00
Lorenzo Colitti
9a920cb92e Merge "Add a test for static IPv4 address tethering configuration." 2020-04-03 08:17:47 +00:00
Remi NGUYEN VAN
4c34898a68 Merge "Fix setAdministratorUids tests on Q" 2020-04-03 07:54:59 +00:00
Svet Ganov
3426c0b458 Update the SettingsProvider OWNERS file
bug: N/A

Test: N/A

Change-Id: I9a25ce97210178767e69226b24fce6d4d0649f1d
2020-04-02 20:44:00 -07:00
Lorenzo Colitti
0e127d1f66 Add a test for static IPv4 address tethering configuration.
Bug: 150644681
Test: test-only change
Change-Id: I8f4a99da2351fdb5467f561a9732b14a8ebf674b
2020-04-03 10:47:47 +09:00
Taesu Lee
6568f8f20a Use an original text for next force 7bit encoding
If config_sms_force_7bit_encoding is true, an original text will be
translated based on 7-bit ASCII table for CDMA. But if the translated
text can not be encoded as single-part SMS, the original text should be
used for next try instead and it will be translated based on GSM 7-bit
alphabet for ENCODING_GSM_7BIT_ALPHABET.

Bug: 151061215
Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I679786b96d19c6f3f30ec3e2037221110f5d3f84
2020-04-03 10:35:55 +09:00
Malcolm Chen
4c96811356 Remove @ModemCount enum definitions.
Per API council's feedback, they are not needed. Replacing enums
with integers 0, 1, 2, 3.

Bug: 143652732
Test: build
Change-Id: Id9e87ea28a2f31e1aa842424770096e16f1cb208
Merged-In: Id9e87ea28a2f31e1aa842424770096e16f1cb208
2020-04-02 15:33:57 -07:00
Chalard Jean
1c48f85a21 Fix a stupid NPE
Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I3e17211c03bc74426bf5e2e414ec322d73b0060b
2020-04-03 07:17:13 +09:00
Nazish Tabassum
a87844ab87 SIM De-personalization
Added constant support to framework for sim deperso

Test: make
Bug: 69389695
Merged-In: Ia7b9ca82570c1c9a9fed945d687e4bec4e87b3a1
Change-Id: I4b11e63b9d2bb9c59c79462c2a74706a572e7d35
(cherry picked from commit 64056e1262463df9d9ccecb8d297b420e1f46891)
2020-04-02 13:52:55 -07:00
Charles Munger
368949c23a Include exception as cause of BadParcelableException
Bug: 136208613
Test: Improved error message
Change-Id: I31404ef67f3b3c8788bd5b83ac5db94279f50f7c
2020-04-02 20:25:22 +00:00
Frank Li
abc516b9f9 Merge "Add new NetworkType for WIFI+CELLULAR+VPN transport" 2020-04-02 16:29:37 +00:00
Lorenzo Colitti
65be95c784 Merge "Rename the *Nat64Prefix to *Nat64PrefixFromDns." 2020-04-02 14:45:11 +00:00
Lorenzo Colitti
5cc3f8b9da Rename the *Nat64Prefix to *Nat64PrefixFromDns.
This just a rename with no functional changes at all. It is
preparation for supporting getting the NAT64 prefix from the
RA.

Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Change-Id: Ia9a09a708870827b1e4cf068f930fa9542dd116c
2020-04-02 22:48:03 +09:00
Tianjie
01ae3f4157 Change the parameter type of offset in read
As we support zip64 in libziparchive, we change the parameter of
the ReadAtOffset() in zip reader from uin32_t to off64_t. So the
derived class needs to be updated as well.

Bug: 150900468
Test: build
Change-Id: Icbfd2dd54b01ff62da988ba8598c1057f9bb6368
2020-04-02 06:16:21 +00:00
Chalard Jean
90c292b13e Merge changes from topics "api-fix-networkagent", "satisfiedby"
* changes:
  Rename satisfiedBy into canBeSatisfiedBy
  Address further API council comments.
2020-04-02 05:51:02 +00:00
Remi NGUYEN VAN
e3397e5a27 Fix setAdministratorUids tests on Q
setAdministratorUids does not exist on Q, so such tests must be skipped
on Q devices.

Bug: 147903575
Test: atest CtsNetTestCasesLatestSdk on Q and AOSP devices
Change-Id: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
2020-04-02 13:58:03 +09:00
Lorenzo Colitti
4fa9742c4d Merge "Only apply VPN isolation if it's fully routed" 2020-04-02 04:10:12 +00:00
Junyu Lai
6baf734a9b Merge changes from topic "sp26-networkstats-cts"
* changes:
  [SP26] add CTS for NetworkStats
  [SP26.2] add a method in NetworkStats that removes empty entries
2020-04-02 02:00:59 +00:00
Chun-Wei Wang
e0aedb2ee3 Merge "Fix a flaky test" 2020-04-02 01:01:21 +00:00
Xiangyu/Malcolm Chen
44bb826ce8 Merge "Add documentation for ACTION_MULTI_SIM_CONFIG_CHANGED" 2020-04-01 23:06:00 +00:00
Xiangyu/Malcolm Chen
2acbd11433 Merge "Allow implicit broadcast of multi SIM config change." 2020-04-01 23:05:43 +00:00
Malcolm Chen
da53d64ceb Allow implicit broadcast of multi SIM config change.
This is a important broadcast that needs to be picked by multiple
components and apps.

Bug: 152655546
Test: build and sanity
Change-Id: I17befbb8814c09c24498b4e534e04f0fbce24c2f
Merged-In: I17befbb8814c09c24498b4e534e04f0fbce24c2f
2020-04-01 19:56:15 +00:00
Malcolm Chen
1cae35384b Hide APIs exposed for Telephony mainline which is no longer needed in R.
The APIs were added in b/144351078, b/148097978 and b/148116922.
b/151665796 is used to revert them.

Bug: 151665796
Bug: 144351078
Bug: 148097978
Bug: 148116922
Test: build
Change-Id: I08db8c5c0161747a7e775a8de0daa7077b513f10
Merged-In: I08db8c5c0161747a7e775a8de0daa7077b513f10
2020-04-01 12:46:51 -07:00
Brad Ebinger
31486405f8 Merge "@hide some APIs that will not be used in Android R" 2020-04-01 19:45:10 +00:00
Malcolm Chen
d5349e23b0 Add documentation for ACTION_MULTI_SIM_CONFIG_CHANGED
Bug: 143652732
Test: build
Change-Id: Id27e6edc82a48ece4a94c8bc7aadbc5e1acf08d7
Merged-In: Id27e6edc82a48ece4a94c8bc7aadbc5e1acf08d7
2020-04-01 12:29:25 -07:00
Fredrik Roubert
cc7a0e7152 Merge "Add "ftp" to the list of URL schemes that get linkified." 2020-04-01 19:02:51 +00:00
Steven Moreland
2608950d10 Merge "Document linkToDeath behavior on object cleanup." 2020-04-01 18:35:05 +00:00
Brad Ebinger
c1d954c78e @hide some APIs that will not be used in Android R
Bug: 147319232
Bug: 148123085
Bug: 147732815
Test: atest CtsTelephonyTestCases
Merged-In: I623e52432fc820d302fcdbdb9a88a37deed455ae
Change-Id: I623e52432fc820d302fcdbdb9a88a37deed455ae
2020-04-01 10:58:42 -07:00
Daniel Bright
7abd26ae78 Merge "Undo isDataCapable as Public API" 2020-04-01 16:37:35 +00:00
Daniel Bright
1656c8f186 Merge "Remove "@Deprecated" from supplyPinReportResult + supplyPukReportResult" 2020-04-01 16:36:58 +00:00