Commit Graph

565248 Commits

Author SHA1 Message Date
Treehugger Robot
f80c56df73 Merge "Don't crash if the MediaCodecList is null." 2021-03-05 16:42:29 +00:00
Zoey Chen
d22eced34b Merge "[Telephony] Remove the dead code setRadioCapability in ITelephony" 2021-03-05 12:35:39 +00:00
Treehugger Robot
db3769c465 Merge "Set SAM according to TV's settings" 2021-03-05 11:55:58 +00:00
Remi NGUYEN VAN
d0355e1be2 Merge "Move NetworkState to Connectivity" 2021-03-05 10:27:57 +00:00
Treehugger Robot
dfc3abdf72 Merge "Update NPMS to listen for all uid procstate changes." 2021-03-05 10:23:27 +00:00
Junyu Lai
0bb7932183 Merge "[FUI23] Remove getNetworkQuotaInfo" 2021-03-05 10:05:06 +00:00
Aaron Huang
918e60b615 Merge "Use NetworkCallback in BatteryStatsService to get connectivity change" 2021-03-05 07:03:51 +00:00
Sudheer Shanka
b5127c0713 Update NPMS to listen for all uid procstate changes.
This is a temporary change until we can fix an issue
in AMS internally.

Bug: 177641226
Test: treehugger
Change-Id: I7d04b4116f8ecb7da8c3fb0b9229a8896b836811
Merged-In: I888764ff22fba92fe2cccf3d8442ed318a19ad2a
2021-03-05 06:36:31 +00:00
Wei Sheng Shih
cc1e7da83c Merge "[RESTRICT AUTOMERGE]Fix launching app from work profile cannot show splash screen." 2021-03-05 05:55:56 +00:00
Treehugger Robot
4c73e05c1d Merge "[FUI22] Support getAllNetworkStateSnapshot" 2021-03-05 05:16:43 +00:00
Remi NGUYEN VAN
8773546980 Merge "Replace user with debuggable check in ConnectivityService" 2021-03-05 05:09:46 +00:00
Chalard Jean
fcbc6ff6b1 Merge "Generalize some PANS methods" 2021-03-05 04:48:39 +00:00
Treehugger Robot
dd2877eabe Merge "Make VCN network policy listener oneway" 2021-03-05 04:25:22 +00:00
Chiachang Wang
db9b175a58 Merge "Have the DataConnectionStat started from BSS" 2021-03-05 02:59:33 +00:00
Janis Danisevskis
421c5739ea Merge "Keystore 2.0: Make VPN Keystore 2.0 ready." 2021-03-05 02:57:34 +00:00
Yan Yan
aef89adfdc Merge "Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"" 2021-03-05 02:30:21 +00:00
Treehugger Robot
41dd05fdfb Merge "Fix CaptivePortalTest before R" 2021-03-05 02:28:55 +00:00
SongFerng Wang
b332627a15 Merge "Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType" 2021-03-05 01:59:53 +00:00
Treehugger Robot
a27ce04850 Merge "Fix subject in self-signed certificates." 2021-03-05 01:16:54 +00:00
Brad Ebinger
9a13fb1dbf Merge "Parse params needed for SipDelegate routing" 2021-03-05 01:11:02 +00:00
Tianjie Xu
8ad97c0d63 Merge "Don't throw runtime exceptions in ResumeOnRebootServiceProvider" 2021-03-05 00:26:57 +00:00
Yan Yan
713ec685cb Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"
This reverts commit 7f13ec417e.

Reason for revert:
1. The BUILD_VERSIONS.S is 1000, and thus it will prevent
   the code from requiring new algorithms on devices whose
   first sdk is 31 (e.g. cuttlefish), though these devices
   should be treated as first launched with SDK S.
2. It will break #testValidationForAlgosAddedInS, because
   the test code is using BUILD_VERSIONS.R to gate the test,
   which is inconsistent with the implementation.

Bug: 181887451
Test: atest IpSecAlgorithmTest
Change-Id: I5cd717c5ebd6086ae5cf9abf76311ae4fca0c6e9
2021-03-05 00:15:15 +00:00
Remi NGUYEN VAN
eb02d4969c Move NetworkState to Connectivity
NetworkState is becoming an internal implementation class, with
NetworkStateSnapshot replacing it as a proper API. Considering this it
belongs inside Connectivity.

Bug: 174123988
Test: m
Change-Id: I201f1a07c50d9da31e33f5c207875da8863ef57c
2021-03-05 08:56:55 +09:00
Brad Ebinger
ca282c8cbf Merge "Define new permission to perform IMS RCS Reg actions and integrate ACCESS_IMS_SINGLE_REGISTRATION into APIS" 2021-03-04 23:17:13 +00:00
Tianjie Xu
b13ad07770 Merge "Add a unittest to cover the retry of load escrow data" 2021-03-04 23:10:57 +00:00
Christian Wailes
61fb950795 Merge "Add ZYGOTE_OWNERS to fd_utils.* files." 2021-03-04 21:11:15 +00:00
Christian Wailes
db6628bb7d Merge changes I04ac8fba,Ia0a8548f
* changes:
  Autoformatter changes.
  Inclusivity cleanup of the Zygote.
2021-03-04 21:09:52 +00:00
Shawn Willden
c7de4a237a Fix subject in self-signed certificates.
Bug: 180620122
Test: atest -c CtsKeystoreTestCases:android.keystore.cts.KeyPairGeneratorTest#testGenerate_EC_ModernSpec_Defaults
Change-Id: Ib74a3f0cea81faf741d49d868739cbedda77e8df
2021-03-04 12:21:17 -07:00
Yan Yan
067b3dffa4 Merge changes I65dbc509,I1e338d9c,Ib4a0ed69,Iac7077b4,I9c53d425, ...
* changes:
  Support converting IKE ID to/from PersistableBundle
  Support converting EAP-TTLS to/from PersistableBundle
  Support converting EAP-SIM, AKA and AKA' to/from PersistableBundle
  Support converting EapSessionConfig to/from PersistableBundle
  Support converting TunnelModeConfigRequest to/from PersistableBundle
  Support converting TunnelModeChildSessionParams to/from PersistableBundle
  Support converting ChildSaProposal to/from PersistableBundle
  Support converting IkeSaProposal to/from PersistableBundle
2021-03-04 18:30:17 +00:00
Cody Kesting
dcaf81ebff Merge changes from topic "vcn-status-cb"
* changes:
  Call VcnStatusCallback#onVcnStatusChanged on register.
  Remove VcnStatusCallback#onEnteredSafemode().
  Expose APIs for VcnStatusCallback.
2021-03-04 18:09:40 +00:00
Chalard Jean
1596b41cba Generalize some PANS methods
These methods will be reused for 5G slicing and should
have a more generic name/signature.

This is a no-op refactoring.

Test: FrameworksNetTests
Change-Id: I13cf9fc405fef7dc650d5ea7df44d025f6713b46
2021-03-04 22:15:27 +09:00
Remi NGUYEN VAN
419d7a7ecf Replace user with debuggable check in ConnectivityService
IS_USER is a hidden symbol, whereas IS_DEBUGGABLE is part
of the module API.
The check is generally equivalent, as non-user builds are eng or
userdebug, which are debuggable.

Bug: 170598012
Change-Id: I7d09939652844eb2e3a6f0200b1ba50691a147da
Test: atest FrameworksNetTests
2021-03-04 13:12:34 +00:00
Chalard Jean
45d586c66c Merge changes Ide2567b2,I0ee0ce92,Iac3f55af
* changes:
  Fix a bug where callbacks would see blips
  Fix a bug where a request would not be refcounted
  Fix a bug where UID ranges would not be removed
2021-03-04 13:12:20 +00:00
Chalard Jean
775feeb477 Fix a bug where callbacks would see blips
When a new OemPreference object is set, the requests
tracking that default will be re-created to track the
new default. This is true regardless of whether that
particular default has changed.

Because the new copied request doesn't know about the
old satisfier, the rematch code will mistakenly think
this callback didn't have a network and will send a
spurious onAvailable to it.

This patch fixes this by simply copying the satisfier
together with the rest of the NRI. The matching code
will then understand the correct previous status.

As a drive-by fix, this also fixes the annotations on
the reassignment contents that can be null. They have
more complex interactions (not everything can be null
at the same time), but the old annotations were just
putting @NonNull on nullable stuff.
In the same line, while there used to be a case with
a satisfier but no request when the satisfier is the
no-service network, there may now be a case where the
old satisfier is known but the old request isn't.

Test: FrameworksNetTests
Test: TODO : need a unit test for this
Change-Id: Ide2567b226722ea9d35ebd8205943363e27647a2
2021-03-04 13:11:59 +00:00
Chalard Jean
b80f9b0097 Fix a bug where a request would not be refcounted
This ends up crashing the system when the request
is unregistered, because the ref counter finds the
count associated with the relevant UID is zero.

Test: FrameworksNetTests
Test: TODO : this needs a new unit test
Change-Id: I0ee0ce925a826d35d8fd58cefb8a870e98ce9add
2021-03-04 22:08:09 +09:00
Chalard Jean
06985411b7 Fix a bug where UID ranges would not be removed
When a new preferences object is sent that no longer contains
a particular app, a new set of requests will be generated. All
requests corresponding to that app will be unregistered, and
no new ones will be filed since the preferences no longer
contain that app.

The place where the UID ranges are removed however is in
makeDefaultForApps(), which takes a request. As there no
longer is a default request for this app, makeDefaultForApps()
will never be called with a request for it, and the UID ranges
will never be removed.

This change applies an emergency fix with some side effects
when setting a new preference. This is acceptable, but should
ideally be fixed ; see TODO in the code for details.

Test: FrameworksNetTests
Test: TODO : Need a unit test for this
Change-Id: Iac3f55af5d00d174460e1d4cdd31f581835dbaa6
2021-03-04 22:08:09 +09:00
Aaron Huang
e96782a567 Use NetworkCallback in BatteryStatsService to get connectivity change
Currently, battery stats service uses noteConnectivityChanged in
connectivity service(CS) to pass connection state and the type of
connection for BatteryStats. However, CS is going to be a mainline
module which can only access formal API. noteConnectivityChanged
is a hidden API and it pass LegacyNetworkType which has been
deprecated years ago, so it should avoid to expose this API with
a deprecated argument. Thus, register a NetworkCallback in
BattyeryStatsService to listen the network capabilities changed to
remove the noteConnectivityChanged from connectivity service.
Besides, let noteConnectivityChanged take display transport instead
of legacy network type.

Bug: 171686421
Test: atest FrameworksNetTests
      atest FrameworksCoreTests:BatteryStatsTests
(cherry-picked from ag/13749983)
Change-Id: I3dac94ec06f673aa719e124f1ef3d8169f68f9fb
Merged-In: I3dac94ec06f673aa719e124f1ef3d8169f68f9fb
2021-03-04 13:06:06 +00:00
Treehugger Robot
69508ee6db Merge changes Ie8d98359,I4d5cadfd
* changes:
  Fix a bug in RequestReassignment#toString
  Cleanup some of the PANS code
2021-03-04 12:39:04 +00:00
Lucas Lin
0292235a96 Merge "Use public API Network#getNetId() to get netid" 2021-03-04 11:05:55 +00:00
Nathalie Le Clair
da70abc9e1 Merge changes Ie0a7ec38,I5199dc85
* changes:
  Handle messages in standby for DeviceDiscoveryAction
  Prevent periodic actions from starting twice
2021-03-04 11:01:12 +00:00
Remi NGUYEN VAN
bf186a8669 Fix CaptivePortalTest before R
The last change broke the test on Q and R. Fix it to check
Q and R behavior properly, so the test can be run in presubmit
on such devices too.

Bug: 181844595
Change-Id: I99847ea30d49d690d9011d4763a7345126807119
Test: atest CtsNetTestCasesLatestSdk
2021-03-04 10:45:02 +00:00
junyulai
52facd7e3a [FUI23] Remove getNetworkQuotaInfo
Currently, getNetworkQuotaInfo in NetworkPolicyManagerService
uses NetworkState class, which will not be available after
ConnectivityService moved to mainline module.

Thus, to remove the usage of NetworkState, remove this function
since:
  1. There is no internal usage and the function only prints
     debug log.
  2. It is non-SDK API which annotated with maxTargetSdk = 30,
     callers should not expect it will continoue to work in next
     Android release.
  3. go/nonsdk-dash shows zero usage statistics.

Test: TH
Bug: 174123988
Change-Id: I450964a692b85f3ba89bf9f847e8089ee2445bda
2021-03-04 18:41:09 +08:00
junyulai
6c280634c7 [FUI22] Support getAllNetworkStateSnapshot
Currently, ConnectivityService has getAllNetworkState but it is
not ideal to expose as system API since the plan is to get rid
of NetworkState. Thus, create a new one that returns
NetworkStateSnapshot to fulfill the needs.

Note the original getAllNetworkState cannot be deleted now since
it has @UnsupportedAppUsage annotation.

Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: Icddd434552b0e9ecbc8299e7242ec88cf3145aca
2021-03-04 18:41:09 +08:00
Zoey Chen
02271f9d02 [Telephony] Remove the dead code setRadioCapability in ITelephony
Bug: 181156124
Test: make
Change-Id: I5b8ebcdcc60815de93420c742740032a0d21f028
2021-03-04 18:05:27 +08:00
Chiachang Wang
ae536d810d Have the DataConnectionStat started from BSS
ConnectivityService is going to becoming a mainline module.
The DataConnectionStat is used to listen the telephony status
change and report to BSS. This does not really relate to
connectivity. DataConnectionStat was created in
ConnectivityService and use some hidden APIs which is not
allowed for a mainline module. Thus, move the creation and
monitor to BSS directly which is more appropriate place from
its functional perspective.

Also, move the DataConnectionStat out from module scope since
it does have too much relationship with connectivity module.

Bug: 171183530
Test: m ; verify the behavior with cellular state change
Change-Id: I0c2c1b90df7a107ee75e81fd49d39d65678204c0
Merged-In: I0c2c1b90df7a107ee75e81fd49d39d65678204c0
2021-03-04 16:21:25 +08:00
SongFerngWang
e206456a16 Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType
- Add more reasons of allowed network type
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
- Add @systemApi for below
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_POWER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
  - setAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesBitmask API
- Add Public for below
  - CARRIER_NR_AVAILABILITY_NONE
  - CARRIER_NR_AVAILABILITY_NSA
  - CARRIER_NR_AVAILABILITY_SA
  - KEY_CARRIER_NR_AVAILABILITY_INT
- @Deprecated API
  - setPreferredNetworkTypeBitmask
  - getPreferredNetworkTypeBitmask
  - setAllowedNetworkType
  - getAllowedNetworkType
- Add a new way to notify allowedNetworkType at PhoneStateListener
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT

Bug: 161434786
Test: atest TelephonyManagerTest#testSetAllowedNetworkTypesForReason
(PASS)
atest TelephonyManagerTest#\
testSetAllowedNetworkTypesForReason_moreReason
(PASS)
atest PhoneStateListenerTest#\
testOnAllowedNetworkTypesChangedByRegisterPhoneStateListener
(PASS)

Change-Id: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
Merged-In: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
2021-03-04 14:58:54 +08:00
Janis Danisevskis
8cd7953577 Keystore 2.0: Make VPN Keystore 2.0 ready.
* Use public stable API to load certificates from keystore.
* Also use grants to allow racoon to use keystore keys without
  special exceptions in keystore.
* Use LegacyProfileStore instead of Keystore for storing VPN profiles.

Bug: 175068876
Bug: 171305607
Test: atest android.net.cts.Ikev2VpnTest
      atest android.net.cts.IpSecManagerTest
      atest com.android.server.connectivity.VpnTest
      atest com.android.server.ConnectivityServiceTest
Merged-In: I27975113896ea137260a9f94a34fb1c3ca173fe3
Change-Id: I27975113896ea137260a9f94a34fb1c3ca173fe3
2021-03-03 22:14:41 -08:00
Treehugger Robot
78a488cd10 Merge "Remove unused errorMessage" 2021-03-04 06:03:56 +00:00
Benedict Wong
58467f3fab Make VCN network policy listener oneway
This change ensures that all VCN callbacks and interfaces are
asynchronous, ensuring that the systemserver does not get deadlocked.

Bug: 180968965
Test: atest FrameworksVcnTests
Change-Id: I551137420bbd561ad53a6c06c8f91306901e51f4
2021-03-03 20:37:26 -08:00
Treehugger Robot
12acf15141 Merge "Remove @hide CollectionUtils in QosCallbackTracker" 2021-03-04 04:22:18 +00:00