Commit Graph

560684 Commits

Author SHA1 Message Date
Kalesh Singh
f403b56267 Merge "Provide an interface to query dmabuf GPU allocations" 2021-02-13 02:35:06 +00:00
Cody Kesting
57211bc8f5 Use WakeupMesage for delayed events in VcnGatewayConnection.
This CL updates VcnGatewayConnection to use WakeupMessages instead of
sendDelayedMessage() for delayed events. This change allows for
VcnGatewayConnection to guarantee that all its messages are processed
while holding WakeLocks.

Bug: 178140973
Test: atest FrameworksVcnTests
Change-Id: If8182378fe2e9dad08df88a84934b21e22e25752
2021-02-12 16:27:06 -08:00
Cody Kesting
a4bec019a7 Acquire WakeLock while processing Gateway messages.
This CL updates VcnGatewayConnection to acquire a WakeLock when sending
a message to the Handler queue. After every message is processed, the
state will check for additional messages and release the WakeLock if the
queue is empty.

Bug: 178140973
Test: atest FrameworksVcnTests
Change-Id: Ib108c834833cc8feb2c92c9a6c60f218618225ec
2021-02-12 16:01:32 -08:00
Benedict Wong
cefc4f6864 Merge "Lazy-create IpSecTunnelInterface" 2021-02-12 23:11:01 +00:00
Rubin Xu
7ce00e0a16 Centralise logic for setting credential manager app
Bug: 179180345
Test: atest KeyChainTests
Test: m RunKeyChainRoboTests
Change-Id: I4290bccf5ae04de0d84c7091729e86704b937295
Merged-In: I4290bccf5ae04de0d84c7091729e86704b937295
2021-02-12 21:35:33 +00:00
Rubin Xu
ac5ee32091 Add DPM.getKeyPairGrants()
(Trimmed down version)

Bug: 179180345
Test: atest
com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest
com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest android.admin.cts.DevicePolicyManagerTest
Change-Id: Ieee1048b145fb8400eccbf32c054afc64b5d90c0
Merged-In: Ieee1048b145fb8400eccbf32c054afc64b5d90c0

Change-Id: Id1ab42ddbf04a3f6874ba5ce7eb937114d2194ef
2021-02-12 21:35:33 +00:00
Rubin Xu
0aa18af47d Add KeyChainService credential management app APIs
(Trimmed down version)

Bug: 179180345
Test: Manual Testing
      atest com.android.keychain.KeyChainServiceRoboTest

Change-Id: I00b7df27a92f6ee4f74546f892c83290fead1112
Merged-In: I00b7df27a92f6ee4f74546f892c83290fead1112
2021-02-12 21:35:33 +00:00
Rubin Xu
fd4c56d4d3 add MANAGE_CREDENTIALS appop
This is part of the work to support
a credential management app on
unmanaged devices.

Bug: 179180345
Test: atest android.appsecurity.cts.AppOpsTest

Merged-In: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
2021-02-12 21:34:53 +00:00
Yan Yan
8d659bb1ec Merge changes Ifc8ad902,I6d1b8d0e
* changes:
  [API] Expose IpSecTunnelInterface#setUnderlyingNetwork
  Update underlying network of IpSecTunnelInterface
2021-02-12 21:23:29 +00:00
Brad Ebinger
dd170ee3f3 Merge "Add the ability to send the feature tags associated with IMS registration" 2021-02-12 18:35:13 +00:00
Hridya Valsaraju
1ff4e91e6c dumpsys: Print total DMA-BUFs exported from the DMA-BUF heaps framework
This patch adds the total size of DMA-BUFs exported from the DMA-BUF
heaps framework to dumpsys meminfo.

Bug: 167709539
Test: adb shell dumpsys meminfo
Change-Id: I153721a0dc91ee5084a446ba1ce4f8ec9c51c4f0
Merged-In: I153721a0dc91ee5084a446ba1ce4f8ec9c51c4f0
2021-02-12 10:08:23 -08:00
Kalesh Singh
1a8d198b5b Provide an interface to query dmabuf GPU allocations
The DMA buffers mapped by GPU device(s) are already accounted for
in the total exported dmabuf size (ionHeap) size.

To remove GPU memory from lost RAM, provide an API to get only the
DMA buf memory mapped by the GPU device(s).

Bug: 176477627
Test: adb shell dumpsys meminfo
Change-Id: Ie72f46c8de026b143629406714f413677ce6693b
Merged-In: Ie72f46c8de026b143629406714f413677ce6693b
2021-02-12 10:07:30 -08:00
Anthony Stange
8b97ec7957 Add owners for contexthub framework code
Bug: 166846988
Change-Id: Id2b82d4df8083d4b70be2e27d31e32ead7ce7c75
Test: presubmits
2021-02-12 17:43:07 +00:00
Jeff Sharkey
a8a2198ddc Merge "Add owners for locksettings unit tests" 2021-02-12 16:12:41 +00:00
Rubin Xu
b64368f803 Add owners for locksettings unit tests
Bug: 174932174
Test: builds
Change-Id: I694e003100b76f9e7a69b8c0f10fb85e734232b7
2021-02-12 16:04:14 +00:00
Jeff Sharkey
bc447056c0 Merge "Add OWNERS file for ConnTestApp." 2021-02-12 15:54:56 +00:00
Sudheer Shanka
b632d34728 Add OWNERS file for ConnTestApp.
Bug: n/a
Test: n/a
Change-Id: I0c6730fdf7b9bf5ebd8c907cb8a71630725e67e6
2021-02-12 09:16:43 +00:00
Almaz Mingaleev
a36c8d2b6a Merge "Prioritise NTP over NITZ in time detection." 2021-02-12 08:10:37 +00:00
Treehugger Robot
da21df3a17 Merge "Remove unnecessary calls to JNIEnv::GetArrayLength" 2021-02-12 04:48:47 +00:00
James Mattis
0846b40040 Marking setOemNetworkPreference as @SystemApi
Marking setOemNetworkPreference in ConnectivityManager as @SystemApi.

Bug: 176496438
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I4681c88dc3a83f71c387b29610c33594e57cb43f
2021-02-11 20:38:21 -08:00
James Mattis
6f4a9ce808 Adding permission for OEM managed preferences
Adding CONTROL_OEM_PAID_NETWORK_PREFERENCE as a signature level
permission to allow an application to control OEM managed network
preferences.

Bug: 176496438
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk
Change-Id: Iee13e89f3931c7079c2d88cb57b249b1b1cf93ad

Change-Id: Id29cafe1eaf5dff8a0605cb2579204d9c77b7e70
2021-02-11 20:38:21 -08:00
James Mattis
82da6ad33d Implementation of setOemNetworkPreference
Main implementation of ConnectivityService.setOemNetworkPreference. This
covers the main requirements of this method including listener
functionality.

Bug: 176495594
Bug: 177101287
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I8d318ab07785e52dd84d6261fdea8f318dce9bc5
2021-02-11 20:38:18 -08:00
Remi NGUYEN VAN
c02c76e68a Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."
Revert submission 1579872-vcn07

Reason for revert: Possible culprit for b/179768816, broken ConnectivityControllerTest
Reverted Changes:
Id09b19c13:Address comments on aosp/1550755
I245bd69e0:[VCN07.1] Add test for bypassing VCN for non-inter...
I9936894b9:[VCN07] Bypass VCN for non-internet app accessible...

Change-Id: Ie5f8c3051fed40623e5d4705ac2243ef51a898bd
2021-02-12 04:09:15 +00:00
Treehugger Robot
564aecdefb Merge "Stop using Slog in QosCallbackTracker." 2021-02-12 04:03:12 +00:00
Lorenzo Colitti
9d2c3ee808 Stop using Slog in QosCallbackTracker.
This is not public API. Use Log instead.

Test: m
Fix: 172050541
Change-Id: I281831431e2edcf9a3b77122ad8736b94aa8e215
2021-02-12 01:40:06 +00:00
Suren Baghdasaryan
0c13c67158 Remove unnecessary calls to JNIEnv::GetArrayLength
Replace repeated calls to JNIEnv::GetArrayLength operating on the same
array with a cached value obtained once and then reused.

Bug: 165832481
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Id85f887a9a4dc8eeacbb047beca7ced49853484e
2021-02-12 01:12:44 +00:00
Suren Baghdasaryan
ca115f206a Merge "Extend getPssPid to report itemized memtrack values" 2021-02-12 01:11:55 +00:00
Suren Baghdasaryan
c17cbb303c Extend getPssPid to report itemized memtrack values
Currently getPssPid includes memtrack HAL reported values in the pss
calculation. This makes it impossible to get these values separately.
Extend this interface to include itemized memtrack values.

Bug: 165832481
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ieb7e1b79ad8ecae6023338d9992467952558e2bd
2021-02-12 01:11:39 +00:00
Daniel Bright
9379af7c56 Merge "Changed ApnThrottleStatus to ThrottleStatus" 2021-02-11 23:31:24 +00:00
Philip P. Moltmann
25ee5a7fb7 Merge "Remove me from OWNERS files" 2021-02-11 22:29:07 +00:00
Philip P. Moltmann
a8eb3d3e69 Remove me from OWNERS files
Test: n/a
Change-Id: I6113011e6ab0997285d5b7a86303fc60a3b98a2b
Exempt-From-Owner-Approval: Previously approved
2021-02-11 22:28:43 +00:00
Tianjie Xu
60edeec07e Merge "Delay loadEscrowData from locksettings" 2021-02-11 21:52:11 +00:00
Tianjie
1c98980d00 Delay loadEscrowData from locksettings
For server-based ror, we want to deplay loadEscrowData until
1. Binding to Gmscore works
2. Network is available

So we factor out the loadEscrowData to be called later in the
start sequence of system server. Also make the function async
so that we can retry on temporarily failures.

Bug: 172780686
Test: run server based ror

Change-Id: If71f8974f94eb1be2ab896e95601377196e01790
2021-02-11 21:52:01 +00:00
Daniel Bright
a5a88fd3e8 Changed ApnThrottleStatus to ThrottleStatus
* Changed verbiage to be more generic at request of the API council

Bug: 175092152
Test: make & flash
Merged-In: I8bec64b0c38be94bcd3f3b99bcebfb378384c970
Change-Id: I8bec64b0c38be94bcd3f3b99bcebfb378384c970
2021-02-11 13:02:19 -08:00
Janis Danisevskis
3faed136d5 Merge "Adding device ID attestation to KeyGenParameterSpec" 2021-02-11 20:03:01 +00:00
Brad Ebinger
8420894edc Add the ability to send the feature tags associated with IMS registration
- In order to better support UCE, allow the IMS registration update to
the framework to include the feature tags associated with the registration
so that this information can be used in SIP PUBLISH.

- Encapsulate other IMS registration attributes into a singlular class.

Bug: 177375635
Test: atest CtsTelephonyTestCases:ImsServiceTest
Merged-In: Id730e5e0c9322c2a845523f3b3901f3d899c3f1c
Change-Id: Id730e5e0c9322c2a845523f3b3901f3d899c3f1c
2021-02-11 19:59:16 +00:00
Benjamin Franz
360d60d523 Add versioning to app compat framework
With this change, callers can set overrides for specific versions of an
app. The framework falls back to default version when the given version
doesn't have an override set.

Bug: 174043039
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Test: atest PlatformCompatGating
Change-Id: Ib5ff67e752a9c5ee94b6e1dd664d324ab5bf4542
2021-02-11 18:33:45 +00:00
Lorenzo Colitti
fad82fdcf5 Check registering system default callback needs NETWORK_SETTINGS.
Also address a code review comment.

Bug: 173331190
Test: test-only change
Change-Id: Ia68f482af6d10af203bdbd4e14a12ae0b12bb6b5
2021-02-12 01:12:48 +09:00
Lorenzo Colitti
3dc6dbe80f Move VPN code from ConnectivityService to VpnManagerService.
ConnectivityService itself does not depend on mVpns or the Vpn
class any more. Most of this CL is simply moving code from one
class to another:

- Move the AIDL calls from IConnectivityManager to IVpnManager.
- Move the implementation from ConnectivityService to
  the new VpnManagerService.
- Move the APIs from ConnectivityManager to VpnManager, but
  temporarily maintain some shims in ConnectivityManager for the
  moved calls so that existing callers do not have to be modified
  in this CL.
- Update VpnService to call IVpnManager instead of
  IConnectivityManager.
- Move the code that registers the VpnManager service from
  ConnectivityFrameworkInitializer to SystemServiceRegistry.

Bug: 173331190
Test: atest HostsideVpnTests FrameworksNetTests CtsNetTestCases
Change-Id: I4911e2144df721a94fa00da9edf0dc372a7091c2
2021-02-12 01:12:24 +09:00
Lorenzo Colitti
f83d22b77d Add a skeleton VpnManagerService, and start it on boot.
This adds a lot of unused code but this should make it easier to
review subsequent CLs.

Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" succeeds
Change-Id: Ied379654a0c3ab6242d3125661fe30f322395059
2021-02-12 01:07:29 +09:00
Lorenzo Colitti
8e40a0623c Convert LockdownVpnTracker to NetworkCallbacks.
This will allow moving LockdownVpnTracker from the connectivity
to the VPN code. This requires moderate refactoring since it's
pretty tightly coupled to both.

In this CL:

1. Add an @hide API to tell ConnectivityService that legacy
   lockdown VPN is enabled. I chose not to use the existing
   setVpnRequiredForUids API because that method has specific
   semantics and because it will be required long term since
   it's used by non-legacy VPN types.

2. Instead of updating LockdownVpnTracker inline from the
   ConnectivityService handler thread, have it listen to
   NetworkCallbacks. This introduces an extra thread hop, but
   most of the interactions between the lockdown VPN and CS were
   via NetworkAgent, which is asynchronous anyway.

3. Add code to LegacyTypeTracker to send the extra
   CONNECTIVITY_ACTION broadcast for the underlying network type
   that is sent after the VPN connects. In order to do this, make
   Make LockdownVpnTracker specify its underlying network
   (via setUnderlyingNetworks) when it connects.

4. Reimplement LockdownVpnTracker#augmentNetworkInfo based on
   information that is available in ConnectivityService.

5. Remove the code in LockdownVpnTracker that counted errors.
   I think this code has not worked since lollipop, because
   ConnectivityService never sees NetworkInfo objects in state
   FAILED. This is because ConnectivityService only hears about
   NetworkInfo objects via NetworkAgents, and LegacyVpnRunner
   only registers its NetworkAgent when the connection succeeds.

Bug: 173331190
Test: passes existing tests in ConnectivityServiceTest
Change-Id: I66d18512882efd468ee0ecec61f28786a195b357
2021-02-12 01:07:29 +09:00
Lorenzo Colitti
5fb746fd88 Minor fixes to VpnTransportInfo.
This CL addesses comments on aosp/1570921.

Bug: 173331190
Test: new test coverage
Change-Id: Ie8e1bd63bb818a03f4b17402e1b365577ca034a2
2021-02-11 23:28:00 +09:00
kholoud mohamed
c5616b51d1 Exposed some testAPIs in NetworkPolicyManager
Exposed setRestrictBackground, getRestrictBackground,
and resolveNetworkId as testAPIs.

Bug: 179476736
Test: Verified that CTS tests can access the APIs.
Change-Id: Ida4603d55a30187c03e23c7af6ff229065597bab
2021-02-11 13:58:31 +00:00
Roland Levillain
2d29d2d82b Merge changes from topic "int32ref"
* changes:
  [Mainline] android.system package APIs migration
  Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
2021-02-11 12:05:36 +00:00
Grace Jia
f67a99fe60 Merge "Set default value of EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE true." 2021-02-11 03:23:42 +00:00
Treehugger Robot
8aad810051 Merge "Add OWNERS file for provider tests" 2021-02-11 02:28:40 +00:00
Calin Juravle
274d200460 Merge "Use the same reason for OTAs and First Boots" 2021-02-11 02:07:59 +00:00
Yan Yan
8cd28adbc5 [API] Expose IpSecTunnelInterface#setUnderlyingNetwork
This API is required to perform MOBIKE. This API allows an IPsec
peer to change the underlying network of its established IPsec
tunnel without re-establishing the tunnel.

Bug: 169855650
Test: atest IpSecManagerTunnelTest (new tests added)
Change-Id: Ifc8ad902cbfbe4ad07e715f2fef0faa1bf9d68f3
2021-02-10 14:52:18 -08:00
Yan Yan
b2d0ef2dd4 Update underlying network of IpSecTunnelInterface
Bug: 169855650
Test: atest IpSecManagerTunnelTest
Change-Id: I6d1b8d0e49f89c67ddc2caf4ba63fb0b1eb062c0
2021-02-10 14:51:43 -08:00
Tianjie
4090768b0a Fix format of helper msg
Test: TH
Change-Id: I19ecbe0605418485ab1f444dd4508d7755520648
2021-02-10 13:47:24 -08:00