Commit Graph

560596 Commits

Author SHA1 Message Date
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
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
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
Kholoud Mohamed
141033c6cc Merge "Add new permission KEEP_UNINSTALLED_PACKAGES" 2021-02-10 21:35:03 +00:00
Tianjie Xu
11b13adfb7 Merge "Add shell command to set package" 2021-02-10 21:23:53 +00:00
Tianjie Xu
eda5da6b92 Merge "Reset binder during unbinding" 2021-02-10 18:46:50 +00:00
Tianjie
dc2b792589 Reset binder during unbinding
On some rare case, we may encounter a DeadObjectException on wrap()
when a new test app is installed. This happens because we reuse the
binder from the previous bindToService() call. Always reset the
binder to make sure this doesn't happen.

Bug: 172780686
Test: run storeRebootEscrowKey twice

Change-Id: I36150ef39f870e38a5f1b4bd814465d70f8dbf85
2021-02-10 18:46:42 +00:00
Yan Yan
073c6fa957 Merge changes from topic "ike-bcp"
* changes:
  Ignore "android.net.ipsec.ike" <uses-library> tag
  Add IKE stub to main Android SDK
2021-02-10 18:41:41 +00:00
kholoud mohamed
9b6b3d9445 Add new permission KEEP_UNINSTALLED_PACKAGES
Created a new permission KEEP_UNINSTALLED_PACKAGES and
granted it to shell, this new permission will be used to expose
PM#setKeepUninstalledPackages as a testAPI, this is needed
to enable the new testing infrastructure to reinstall
removed packages between test runs as part of the state resetting.

Bug: 179682115
Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered
Merged-In: I2b262f3694478631d657cdbf088b6511072d4ff3
Change-Id: I2b262f3694478631d657cdbf088b6511072d4ff3
2021-02-10 17:58:50 +00:00
Treehugger Robot
ad688d3e8c Merge changes from topic "b/167709539"
* changes:
  Add total DMA-BUF heap pool size information to dumpsys meminfo
  Add total size of DMA-BUFs exported to 'dumpsys meminfo'
  Rename getIonMappedSizeKb to getDmabufMappedSizeKb
2021-02-10 17:37:30 +00:00
Calin Juravle
2fcf50c8ed Use the same reason for OTAs and First Boots
Quicken is now deprecated and there is no good reason to have OTAs
handled differently then first boots when it comes to the compiler
filter.

With this changes we will have:
- OTA and FirstBoot using pm.dexopt.first-boot reason
- BackgroudDexOptService# post-boot job using pm.dexopt.boot reason

Also, clean dalvik-cache pruning which is no longer a thing.

Test: m
Bug: 172114559
Change-Id: I75b388b211314bcc7cfee8d8394c3d81ffef2cc7
2021-02-10 09:30:29 -08:00
Benjamin Franz
efea156fe5 Merge "Add OWNERS file to core/java/android/app/compat" 2021-02-10 15:49:10 +00:00
Hai Shalom
c1e52b8003 Merge "Support for Terms & Conditions notification" 2021-02-10 15:36:58 +00:00
Søren Gjesse
e95ab5e3dd Merge "Update test expectations with changed names of D8 synthetics" 2021-02-10 15:21:00 +00:00
Serik Beketayev
80f8c777e1 [Mainline] android.system package APIs migration
By removing Int32Ref.

Bug: 177619520
Bug: 179703584
Test: mma
Change-Id: I9b63146ae563ed977f3112c9910f7a7c575de0b8
Merged-In: I9b63146ae563ed977f3112c9910f7a7c575de0b8
(cherry picked from commit 63be514478)
2021-02-10 12:34:46 +00:00
Daulet Zhanguzin
3f22cb1106 Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of
libcore

Bug: 154796679
Bug: 179703584
Test: Treehugger
Change-Id: I06aa9df929abb94f1d9354f57087a973be597a43
Merged-In: I06aa9df929abb94f1d9354f57087a973be597a43
(cherry picked from commit 734ab4902b)
2021-02-10 12:34:02 +00:00
Benjamin Franz
9d5d929b00 Add OWNERS file to core/java/android/app/compat
Bug: 174043039
Test: N/A
Change-Id: I308f85edee7b8e01f15e2ee632941bd29cd5d212
2021-02-10 10:47:17 +00:00
Lorenzo Colitti
250855cb84 Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo"
* changes:
  Stop using mVpns in getConnectionOwnerUid.
  Add a VpnTransportInfo object.
  Add a registerSystemDefaultNetworkCallback method.
2021-02-10 06:38:41 +00:00
Hridya Valsaraju
365ffff4b5 Add total DMA-BUF heap pool size information to dumpsys meminfo
Some DMA-BUF heaps maintain pools of pre-zeroed memory for faster
allocations. Print the total size of all DMA-BUF heap pools as part of
dumpsys meminfo and use the same in LostRam calculation.

Test: dumpsys meminfo
Bug: 167709539
Change-Id: Ifb61fe596c1a8fab1bd536ec904285e532629b71
Merged-In: Ifb61fe596c1a8fab1bd536ec904285e532629b71
2021-02-10 06:05:36 +00:00
Hridya Valsaraju
363d44d7a0 Add total size of DMA-BUFs exported to 'dumpsys meminfo'
When ION support is not detected, print the total size of DMA-BUFs
exported as part of dumpsys meminfo.

Bug: 167709539
Test: dumpsys meminfo
Change-Id: I3439a8f00cf1aef37e5043b505ed53d47a8a4756
Merged-In: I3439a8f00cf1aef37e5043b505ed53d47a8a4756
2021-02-10 06:05:02 +00:00
Hridya Valsaraju
6ae0be89b9 Rename getIonMappedSizeKb to getDmabufMappedSizeKb
The function is actually calculating the total mapped DMA-BUF memory.

Test: dumpsys meminfo
Bug: 167709539
Change-Id: I5c19dc604cf48c3d7ccbfd2d9a83ddd7b35f20d5
Merged-In: I5c19dc604cf48c3d7ccbfd2d9a83ddd7b35f20d5
2021-02-10 06:04:12 +00:00
Tianjie
6a0d50dd2e Add shell command to set package
Adds an override to set the resume on reboot service provider. This
is needed to run CTS test with fake implementation. Note we won't
change the implementation provider once the resume on reboot flow
starts.

Bug: 178014912
Test: adb shell cmd lock_settings set-resume-on-reboot-provider-package com.android.cts.encryptionap;
      check the implementation is found correctly

Change-Id: I4ed6d4f25f30b5c3db4e8776f6fe4a0cd1a2793c
2021-02-09 20:24:49 -08:00
Benedict Wong
c84bc1f13c Merge "Restrict Carrier Wifi while VCN is configured & privileged" 2021-02-10 03:27:58 +00:00
Benedict Wong
cebde1ed9a Restrict Carrier Wifi while VCN is configured & privileged
This change removes the NOT_RESTRICTED capability for Carrier Wifi. This
is done even if a VCN is in safe mode, but will ONLY be performed if the
VCN is provisioned, and has the appropriate carrier privileges to run.

This change also fixes a test bug where the NOT_VCN_MANAGED capability
was not present in the query to getUnderlyingNetworkPolicy(), and
therefore was incorrectly passing.

Bug: 163432273
Test: atest FrameworksVcnTests
Change-Id: Iecb827b5341bdeb93ef8692c1d62f0eaf9d416ba
2021-02-09 18:43:21 -08:00
Lorenzo Colitti
0b303f2d15 Merge "Switch SystemUI from IConnectivityManager to VpnManager." 2021-02-10 01:57:46 +00:00
Yan Yan
e4fc06b9db Ignore "android.net.ipsec.ike" <uses-library> tag
"android.net.ipsec.ike" is converted from a shared library to a jar
in boot classpath since S. This CL makes package manager to ignore
<uses-library name="android.net.ipsec.ike"> to avoid loading the
jar again from the app class loader.

Bug: 177266501
Test: build, flash, boot
Test: AndroidNetIpSecIkeUpdaterTest, PackageBackwardCompatibilityTest
Change-Id: I05c8c46f102b01945724077830dc9871ab407c1d
Merged-In: I05c8c46f102b01945724077830dc9871ab407c1d
2021-02-09 17:26:10 -08:00
Yan Yan
f8b973c3f6 Add IKE stub to main Android SDK
This CL is required for converting IKE from a shared library to
a jar in the boot classpath.

Bug: 177266501
Test: build, flash, boot
Change-Id: I10759d22eaba4861b7d7f283b551156f09f54675
Merged-In: I10759d22eaba4861b7d7f283b551156f09f54675
2021-02-09 17:23:55 -08:00
Cody Kesting
c5bc3bcd8f Merge "Fix PolicyListener testing surface." 2021-02-09 23:03:25 +00:00
Brad Ebinger
a7f8e8fe6e Merge "[RCS UCE] Expose the IMS RCS feature APIs" 2021-02-09 22:21:09 +00:00
Pavel Grafov
fd1b9aa4cd Merge "Make getKeyStoreForUid convert uid to namespace." 2021-02-09 20:48:04 +00:00
Cody Kesting
fecc2a3361 Fix PolicyListener testing surface.
This CL updates VcnManager to provide a test-only method for getting
currently registered VcnUnderlyingNetworkPolicyListeners. This is
preferrable over the current method, which accesses VcnManager's private
Map directly.

Bug: 8675309
Test: atest FrameworksVcnTests
Change-Id: I7afd60ff55868ae44bfa74910ae02daf8a81b107
2021-02-09 11:44:41 -08:00
Treehugger Robot
8ae2344540 Merge "Update idmap2_tests to really work host-side" 2021-02-09 19:17:27 +00:00
Lorenzo Colitti
9cc08edf1f Stop using mVpns in getConnectionOwnerUid.
Use data that is already available in ConnectivityService
instead.

The behaviour of the new implementation is slightly different
from Q and R code when the permission check fails.

- The old code would throw a SecurityException if an app that
  was not an active VPN called the method, and would return
  INVALID_UID if the connection belonged to a UID that was not
  subject to the VPN.
- The new code returns INVALID_UID in both cases.

This does not seem like a compatibility problem. The only case in
which the code throws SecurityException is if the app is not a
current VPN app, but the app already knows whether it is or not.
The docs don't mention that the method SecurityException, either.

Bug: 173331190
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Change-Id: If3d031e74df33b5c97e12ebf02272faac6769d50
2021-02-10 02:52:16 +09:00
Lorenzo Colitti
76e8a43e68 Add a VpnTransportInfo object.
This currently stores the VPN type and a session name, but can be
extended in the future.

Bug: 173331190
Test: added coverage in VpnTest
Test: added coverage in ConnectivityServiceTest
Test: added coverage in NetworkAgentTest
Change-Id: I450858a9fa332c8d896dbdb4c14337d5ec23677f
2021-02-10 02:52:16 +09:00
Daniel Bright
14d9b03781 Merge "Hide NO_THROTTLE_EXPIRY_TIME" 2021-02-09 17:17:55 +00:00
Julien Desprez
91e0330153 Update idmap2_tests to really work host-side
idmap2_tests is marked host_supported:true but use
a AndroidTest.xml config that can only work for device.

Deleting the explict config to rely on the auto-gen ones.
Adding unit_tests:true to run in presubmit

Test: presubmit, atest idmap2_tests --host
Bug: 179092189
Change-Id: I0b325abc6ce7fc6c777d070bb0fc0e9e8a7cdedd
2021-02-09 17:11:34 +00:00
Kohsuke Yatoh
3deb25243e Merge "Add tests/ApkVerityTest/OWNERS." 2021-02-09 16:52:24 +00:00