529719 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
e8e9dec395 Remove JobInfo usage of NetworkRequest#networkCaps
NetworkRequest#networkCapabilities is an implementation detail (not part
of the NetworkRequest API); NetworkRequest has getters that return the
same information.

Bug: 174436414
Bug: 142281756
Test: m
Merged-In: I47e7ab1b887b2fe2dddef223bd7c66bdd290fc56

Change-Id: I47e7ab1b887b2fe2dddef223bd7c66bdd290fc56
2020-12-01 01:37:51 +00:00
Remi NGUYEN VAN
a30437ce32 Merge "Run OemNetworkPreferencesTest with DevSdkIgnoreRunner" 2020-12-01 01:33:42 +00:00
Brad Ebinger
af18d59494 Merge "Add SIP Transport create/destroy API defs" 2020-12-01 01:20:12 +00:00
Treehugger Robot
c565f2bd57 Merge "Revert "Revert "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums""" 2020-12-01 01:16:40 +00:00
Lais Andrade
040919bef5 Merge "Fix documentation of delay param in VibrationEffect.Composition" 2020-11-30 22:47:19 +00:00
Sarah Chin
f06ca9903c Create getSystemSelectionChannel API
Test: atest TelephonyManagerTest
Bug: 152813408
Change-Id: I2d80284b92414f403af977cbe193766eac08a6e0
Merged-In: I2d80284b92414f403af977cbe193766eac08a6e0
2020-11-30 14:45:27 -08:00
Treehugger Robot
a7564ec175 Merge "Update link for Permissions samples in Javadoc" 2020-11-30 22:33:28 +00:00
Treehugger Robot
05eb098299 Merge "Updating owners of SystemUI" 2020-11-30 21:56:48 +00:00
Jeffrey Huang
ca10c36424 Update comment for new proto directory
Bug: 167962588
Test: m -j
Change-Id: I539212aa9f5fd86d58116e32abbe48190dd3ca16
2020-11-30 12:44:45 -08:00
Treehugger Robot
4ca6de77af Merge "Fix intdefs that were incorrectly defining "flag"" 2020-11-30 20:34:35 +00:00
hongmingjin
28f3536f6d Merge "Add owners for android accessibility team." 2020-11-30 20:23:11 +00:00
Brad Ebinger
3df3321925 Fix intdefs that were incorrectly defining "flag"
Fixes: 174238227
Test: docs only change, build success
Change-Id: I0f95aadd63ae315ffdf534e4579c4b8e64b94672
2020-11-30 10:55:41 -08:00
Selim Cinek
482089dbe8 Updating owners of SystemUI
Bug: N/A
Change-Id: Id5d106a62a5c8df2b233cfad4bdb22a6e575437a
Test: ensure new owners work
2020-11-30 18:47:59 +00:00
Hongming Jin
605dba983f Add owners for android accessibility team.
Test: N/A

Change-Id: I82e06f2124fa9151447446879d939fb2522b2adb
2020-11-30 10:32:29 -08:00
Tiem Song
eff0b0673c Update link for Permissions samples in Javadoc
Bug: 158042826
Change-Id: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Test: N/A
2020-11-30 18:17:43 +00:00
Patrick Rohr
9aabc50ec9 Add Restricted Mode Firewall Chain
Adding new allowlist firewall chain to support restricted networking
mode. See go/restricted-networking-mode.

Bug: b/157505406
Bug: b/170323408
Test: atest NetworkManagementServiceTest
Change-Id: I8e39b3d7b129ad74224d0c1311135b7b48f6514f
2020-11-30 18:36:02 +01:00
Patrick Rohr
73a74fa6dd Clean Up NetworkManagementService Tests
Cleaning up tests, so I can easily add more for restricted networking
mode.
I merged the NetworkManagementInternalTests with the
NetworkManagementServiceTests.

Test: atest NetworkManagementServiceTest
Change-Id: If8c3cc1883cfb2524eeb78e23165fc868130f0e7
2020-11-30 18:35:44 +01:00
Baligh Uddin
2228195331 Merge "Revert "Add OWNERS block to facilitate in migration"" 2020-11-30 17:21:25 +00:00
Lais Andrade
cc8210d370 Fix documentation of delay param in VibrationEffect.Composition
Change-Id: I9aca87e8d804d39ad61b651cc7653c8ef57e13e3
Fix: 150715908
Test: N/A
2020-11-30 16:46:18 +00:00
Janis Danisevskis
96a0716a8a Revert "Revert "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums""
This reverts commit efec091bcb01c0148dd48da6ef29d0d397ffa109.

Reason for revert: aosp/1513473 fixed the underlying issue That make this revert necessary.

Change-Id: Ic99a6d080b4b1140924cb89d44b1f650f283a28d
2020-11-30 16:30:02 +00:00
Baligh Uddin
add50828c6 Revert "Add OWNERS block to facilitate in migration"
This reverts commit 9e569671a3752c4edd95367f483355ad31fac8d4.

Reason for revert: atoms and associated protos have been migrated.  Removing migration block.

Change-Id: Ia1e4a73001ebc9509b8550c7957135172ce8938d
BUG: 167962588
Test: TH
2020-11-30 15:46:34 +00:00
Olof Axelsson
ed2716dd24 Fixed a race contidion in StorageManagerService
StorageManagerService#onVolumeStateChanged passes on a mutable
object to onVolumeStateChangedLocked and onVolumeStateChangedAsync.
This causes a race since the state of the object being passed can
be updated while onVolumeStateChangedAsync is processing it.

To fix this, a clone of the object is passed instead.

Bug: 174056195
Test: atest AdoptableHostTest
Test: atest com.android.tests.fused.host.FuseDaemonHostTest
Change-Id: I4de32279ae740544bd3abe33d788ebdbef1eab00
2020-11-30 15:45:43 +00:00
Baligh Uddin
86e53e5db7 Temporary apply OWNERS block for migration
BUG: 167962588
TEST: TH
Change-Id: Ia168658c499e19f99aac05cb379155669a3e1431
2020-11-30 15:34:58 +00:00
Lorenzo Colitti
6ec2a15480 Merge changes If2201f39,Ia1c366c5
* changes:
  Stop calling Vpn#updateCapabilities in CS.
  Stop accessing VPNs in checkConnectivityDiagnosticsPermissions.
2020-11-30 14:14:38 +00:00
Louis Chang
9233cb2be8 Merge "Revert "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums"" 2020-11-30 14:14:34 +00:00
Lorenzo Colitti
86d837daa8 Merge changes I982543cd,I41c3bf6c,Id3e5f6e1
* changes:
  Add a provider to VPN
  Small VPN cleanup
  Migrate VPN to the public NetworkAgent API.
2020-11-30 13:48:26 +00:00
Treehugger Robot
c954cae54b Merge "Keystore 2.0 SPI: Make LockSettingsService tolerate the Keystore 2.0 SPI" 2020-11-30 13:32:39 +00:00
Remi NGUYEN VAN
7f159cf640 Add ConnectivityManager.TYPE_PROXY to SystemApi
This follows other TYPE_* constants like TYPE_WIFI_P2P that are
@SystemApi or public.
TYPE_PROXY has a use-case for the system to set network policies based
on proxy network templates. Although network types are deprecated, that
use-case needs to be supported and significant amounts of network
management would need to be rewritten to stop using network types.

The constant needs to be API as ConnectivityManager is planned to move
out of framework.jar, so only its formal API will be available to the
system server.

Bug: 174436414
Test: m
Change-Id: I266ed6bc59f5eb72302afe14472c93933733c8f8
2020-11-30 19:23:45 +09:00
Remi NGUYEN VAN
8fe718ee81 Remove NATT keepalive from IpSecTransform
The code is unused, and based on ConnectivityManager#startNattKeepalive,
which is deprecated.

Bug: 174436414
Test: atest FrameworksNetTests
Change-Id: I08c6c1baec668a304d971bb6f2328891a5611e6a
2020-11-30 17:24:10 +09:00
Remi NGUYEN VAN
caeabd308e Use IPV6_MIN_MTU from NetworkConstants in Ikev2Vpn
Instead of sharing the constant from LinkProperties, use the already
defined constant in the NetworkConstants class.

This allows Ikev2VpnProfile to allow depending on non-public
LinkProperties APIs, as LinkProperties is planned to move to
framework-connectivity.

Bug: 174436414
Test: m
Change-Id: I594bb7e81bc7681799c16eff621a5ffd1b29624c
2020-11-30 17:18:51 +09:00
Louis Chang
efec091bcb Revert "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums"
This reverts commit 2a66fc61448d690991b92a952aa709d2a166b8ac.

Reason for revert: b/174445211

Change-Id: I286327d8db19d50d3dd9602a2d0bd368d331c0c4
2020-11-30 07:36:55 +00:00
Chalard Jean
fc26c8a99c Add a provider to VPN
Test: FrameworksNetTests NetworkStackTests
Change-Id: I982543cdee358bb62d3b56a7fd9d71dc18908b65
2020-11-30 16:15:19 +09:00
Chalard Jean
871782deca Small VPN cleanup
Test: FrameworksNetTests
Change-Id: I41c3bf6c20fb01d4342388b5415942d9df991fbd
2020-11-30 16:15:18 +09:00
Chalard Jean
05f12dff8e Migrate VPN to the public NetworkAgent API.
On top of being a cleanup this is useful for the S Network
Selection project that will need to enrich the Network
Agent API, and as such should not have to support legacy
agents.

Test: FrameworksNetTests NetworkStackTests
Bug: 167544279
Change-Id: Id3e5f6e19829c64074cd6a52c5f950cee56b860b
2020-11-30 16:15:18 +09:00
Aaron Huang
7dd09ff253 Migrate Slog to Log used in connectivity service module
Connectivity service module uses Slog which is @hide so
migrate to Log, which is public, to remove hidden API usage.

Bug: 172050541
Test: FrameworksNetTests
      check log is moved from system buffer to main buffer.
Change-Id: I0dcc0e169b892cc872ed4510f699642cb81b633a
2020-11-30 14:35:01 +08:00
Jin Seok Park
d83734ed8b Add context to customization class constructors
Context may be needed to obtain extra information.

Also fix bug where exception is thrown when
MediaKeyDispatcher#getOverriddenKeyEvents is not overridden in the
custom MediaKeyDispatcher class.

Bug: 168579449
Test: build and manually check that custom classes are being
      instantiated through reflection.
Change-Id: Iadc1e7cbeb0f5349e1b7dfde711f53947ea04a05
2020-11-30 13:52:28 +09:00
Remi NGUYEN VAN
a1bef5bbc2 Do not query CS in NetworkProvider constructor
ConnectivityService may not be available in a NetworkProvider
constructor, if it is created (but still unused) before
ConnectivityService starts.

As ConnectivityManager is only necessary in
declareNetworkRequestUnfulfillable, which should not be called often,
just query ConnectivityManager at that point.

This is necessary for VcnManagementService, which is started before
ConnectivityService and creates its NetworkProvider in its constructor.
Fortunately VcnManagementService does not call
declareNetworkRequestUnfulfillable at this point.

ConnectivityManager may be migrated to classic service getters that
cache "null" when the service was not available the first time it is
queried, so no system service must query it before it starts.

Bug: 171540887
Test: atest FrameworksNetTests:NetworkProviderTest
Change-Id: I8dadcd0e1360a9464192f330493e13aa69dd9fe2
2020-11-30 12:42:15 +09:00
Remi NGUYEN VAN
5bb92b786b Run OemNetworkPreferencesTest with DevSdkIgnoreRunner
The class-level @IgnoreUpTo annotation only applies with that runner.

Change-Id: I065618f2345c1d91de2fa1f2f558e5ed5b066f3e
Fixes: 174268969
Bug: 171505922
Test: atest FrameworksNetTests:android.net.OemNetworkPreferencesTest
2020-11-30 01:42:24 +00:00
Treehugger Robot
4450ca52cb Merge "Adding @IgnoreUpTo to OemNetworkPreferencesTest" 2020-11-30 01:38:19 +00:00
James.cf Lin
d079881059 [RCS UCE] Modify the data type of parameter retryAfter from String to long
The data type long to indicate that how long the request can be retried again.

Bug: 173175176
Test: build pass
Change-Id: I22275e8259950a3efd247b3c906392a41d0ca2f1
2020-11-30 00:56:32 +08:00
Chris Li
59a5167438 Merge "[DO NOT MERGE]Fix IndexOutOfBoundsException for TDA stack" 2020-11-29 06:47:44 +00:00
Lorenzo Colitti
dccf7eda5e Merge changes from topic "networkagent-set-underlying-networks"
* changes:
  Stop accessing VPNs in getAllVpnInfo.
  Clear calling identity in registerNetworkAgent.
  Allow tests to create TRANSPORT_TEST|TRANSPORT_VPN networks.
  Move applying underlying caps from Vpn to ConnectivityService.
2020-11-28 02:49:53 +00:00
Chris Li
aee29007cf [DO NOT MERGE]Fix IndexOutOfBoundsException for TDA stack
Before, it used DC.getStackCount() to loop TDA stacks, which caused
issue when there are multiple TDAs.

Bug: 173823058
Test: manual
Change-Id: I60bcf72c37b2f90fc655566022a107a75b49966a
2020-11-27 23:05:29 +00:00
Janis Danisevskis
136fcd2a56 Merge "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums" 2020-11-27 20:25:47 +00:00
Nikita Ioffe
2e1432b902 Merge "Minor tweaks to UserspaceRebootLogger" 2020-11-27 19:30:18 +00:00
Almaz Mingaleev
ebec38b952 Merge "Prepare to make time detection more configurable" 2020-11-27 18:36:25 +00:00
Nikita Ioffe
b76b3923a1 Minor tweaks to UserspaceRebootLogger
* Add method name to all Slog.wtf() calls
* Do not Slog.wtf in shouldLogUserspaceRebootEvent method
* Also added OWNERS for UserspaceRebootLogger.java

Test: device boots
Test: no UserspaceRebootLogger logs in logcat
Test: atest CtsUserspaceRebootHostSideTestCases
Change-Id: Ifc2a13957157838dade3701f0b35dad51d26ec45
2020-11-27 17:06:09 +00:00
Neil Fuller
10158975ba Prepare to make time detection more configurable
Prepare to make time detection more configurable. This change introduces
an idea of origin ordering ("priority") so that different partners and
form factors can modify the previously hardcoded ordering of "telephony
(NITZ) first then network (NTP)".

This commit also modifies the name of the method used to trigger a time
detection cycle after a config change. It's possible partners may want
to make the priority originate from a setting rather than static config
(i.e. so the partner can pick between origins or origin orders). This
would involve more work than currently planned, but it is easy to make
the method name less specific.

Bug: 172230856
Test: treehugger
Test: atest TimeDetectorStrategyImplTest
Merged-In: Id1652be174b7503618e0b802dc7da4d00df4f248
Change-Id: Id1652be174b7503618e0b802dc7da4d00df4f248
2020-11-27 17:00:43 +00:00
Nikita Ioffe
23b7c01b64 Merge "Revert "Add context to customization class constructors"" 2020-11-27 14:30:14 +00:00
Nikita Ioffe
7e22f7a17b Revert "Add context to customization class constructors"
This reverts commit 824c4a9cf9454091ba7d517a2834053a90a38100.

Reason for revert: Potentially breaks presubmit b/174345105

Change-Id: Iafbe7cb7cc70c10f7f0e176fe3925529f59f824b
Bug: 174345105
2020-11-27 13:38:07 +00:00