Commit Graph

560684 Commits

Author SHA1 Message Date
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
Almaz Mingaleev
d2dda0e8d3 Prioritise NTP over NITZ in time detection.
This change does not neglect NITZ. NITZ will be used if network
is not available for long enough so that previous NTP
suggestion becomes stale.

Before this change, if an NITZ time signal was available, it would be
given priority over an NTP-derived time.

After this change, if an NTP time signal is available, it will be given
priority over an NITZ-derived time.

This change modifies the default configuration of the system time
detector. It can be modified by partners altering the configuration
directly or by use of a build-time config overlay. The configuration can
not be influenced by users currently.

This change is being made because we have had reports over the years of
NITZ information being incorrect or inaccurate. Responsibility for
sending correct NITZ time lies with carriers and can even vary from cell
to cell on the same network. We assume NTP will be more consistent and
reliable, so we are modifying the default.

Testing plan: use `adb shell dumpsys time_detector` to see suggestions
history and what suggestion is currently being used.
One way to disable NTP suggestions is to turn off WiFi and cell data plan.
Other way is to remove "network" from config_autoTimeSourcesPriority
list in frameworks/base/core/res/res/values/config.xml.

Bug: 172230856
Test: presubmit only
Change-Id: I63e0b865eb454e6c368af846e6bcb3e1924a9d0f
2021-02-10 14:53:49 +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
Benedict Wong
acf7a30f3e Lazy-create IpSecTunnelInterface
With the Network(int) constructor moving to mainline, we cannot use the
constructor, and should just create the IpSecTunnelInterface lazily, at
first use.

Bug: 165827287
Test: atest FrameworksVcnTests
Change-Id: Ic01858e0f9c80d316676cfbae5edca114655c3fe
2021-02-09 21:22:27 -08: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
Janis Danisevskis
b660e617df Merge "Keystore 2.0 SPI: Fix various CTS failures." 2021-02-09 16:41:10 +00:00
Elliott Hughes
220091e16f Merge "Stop manually mixing /dev/hw_random." 2021-02-09 16:24:26 +00:00
Nathalie Le Clair
1d1c6ae770 Merge "Fix CEC init twice in normal boot" 2021-02-09 15:24:49 +00:00
Paul Duffin
0a31146013 Merge changes from topic "hiddenapi-without-fb"
* changes:
  Move hiddenapi tools used by build/soong into build/soong
  Fix lint errors in tools/hiddenapi
  Fix generate_hiddenapi_lists_test.py
2021-02-09 15:17:42 +00:00
Mohammad Samiul Islam
d1884a05b7 Prevent tests with reboot from running during presubmit
Test: test --test-mapping frameworks/base/tests/StagedInstallTest:presubmit
Change-Id: I6072544f0457b465bdc633233f96a10c2d7f1903
2021-02-09 14:50:59 +00:00
Daniel Bright
6bc0f7cda3 Hide NO_THROTTLE_EXPIRY_TIME
There is no reason to expose NO_THROTTLE_EXPIRY_TIME since
the fact that the apn was not throttle can be explicitly checked
for by checking the throttle type.

Test: N/A
Bug: 175092152
Merged-In: I8888fae0037fd04e1668ab51eff91dd2bcb5e057
Change-Id: I8888fae0037fd04e1668ab51eff91dd2bcb5e057
2021-02-09 05:25:47 -08:00
Lorenzo Colitti
20987c3175 Add a registerSystemDefaultNetworkCallback method.
This method allows internal components to track the system
default network. This differs from registerDefaultNetworkCallback
because that method sends callbacks for the default network for
the UID that called it. This may not be the system default
network, for example, when a VPN is up and applies to the UID.

Bug: 173331190
Test: new unit tests in ConnectivityServiceTest
Test: new unit tests in ConnectivityManagerTest
Test: new CTS tests in ConnectivityServiceTest
Test: new CTS tests in HostsideVpnTests in other CL in this topic
Change-Id: Id02748a2183f71b71ff2a53a580466b9dcecaa93
2021-02-09 20:58:28 +09:00
Paul Duffin
5c1f668da3 Move hiddenapi tools used by build/soong into build/soong
Bug: 177317659
Test: m nothing
      build/soong/scripts/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I72386e5343215864cd3af9c102fff16a5715b2ca
2021-02-09 10:43:57 +00:00
Paul Duffin
f16a93c5b2 Fix lint errors in tools/hiddenapi
Bug: 177317659
Test: tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I7fe52319a80d929d43fdec913d2e7f155de96549
2021-02-09 10:43:08 +00:00
Paul Duffin
2019bc53c2 Fix generate_hiddenapi_lists_test.py
This change fixes the following tests which were broken by a previous
change (change id I5e3c2f8d14524d59dd65d26ce5196efcc15d6d8e):
* test_assign
* test_parse_and_merge_csv

Bug: 177317659
Test: tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: If29c65794e258a3871269a0214a10980613542e6
2021-02-09 10:23:46 +00:00
Søren Gjesse
98f38749f6 Update test expectations with changed names of D8 synthetics
Test: FrameworksCoreTest:com.android.internal.os.LooperStatsTest
Bug: 179067442
Change-Id: I0403dd4eacb421be4527b0c730f04f6338c4160c
2021-02-09 09:56:53 +01:00
Junyu Lai
c2d6240642 Merge changes from topic "removeNI"
* changes:
  [FUI07] Stop making NetworkState with NetworkInfo from external callers
  [FUI06] Stop using NetworkInfo in NetworkState from external callers
2021-02-09 03:37:59 +00:00
Lorenzo Colitti
b0dfe1fb66 Switch SystemUI from IConnectivityManager to VpnManager.
The VPN code is moving out of ConnectivityService to a new
VpnManagerService. Update SystemUI to call into the new service.

Bug: 173331190
Test: manually verified key displayed in status bar when VPN comes up
Change-Id: Id2731a166b5d6783acb1c711a54604b69aa8c0d7
2021-02-09 11:48:51 +09:00
Rambo Wang
31083c40b9 Merge "Rename SignalThresholdInfo.Builder#setThresholdUnlimited" 2021-02-09 02:29:15 +00:00