Commit Graph

12170 Commits

Author SHA1 Message Date
Paul Hu
29c0ce536f Merge "Stop using SysetmConfig#getSystemPermissions on PermissionMonitor" am: 3172402dff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545848

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia4697e282fbc46044d1a1f477568ef9ccb02d221
2021-02-23 22:15:51 +00:00
Paul Hu
2cc02fbe38 Merge "Remove ArrayUtils usage in connectivity classes" am: 68614b554e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513051

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c7b2314ea6d6a8b234836ab4d47319daf8cd642
2021-02-23 22:11:19 +00:00
Paul Hu
3172402dff Merge "Stop using SysetmConfig#getSystemPermissions on PermissionMonitor" 2021-02-22 05:22:37 +00:00
Paul Hu
68614b554e Merge "Remove ArrayUtils usage in connectivity classes" 2021-02-22 05:22:01 +00:00
Xin Li
e8cbbd6b6c Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
James Mattis
c3232523e3 Merge "Using defensive copy for default request remove" am: be9a647b2c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597518

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2f49286ef328f95212fec94a5d747aa2936a88ef
2021-02-21 05:15:14 +00:00
James Mattis
be9a647b2c Merge "Using defensive copy for default request remove" 2021-02-21 04:28:13 +00:00
James Mattis
15c1b2108c Using defensive copy for default request remove
Passing in a defensive copy for the default requests in
ConnectivityService prior to updating that collection so as to not have
issues when removing elements as part of the per-app preference update
flow.

Bug: 176494815
Bug: 178632672
Test: atest FrameworksNetTests
atest FrameworksNetTests:com.android.server
.ConnectivityServiceTest#testSetOemNetworkPreference
ClearPreviousOemValues --iterations

Change-Id: Ia683d5035dda2be35fd2f2b7ee038e806caab6f9
2021-02-20 15:51:24 -08:00
James Mattis
f354f527ae Merge "Unit test automation for Multilayer Evaluation" am: ef921b95d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579206

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I888bc951d1e54d4773f06fa9b61eefe815eb5462
2021-02-20 22:10:34 +00:00
James Mattis
ef921b95d7 Merge "Unit test automation for Multilayer Evaluation" 2021-02-20 21:23:45 +00:00
Junyu Lai
6d8a6d5f70 Merge "[FUI15] Remove networkId in NetworkState" am: c8ae3c432b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542749

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9243f1cc94c73e3312f3a85fa34d3499bc92accd
2021-02-20 15:51:56 +00:00
Junyu Lai
c8ae3c432b Merge "[FUI15] Remove networkId in NetworkState" 2021-02-20 14:00:19 +00:00
paulhu
fb7877ead5 Stop using SysetmConfig#getSystemPermissions on PermissionMonitor
Repalace the API with SysetmConfigManager#getSystemPermissionUids
and update the design/test accordingly.

Bug: 177188455
Test: atest FrameworksNetTests
Test: atest FrameworksNetIntegrationTests
Test: atest CtsNetTestCases
Change-Id: I8b553b934252b93c60b815715680427a41620054
2021-02-20 16:20:19 +08:00
Chiachang Wang
634db1b9de Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771 am: d55023c6e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20a0f2d4a59222083d1c17a7732b7fe0b8461502
2021-02-20 03:41:04 +00:00
James Mattis
33451af2f2 Merge "Unit tests for Multi-Default with Existing APIs" am: 090909cb3d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579208

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibc47b166c6ea68ef0c059edfd1a0aa93c0aa1fc3
2021-02-20 02:04:02 +00:00
Chiachang Wang
d55023c6e9 Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771
* changes:
  [IT06]Move INetworkActivityListener into connectivity module
  [IT05] Remove the unused network activity logic out from NMS
  [IT4.7] Add network activity info into dumpsys for debugging
  [IT4.6] Unbundle NMS out from ConnectivityManager
  [IT4.5] Update radio power from CS directly
2021-02-20 02:02:46 +00:00
James Mattis
84b4bb86d4 Unit test automation for Multilayer Evaluation
Unit test automation for multilayer network hierarchy evaluation
when using the setOemNetworkPreference() API ConnectivityService.

Bug: 178632672
Bug: 176494815
Bug: 170068946
Test: atest FrameworksNetTests
Change-Id: Ia9b76f49a07eff6a3977faaa41fc67a10f307841
2021-02-19 17:41:01 -08:00
James Mattis
090909cb3d Merge "Unit tests for Multi-Default with Existing APIs" 2021-02-20 01:38:52 +00:00
Nataniel Borges
e14f718270 Merge "Revert "Delete VPN methods in ConnectivityManager."" am: 19261dd671
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596592

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3572428c0044d410055a53f4bff680c2dd474028
2021-02-19 16:12:03 +00:00
Lorenzo Colitti
bd53da5929 Merge "Delete VPN methods in ConnectivityManager." am: e66719e8ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1594171

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8b2968f3b0c6ed9d693f56c4f4697f410c706085
2021-02-19 16:06:51 +00:00
Nataniel Borges
19261dd671 Merge "Revert "Delete VPN methods in ConnectivityManager."" 2021-02-19 15:32:46 +00:00
Nataniel Borges
66ef4728a1 Revert "Delete VPN methods in ConnectivityManager."
This reverts commit 2698d0c254.

Bug: 180710918
Reason for revert: Broken build 

Change-Id: I6e6318b4c01ccab27ca3e9f16bb2194aa1d9ffd2
2021-02-19 15:25:33 +00:00
Lorenzo Colitti
e66719e8ed Merge "Delete VPN methods in ConnectivityManager." 2021-02-19 14:56:04 +00:00
Lorenzo Colitti
263ead791b Merge changes I0e6df469,I3d46d5f7 am: 05baf850c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1591457

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I13daedf40a5b0569b78ace23f36ab971c45bc690
2021-02-19 09:10:19 +00:00
Lorenzo Colitti
2698d0c254 Delete VPN methods in ConnectivityManager.
1. Stop using ConnectivityManager for VPNs in VpnDialogs.
2. Delete updateLockdownVpn, since all callers have been migrated
   to calling VpnManager directly.
3. Delete the call to VpnManager in factoryReset, since the only
   caller (ResetNetworkConfirm) has been updated to call into
   VpnManager directly.
4. Delete getVpnManager, since it is now unused.

Test: m
Bug: 173331190
Change-Id: I5d071281c0e36f6523fea10671a9abf994c66d66
2021-02-19 17:34:30 +09:00
Lorenzo Colitti
f8b5e2a497 Merge "Fix all Log.wtfs in FrameworksNetTests." am: 326cf02637
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1591458

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iedc95830b855eb2da7a5e9b9f7da2fea07a88962
2021-02-19 08:28:14 +00:00
Lorenzo Colitti
05baf850c4 Merge changes I0e6df469,I3d46d5f7
* changes:
  Fix testMobileDataAlwaysOn flakiness
  Speed up NetworkFactory tests.
2021-02-19 08:13:38 +00:00
Lorenzo Colitti
326cf02637 Merge "Fix all Log.wtfs in FrameworksNetTests." 2021-02-19 07:49:27 +00:00
Treehugger Robot
2074561653 Merge "Use formal API for ActivityThread to set proxy" am: 86ecbddaf0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1512874

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I917bf20c932395ac07089059e1c46fe46de4d1f4
2021-02-19 06:47:31 +00:00
Treehugger Robot
86ecbddaf0 Merge "Use formal API for ActivityThread to set proxy" 2021-02-19 05:42:06 +00:00
Remi NGUYEN VAN
9ff113bbe1 Use formal API for ActivityThread to set proxy
Add setHttpProxyConfiguration to the public API, and use
ConnectivityManager APIs from ActivityThread (instead of hidden APIs) to
get/set the proxy for an app process.

The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.

Bug: 174436414
Test: m; device boots
Merged-In: Ifb516194ecde1567cea4b6806946091cdcf2f015

Change-Id: I06b797eeae54609aecdc0afe1df4e6c602a17a69
2021-02-19 13:53:56 +09:00
Remi NGUYEN VAN
a6d619df36 Merge "Split parcelable .aidl files to aidl-export" am: 75c728d254
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1589694

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35bcfe8b6861b1fbf7eb7c7f43dafe84ec364634
2021-02-19 03:46:20 +00:00
Remi NGUYEN VAN
75c728d254 Merge "Split parcelable .aidl files to aidl-export" 2021-02-19 02:21:25 +00:00
Lorenzo Colitti
cf4fb16228 Fix all Log.wtfs in FrameworksNetTests.
These cause the tests to crash on eng builds, so disrupt
development.

Test: atest FrameworksNetTests passes on eng build
Change-Id: Ifa5131fdb8f57af812cf688970be6588d2879c29
2021-02-18 21:13:04 +09:00
Chalard Jean
86059bafb6 Merge "Optimization when looking up requests for release" am: 0cb136a9c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1592999

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I47310ae059b93921206dff400d35ae024e400325
2021-02-18 09:26:16 +00:00
Chalard Jean
0cb136a9c5 Merge "Optimization when looking up requests for release" 2021-02-18 08:33:09 +00:00
Chalard Jean
1cd19ed4cb Fix testMobileDataAlwaysOn flakiness
Test: atest --iterations 100 CST#testMobileDataAlwaysOn
Change-Id: I0e6df4694752dab7a5938e8f8bd88c7da7c3fcd5
2021-02-18 16:45:27 +09:00
Chalard Jean
3d8d563e24 Speed up NetworkFactory tests.
Somehow this big slowdown escaped review.

Test: ConnectivityServiceTest
Change-Id: I3d46d5f7a986b3586b7e6044eb10aba756bb6ceb
2021-02-18 16:45:26 +09:00
Lorenzo Colitti
5721650852 Merge "Fix merge conflict." am: 8e97e8b968
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1592111

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iacfb147645ff01c270ebeefde7ab1b9b61bafd44
2021-02-18 06:36:08 +00:00
Lorenzo Colitti
8e97e8b968 Merge "Fix merge conflict." 2021-02-18 05:22:56 +00:00
Remi NGUYEN VAN
f51b062899 Remove ArrayUtils usage in connectivity classes
Instead, use CollectionUtils from frameworks/libs/net.

Bug: 174541037
Test: atest FrameworksNetTests
Change-Id: I71b574f67fc9a88063925bc75f7c1441e585b815
2021-02-18 12:06:28 +08:00
Chiachang Wang
e9bc163a29 [IT06]Move INetworkActivityListener into connectivity module
INetworkActivityListener is hidden and the only usage is inside
the connectivity module. Thus, move this into module scope.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I0a75c440c1daa773217bbd362b212fda4d07ec64
2021-02-18 12:03:21 +08:00
lucaslin
3756fcc3c5 [IT4.7] Add network activity info into dumpsys for debugging
Add network activity info into part of ConnectivityService dump
for debugging.

Sample dump:

Legacy network activity:
  mNetworkActive=true
  Idle timers:
    wlan0:
      timeout=15 type=1

Bug: 170598012
Test: adb shell dumpsys connectivity
Change-Id: Ie03e82767564543d8d143873d7ddc0ea07102cb2
2021-02-18 11:59:40 +08:00
lucaslin
a5e9bdbc3b [IT4.6] Unbundle NMS out from ConnectivityManager
ConnectivityService is no longer to update idle timer to NMS but
send to INetd directly after this change. Replace the API
implementation in ConnectivityManager to refer into
ConnectivityService instead of NetworkManagementService to remove
the dependency between CM and NMS for ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: If0ac9a6427dba5a732a15b5d7ca1351b71b07b7b
2021-02-18 11:48:06 +08:00
James Mattis
27aeff08ce Optimization when looking up requests for release
Including an optimzation in handleReleaseNetworkRequest when
looking up a request so that in the chance an app shuts down prior to
the request being released, it doesn't cause errors when looking
validating that apps uid->package name.

Bug: 178729499
Test: atest FrameworksNetTests
atest ExtServicesUnitTests on CF and making sure no remote exceptions.

Change-Id: I2c49511a1385b47fba075b2794685ae2bc80abba
2021-02-17 19:34:43 -08:00
lucaslin
32028e0d2a [IT4.5] Update radio power from CS directly
There were two ways to update the network activity from
NetworkManagementService to BatteryStatsService.
  1. The Netd unsolicited event onInterfaceClassActivityChanged
  2. The idle timer setup and removal

The first path was replaced by previous patch to listen netd
event from BSS directly. BSS does not rely on NMS to notify
event from netd now.

This patch is going to replace the second path. In order to clear
the dependency between NMS and CS, the idle timer setup and
removal will be sent from CS to INetd directly without going via
NMS in the follow up patches. NMS will no longer receive the
idle timer update. Thus, update the radio power status from CS
to BSS directly to separate the network activity logic from NMS.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I716bd77168896b29a6e04f592adcf27b82edebca
2021-02-18 10:43:45 +08:00
Remi NGUYEN VAN
d2107994d6 Split parcelable .aidl files to aidl-export
The one-line "parcelable X" files need to be imported by targets that do
not build against SDK (the SDK has prebuilt definitions), so prepare a
dedicated directory for them.
This avoids having users of the classes include the whole src/
directory, which could contain definitions for classes that are not part
of the public API, so should not be imported.

Also move back to frameworks/base/core some .aidl definitions that
were separated from their associated class.

Bug: 171540887
Test: m
Merged-In: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549
Change-Id: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549
2021-02-18 01:17:04 +00:00
James Mattis
f0cfa51361 Merge "Unit test automation for Per-App API functionality" am: eed1a0000b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562555

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I61ca9d447dd1bc602d2956f81ef8523fb45f0d7c
2021-02-17 18:09:32 +00:00
James Mattis
eed1a0000b Merge "Unit test automation for Per-App API functionality" 2021-02-17 17:17:30 +00:00
Lorenzo Colitti
37a204c54b Merge "Expose TEST_TAP_PREFIX as system API" am: a23086c536
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id27c81e87d9a67d48d6c1692438c8d09439ed080
2021-02-17 13:04:21 +00:00