Commit Graph

560435 Commits

Author SHA1 Message Date
Treehugger Robot
577fd4a912 Merge "Add @Nullable to Object#equals()" 2021-02-05 09:36:41 +00:00
Junyu Lai
fb2c686fb1 Merge "[VCN09] Rename linger timer" 2021-02-05 09:29:12 +00:00
Frank Li
ec30b1105c Merge "[CS04]Remove hidden API usage of NetworkCapabilities" 2021-02-05 08:29:42 +00:00
Remi NGUYEN VAN
2e2dda5a9f Merge "Remove legacy network factories" 2021-02-05 08:23:19 +00:00
junyulai
0452d4a2aa [VCN09] Rename linger timer
Linger timer mechanism will be used for both "linger" and
"nascent" states. To prevent confusion, rename the linger
timer and related functions to more generic name.

Test: TH
Bug: 175180558
Change-Id: I652f7c65c2f8bc58fb9d3316480f23a9709eccce
2021-02-05 15:57:07 +08:00
Lorenzo Colitti
ace52c4ff8 Merge changes Ieb7f33bc,I81b56862
* changes:
  Fix the legacy VPN tests that start racoon.
  Make testLegacyLockdownVpn more realistic.
2021-02-05 07:34:43 +00:00
Roman Kalukiewicz
9b9af7777d Add @Nullable to Object#equals()
This is a partial cherry-pick of change:
I5eedb571c9d78862115dfdc5dae1cf2a35343580

for connectivity classes.

Bug: 170883422
Test: m
Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
2021-02-05 07:28:44 +00:00
Paul Hu
830e1e9576 Merge "Replace NPMI#isUidNetworkingBlocked()" 2021-02-05 06:38:02 +00:00
Lorenzo Colitti
9500317c2b Fix the legacy VPN tests that start racoon.
These tests do not actually work, or at least not as designed.
What happens when they are run is that creating/connecting the
VPN throws an exception. The call to legacyRunnerReady.block()
times out after 10 seconds because the condition variable is
never opened, but the doesn't notice the timeout becasue it
doesn't check the return value of block().

There are two reasons for the VPN not coming up.
1. VpnConfig.getIntentForStatusPanel calls into PendingIntent and
   ActivityManager statics, which bypass all the mocks and fail
   with an appops denial. Fix this by making it a dependency.
2. The tests are broken due to the UserManager API changes
   tracked in b/175883995. Fixing by adding a bit of ad-hoc code
   into startLegacyVpn, with a TODO to delete it once the rest of
   the UserManager setup code is fixed.

Fix these and check the return value of block(). This ensures
that if any other breakage is added the test will actually fail.
Also check that the throw route survives all the way to the
LinkProperties sent to the agent.

Bug: 173331190
Test: atest com.android.server.connectivity.VpnTest
Change-Id: Ieb7f33bce283ac5ee562a912df8edb9c930ed2b0
2021-02-05 14:40:13 +09:00
Lorenzo Colitti
61514b2a44 Make testLegacyLockdownVpn more realistic.
Bug: 173331190
Test: test-only change
Change-Id: I81b5686244f479d967c826e29eba4feb396a09cf
2021-02-05 14:36:54 +09:00
Sarah Chin
1c600eed49 Merge "Update setSubscriptionOverride API to allow network types" 2021-02-05 05:14:50 +00:00
James Mattis
34989a9c9e Merge changes Ic41fdc40,I5851a36e
* changes:
  Updating Existing CS APIs for multiple defaults
  Transmitting multiple default networks to netd
2021-02-05 03:12:38 +00:00
Brad Ebinger
9e1009dd55 Merge "Discard dead MmTelFeature Binder Instances" 2021-02-05 03:12:28 +00:00
Julien Desprez
cc7362c63c Merge "Remove TEST_MAPPING entry based on go/a-unit-tests update" 2021-02-05 02:50:16 +00:00
Calvin Pan
454e15dc12 Merge "Add a carrier config for non-RCS capabilities expiration" 2021-02-05 01:27:59 +00:00
Muhammad Qureshi
eb043b78a5 Merge "Use annotation id @SystemApi constants in StatsLog" 2021-02-05 01:10:34 +00:00
Brad Ebinger
cd910c2131 Discard dead MmTelFeature Binder Instances
When the phone process crashes and the IMS service is in
a separate process, there is a condition where the ImsService may
still stay unbound, but alive and not torn down. In this case,
when the phone process comes back up and tries to register new
binder callbacks, detect that the old binder callbacks are dead
and discard instead of throwing an exception.

Bug: 179217608
Test: kill phone process
Change-Id: I4fc3b6d15fe19ebaf1fc52dab92a615a761222f8
2021-02-05 00:42:39 +00:00
James Lin
77c5faf493 Merge "[RCS UCE] Add a network response with Reason header info callback for the publish request and subscribe request." 2021-02-04 23:59:19 +00:00
James Mattis
3c19c3d395 Updating Existing CS APIs for multiple defaults
Updating existing ConnectivityService APIs to support multiple default
network functionality.

Bug: 178729499
Bug: 172347841
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Ic41fdc402a26809efda71f484c259ffd7a52e63b
2021-02-04 15:54:18 -08:00
James Mattis
079d5f9480 Transmitting multiple default networks to netd
Updating ConnectivityService to transmit network information to netd as
part of supporting multiple default networks.

Bug: 176191930
Bug: 172347841
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I5851a36e3c3ccb45f4cb3ff85e0fc1352f64dc70
2021-02-04 15:41:25 -08:00
Tobias Thierer
84da5781da Merge "Update services/backup/OWNERS" 2021-02-04 22:33:45 +00:00
Treehugger Robot
de246e1658 Merge changes If58d648d,Iec51a349
* changes:
  Add persistence for app hibernation states
  Move AppHibernationServices dependencies to injector
2021-02-04 20:18:07 +00:00
Seigo Nonaka
eff415e780 Merge "Update OWNERS file for font files in FrameworksCoreTests" 2021-02-04 19:57:14 +00:00
Treehugger Robot
ac598696b4 Merge "Avoid ellipsis character in documentation." 2021-02-04 18:41:35 +00:00
Julien Desprez
5829ccc65d Remove TEST_MAPPING entry based on go/a-unit-tests update
cc_test_host now all run in presubmit without any need for
explicit TEST_MAPPING

Test: presubmit
Bug: 177450457
Change-Id: I3dbc4aaa99237dfebf9604ef1e7b31fd88741b1e
2021-02-04 09:18:30 -08:00
Treehugger Robot
4a3d05551a Merge "Add tests/UpdatableSystemFontTest/OWNERS." 2021-02-04 17:15:59 +00:00
Cody Kesting
6d02108df5 Merge changes I03be15d6,Ie1671925,Ie87f4aa3,I24474419,I15bc9aaf
* changes:
  Fix test method naming in VcnManagementServiceTest.
  Fix field order for UnderlyingNetworkTracker.
  Notify PolicyListeners to refresh their policy on VCN changes.
  Unit test TelephonySubscriptionSnapshot changes for VCNs.
  Notify UnderlyingNetworkTracker for Subscription changes.
2021-02-04 17:14:57 +00:00
Bill Yi
e412ab4ec6 Merge "Merge RQ1A.210205.004 to aosp-master - DO NOT MERGE" 2021-02-04 17:08:41 +00:00
Donald Chai
b4d25b8547 Avoid ellipsis character in documentation.
Renders as "?" on https://developer.android.com/reference/android/view/FrameMetrics, as if someone was unsure?

Change-Id: I4de9b99282480f1107bd8c3e387781775de9326c
2021-02-04 17:05:44 +00:00
Adrian Roos
60f3d5cee4 Merge changes from topic "nullablecollection"
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints
2021-02-04 15:53:34 +00:00
lifr
4529672061 [CS04]Remove hidden API usage of NetworkCapabilities
The connection service will become the mainline module. The mutating
NetworkCapabilities is deprecated, and the NetworkCapabilities should
be built through their Builder instead.

Bug: 170598012
Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest
Test: atest CtsJobSchedulerTestCases
Change-Id: I931f6f4cedd89a3ff7c811266c68c00f26e8ce43
2021-02-04 21:37:05 +08:00
paulhu
b4fc12eda7 Replace NPMI#isUidNetworkingBlocked()
ConnectivityService is going to become a mainline module which
will not able to access hidden APIs. NetworkPolicyManagerInternal
is a internal serivce that CS can't be access after be a mainline
module. Thus, create NPM#checkUidNetworkingBlocked to replace it.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Test: atest CtsHostsideNetworkTests
Test: atest FrameworksCoreTests:NetworkPolicyManagerTest
Test: atest FrameworksServicesTests:NetworkPolicyManagerServiceTest
Change-Id: I7bee37522dc5c55c255b159fda9481eff663655a
2021-02-04 19:28:57 +08:00
Remi NGUYEN VAN
15531aca22 Remove legacy network factories
Nothing on the system is using registerNetworkFactory,
unregisterNetworkFactory at the moment.

registerNetworkFactory, unregisterNetworkFactory are protected by
signature permissions, so could not be used by anything outside of the
system.

Remove the two methods and the underlying support for this legacy,
deprecated mechanism.

Bug: 179229316
Test: atest FrameworksNetTests
Change-Id: I7cdc9eed67f846c8774474af038133040aeccab3
2021-02-04 18:04:43 +09:00
Treehugger Robot
5f36d6f70a Merge "Revert the fallback naming into default network" 2021-02-04 08:48:21 +00:00
Lorenzo Colitti
3695e752ff Merge "Improve getConnectionOwnerUid tests." 2021-02-04 08:22:03 +00:00
Lucas Lin
be75db951a Merge "Reimplement [read|write]ArraySet of Parcel inside NetworkCapabilities" 2021-02-04 06:12:14 +00:00
Robert Chou
478bbc1f3f Merge "Fix data limit notification issue" 2021-02-04 05:03:38 +00:00
Cody Kesting
f5915a7f3a Fix test method naming in VcnManagementServiceTest.
Bug: 175914059
Test: atest FrameworksVcnTests
Change-Id: I03be15d63adfccc357000ee670e373d0359a3c06
2021-02-03 20:28:51 -08:00
Cody Kesting
ed2dfc9d68 Fix field order for UnderlyingNetworkTracker.
Bug: 177364490
Test: atest FrameworksVcnTests
Change-Id: Ie1671925ab0427d47020673cca7c889bff8b6a8a
2021-02-03 20:28:51 -08:00
Cody Kesting
26409bfe5d Notify PolicyListeners to refresh their policy on VCN changes.
This CL updates VcnManagementService to notify all registered
VcnUnderlyingNetworkPolicyListeners to refresh their
UnderlyingNetworkPolicy when any VCN is added or removed.

Bug: 175914059
Test: atest FrameworksVcnTests
Change-Id: Ie87f4aa3401c6c4ba9f932130a1d475e35f59d4e
2021-02-03 20:28:51 -08:00
Cody Kesting
50e9bf04aa Unit test TelephonySubscriptionSnapshot changes for VCNs.
This CL adds unit testing for TelephonySubscriptionSnapshot updates in
UnderlyingNetworkTracker, Vcn, and VcnManagementService.

Bug: 177364490
Test: atest FrameworksVcnTests
Change-Id: I244744194a1360c7c7dee062a302e04f9b5efc32
2021-02-03 20:28:43 -08:00
Lorenzo Colitti
b7e9f5b1ca Improve getConnectionOwnerUid tests.
Currently, the tests only check whether the method throws a
SecurityException or not. Also check the return value of the
call, by mocking out InetDiagMessage.getConnectionOwnerUid.

This is required to test an upcoming change that will never
throw SecurityException but always return INVALID_UID if the
caller lacks permissions.

Bug: 173331190
Test: test-only change
Change-Id: I63f42a2f098fcf8796c9b4525a3a7b8320c0a139
2021-02-04 04:19:28 +00:00
Chalard Jean
92618c435e Revert the fallback naming into default network
There is strong opposition in the team to this rename.
Reverting to the old language.

Test: FrameworksNetTests
Change-Id: Icefa3090966c07fd66692ddd5b44dfc94485a914
2021-02-04 13:14:05 +09:00
Cody Kesting
2b0754517c Notify UnderlyingNetworkTracker for Subscription changes.
This CL updates VcnManagementService to notify active VCNs when it is
notified of subscription changes by TelephonySubscriptionTracker. These
subscription changes are passed down to each VCN's
UnderlyingNetworkTracker, which determines whether it needs to register
or unregister bringup NetworkRequests based on subIds within that VCN's
Subscription Group.

Bug: 177364490
Test: atest FrameworksVcnTests
Change-Id: I15bc9aaf3d5f97046d0ce9fcf1e12c9b1e0e1446
2021-02-03 19:04:01 -08:00
Benedict Wong
9a59faa385 Merge "Implement ConnectedState" 2021-02-04 02:58:09 +00:00
Treehugger Robot
9ecf49ba26 Merge "Add BatteryStats OWNERS to native code" 2021-02-04 02:52:04 +00:00
Kevin Han
dba83c49dd Add persistence for app hibernation states
Persist hibernation states to disk. This CL persists the user-level
and global hibernation states to disk.

Bug: 175829330
Test: atest AppHibernationServiceTest
Test: atest HibernationStateDiskStoreTest
Change-Id: If58d648d720bed1693b9346c4d0e85074daec931
2021-02-03 18:17:25 -08:00
Kevin Han
6669dec038 Move AppHibernationServices dependencies to injector
Similar to other system services, we move AppHibernationService's
dependencies to an injector class that can be mocked for testing so that
we minimize side-effects in unit tests

Also, add @GuardedBy annotations instead of having an L at the end of
method names since this is exactly what the annotation is for.

Bug: 175829330
Test: atest AppHibernationServiceTest
Change-Id: Iec51a349ff898923bacf6040c3ebccefa8831a68
2021-02-03 18:13:34 -08:00
Treehugger Robot
85797196b4 Merge "Add/remove user state based off user unlocking" 2021-02-04 02:05:28 +00:00
Benjamin Schwartz
e954a703ed Add BatteryStats OWNERS to native code
Bug: 173132005
Test: NA
Change-Id: Ic32489ac9a222a371681b288d7fd3a34ddff9530
2021-02-03 17:13:12 -08:00