529396 Commits

Author SHA1 Message Date
Lucas Lin
15c869f6ad Merge "Don't use @hide API - ConnectivityManager#getNetworkTypeName()" 2020-11-17 08:40:01 +00:00
Lucas Lin
d4235a815c Merge "Define and use default request in Ikev2VpnRunner" 2020-11-17 08:39:17 +00:00
lucaslin
3d4941b9c2 Define and use default request in Ikev2VpnRunner
Vpn might be included in ConnectivityService mainline module, so
it should prevent calling @hide API. Even if Vpn isn't included
in ConnectivityService mainline module eventually, it's still
fine to use local defined default request instead of calling
@hide API.
Ideally, ConnectivityManager will provide a new API which can
provide the status of physical network even though there is a
virtual network. b/147280869 is used for tracking the new API.

Bug: 172183305
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Test: Manual setup IKEV2 VPN connection.
Change-Id: If76e7497bef4890a74641695c3ebd395795bbe7f
2020-11-17 08:38:45 +00:00
Lucas Lin
f01b37a7c2 Merge "Separate 2 tests to verify canBeSatisfiedBy()" 2020-11-17 08:38:07 +00:00
lucaslin
ff493c4f0a Don't use @hide API - ConnectivityManager#getNetworkTypeName()
To prevent calling @hide API, print definition of network type
directly instead of calling @hide API.

Bug: 172183305
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Test: Setup a platform VPN and enable VPN always-on, then check
      the log.
Change-Id: I807e90537f706face51c5cc221490ea742d22a0e
2020-11-17 07:07:29 +00:00
Lucas Lin
464bc344a5 Merge "Fix the comments left on aosp/1481197" 2020-11-17 07:06:46 +00:00
Benedict Wong
03492715e8 Merge "Add stubs for VCN configuration management" 2020-11-17 02:17:21 +00:00
Treehugger Robot
aeb15e8592 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ...
* changes:
  Keystore 2.0 SPI: Install legacy Keystore provider as AndroidKeyStoreLegacy
  Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
  Keystore 2.0 SPI: Evolve the generator SPI.
  Keystore 2.0 SPI: Evolve Factory SPI
  Keystore 2.0 SPI: AndroidKeyStoreProvider loads keys from Keystore 2.0
  Keystore 2.0 SPI: Evolve the Crypto SPI.
  Keystore 2.0 SPI: KeyParameter utilities.
  Keystore 2.0 SPI: Update the chunked streamer.
  Keystore 2.0 SPI: KeyStoreCryptoOperationUtils
  Keystore 2.0 SPI: KeyStoreKeys adopt Keystore 2.0
  Keystore 2.0: Shim around the basic functionality of Keystore 2.0
  Keystore 2.0 SPI: Duplicate Keystore SPI to android.security.keystore2 package
2020-11-16 22:51:03 +00:00
Benedict Wong
4b140e2bd6 Add stubs for VCN configuration management
This change adds stubs for both the API and the internal binder
interfaces.

Bug: 163431877
Test: Compiles, boots
Change-Id: I11183d9fe3ad53944882b163eee5110e85898393
2020-11-16 13:29:34 -08:00
madym
febaec9f3e Merge "Remove mrenouf from Shell/OWNERS" 2020-11-16 19:18:17 +00:00
Yan Yan
e9226f999f Merge changes from topics "PersistableBundleUtils", "bytearray-utils", "integer-utils"
* changes:
  Support converting integer to/from PersistableBundle
  Support converting byte array to/from PersistableBundle
  Include PersistableBundleUtils in framework-ike-shared-srcs
  Add utils for converting Maps and ParcelUuid to/from PersistableBundle
  Add utilities to persist lists of Persistable objects
2020-11-16 17:41:44 +00:00
Aurimas Liutikas
e1bb600fc7 Merge "Remove legacy style metalava suppression" 2020-11-16 17:40:07 +00:00
Mady Mellor
5262ae0110 Remove mrenouf from Shell/OWNERS
Test: none
Bug: none
Change-Id: Ie0489dce898f33c52e8817b27d78a3f5a7aecabc
2020-11-16 08:07:40 -08:00
Anton Hansson
8cddd53381 Merge "Remove api-stubs-docs" 2020-11-16 12:55:09 +00:00
Inseob Kim
3661fc477c Merge "Remove obsolete property ro.kernel.android.tracing" 2020-11-16 11:01:22 +00:00
Ryan Mitchell
8f2f4e14de Merge "Fix DominatorTree for locale and mcc/mnc config" 2020-11-15 21:41:24 +00:00
Mehdi Alizadeh
ba6f395188 Merge "Adds owners to shortcuts related classes in framework" 2020-11-14 21:12:55 +00:00
Janis Danisevskis
4392c6977c Keystore 2.0 SPI: Install legacy Keystore provider as AndroidKeyStoreLegacy
With this patch we install the old Keystore provider as
AndroidKeyStoreLegacy when the Keystore 2.0 provider is installed as
AndroidKeyStore. This allows system components to keep using the old
keystore while we can run CTS tests against the new provider.

The tests are still mostly failing at this point. Installing the new SPI
can be enabled by setting the property
ro.android.security.keystore2.enable=true

Bug: 159476414
Test: This enables running CTS tests against Keystore 2.0.
Change-Id: I9731d9783ccf8f2705a5ca7335e00c8f4c8debba
2020-11-13 19:55:41 -08:00
Janis Danisevskis
6180e85e36 Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
This patch makes Zygote install the Keystore 2.0 SPI as
"AndroidKeyStore" and the old Keystore SPI as "AndroidKeyStoreLegacy"
if the platform property ro.android.security.keystore2.enable is
set to true. This allows us to boot Android with vital components, such
as LockSettingsService, still using the legacy Keystore, while we run
CTS tests against the new implementation, migrate other system
components, and perform migration tests.

This CL will be superseded by a CL that makes Zygote install the
Keystore 2.0 SPI exclusively when the migration of all dependent
components is complete.

Bug: 171305684
Test: None
Change-Id: I9e32578285167c4d63f4f536a07fe98473a883e0
2020-11-13 19:55:41 -08:00
Janis Danisevskis
940e05164e Keystore 2.0 SPI: Evolve the generator SPI.
We delegate the generation of self signed certificates to the KeyMint
backend. Also we use the KeyParamter AIDL type instead of
KeymasterArguments to construct parameter lists.

Bug: 159476414
Test: None
Change-Id: I441a4d4df4ef04e3da8aeaff3274c609d549c979
2020-11-13 19:55:41 -08:00
Janis Danisevskis
e6495d774b Keystore 2.0 SPI: Evolve Factory SPI
We no longer need to get the key characteristics from the Keystore
daemon to construct the KeyInfo for a key. Also we have to extract the
key info from the KeyParameter AIDL type rather than from the hand
written KeymasterArguments.

This patch also exposes the correct security level for a key through
KeyInfo.

Bug: 159476414
Test: None
Change-Id: I86a85e481e19fdadfed38a42aeac4ffe5f8b83fa
2020-11-13 19:55:40 -08:00
Janis Danisevskis
38ab78f0a0 Keystore 2.0 SPI: AndroidKeyStoreProvider loads keys from Keystore 2.0
This patch adjusts the AndroidKeyStoreProvider to register all services
with the correct packages names. And the utility functions load key
using the correct Keystore 2.0 methods.

Bug: 159476414
Test: None
Change-Id: I9268fd66d28e89e188e85991bcf90c7f19809232
2020-11-13 19:55:40 -08:00
Janis Danisevskis
4545933da5 Keystore 2.0 SPI: Evolve the Crypto SPI.
This patch evolves the Crypto SPI to use the new Keystore 2.0 shim.
The main changes are:
 * The SPI uses the AIDL defined KeyParameter instead of
   KeymasterArguments.
 * Operations are created directly from the KeystoreSecurityLevel that
   is part of the AndroidKeyStoreKey object.

Also this patch deletes the DeletatingX509Certificate class. This is no
longer needed, because public key operations are no longer performed by
Keystore 2.0. We can delegate public certificate operations simply by
wrapping such certificates into public keys that are understood by other
providers, such as BouncyCastle.

Bug: 159476414
Test: None
Change-Id: Ice874a8121d80bf788da059b4e8420c7dd799d81
2020-11-13 19:55:40 -08:00
Janis Danisevskis
4be5005c05 Keystore 2.0 SPI: KeyParameter utilities.
The wire type for key parameters is now generated from AIDL rather than
the hand written parcelable KeymasterArguments. So we need some of the
utilities for creating key parameters that the latter provided.
We also nicked some utility function from KeymasterUtils.

Bug: 159476414
Test: None
Change-Id: I12c674b6a00dd3abbed4972d80ceb766a73881e8
2020-11-13 19:55:40 -08:00
Janis Danisevskis
4ba9a09bdd Keystore 2.0 SPI: Update the chunked streamer.
This patch makes the chunked streamer observe the simplified
Keystore 2.0 operation interface. Keystore is now required to consume
all supplied data or reject data outright if too much (more than 32KiB)
is supplied in a single transaction. This allows for a simplified
streamer logic and a simplified interface. We also no longer send
entropy to Keystore. This will be handled by the Keystore 2.0 daemon.

Test: None
Bug: 159476414
Change-Id: Ie75d10fd5d5ac0da60e23e35467d0a7873230dea
2020-11-13 19:55:40 -08:00
Janis Danisevskis
27ee56c021 Keystore 2.0 SPI: KeyStoreCryptoOperationUtils
Keystore 2.0 does no longer report an error code if an operation
requires user authorization. Instead this is indicated by sending us
an operation challenge. In that case we have to check if the
authorization can possibly succeed. We changed the utility class by
adding a predicate function that checks exactly that, and we handle
other errors separately instead of having one exception handling path
that does all.

Test: None
Bug: 159476414
Change-Id: I9a373cf8f0a0b181df54c26fe314d71b6835bb97
2020-11-13 19:55:39 -08:00
Janis Danisevskis
e5795a90db Keystore 2.0 SPI: KeyStoreKeys adopt Keystore 2.0
KeyStoreKeys can now be constructed from key entry metadata and key
descriptors as defined by the new Keystore AIDL spec.
AndroidKeystorePublicKey can now create the private key proxy.
KeyStoreKeys also cache the key characteristic, which should drastically
reduce the frequency by which the SPI has to call into the Keystore 2.0
daemon.

Test: None
Bug: 159476414
Change-Id: Ia0a7841582621897760be49d39dd5442b70b3aa0
2020-11-13 19:55:39 -08:00
Janis Danisevskis
ebd964a086 Keystore 2.0: Shim around the basic functionality of Keystore 2.0
This patch adds a shim around the Keystore 2.0 AIDL spec. The new shim
is modularized like the AIDL spec into the base Keystore module
Keystore2, the security level specific interface KeystoreSecurityLevel,
and the operation specific interface KeystoreOperation.

Other system maintenance specific interfaces have yet to be added.

Bug: 159476414
Bug: 171305684
Test: None
Change-Id: I070f73739e4b37ce10568939ac666e40b14a52a8
2020-11-13 19:55:39 -08:00
Yan Yan
cfb6847e33 Support converting integer to/from PersistableBundle
This CL is for facilitating converting Map and List that
contains integer type objects.

Bug: 163604823
Test: PersistableBundleUtilsTest(new tests added)
Change-Id: I24239caf70035e19c3fb5eb4a85b6a0c6ccadb5a
2020-11-13 22:52:29 +00:00
Yan Yan
42444745fc Support converting byte array to/from PersistableBundle
Test: FrameworksVcnTests:PersistableBundleUtilsTest(new tests added)
Change-Id: I1d700c9b6d10a40ef43abcab449d4b07d897f0ec
2020-11-13 22:52:19 +00:00
Yan Yan
a3e954ffda Include PersistableBundleUtils in framework-ike-shared-srcs
Bug: 163604823
Test: FrameworksIkeTests, CtsIkeTestCases
Change-Id: Iee38086e122293f59ae14d3350f45a63671e8566
2020-11-13 22:51:59 +00:00
Yan Yan
296c895e10 Add utils for converting Maps and ParcelUuid to/from PersistableBundle
This commit expands the PersistableBundleUtils by adding maps.
LinkedHashMap is used in an attempt to preserve ordering where stability
is important.

Similarly, this commit adds the ability to persist ParcelUuid(s) via
conversion to Strings.

This commit also adds a helper method to safely read and write to and
from disk

Bug: 163611304
Test: New tests added, passing
Change-Id: Ife24e94006445007be68ab0e03f27b2fd5643aa2
2020-11-13 14:49:29 -08:00
Yan Yan
b92cbc787e Add utilities to persist lists of Persistable objects
This change adds a utility class to enable persistance of Lists of
objects.

The PersistableBundle class does not currently support lists or arrays
of PersistableBundles, presumably due to the potential for key
conflicts. The utility classes added here avoid that concern by
nesting all lists as separate persistable bundles.

Bug: 163594033
Test: New PersistableBundleUtilsTest added, passing
Change-Id: I89478cf0d05d41a4b0d769de4859421061a1f1d9
2020-11-13 13:48:30 -08:00
Janis Danisevskis
f88d3a4b27 Keystore 2.0 SPI: Duplicate Keystore SPI to android.security.keystore2 package
This patch copies the relevant portion of the Keystore SPI to the new
package name android.security.keystore2. The purpose of this is to
illustrate the evolution from the existing Keystore SPI to the
Keystore 2.0 SPI while keeping the existing Keystore SPI intact.
Reviewers are advised to check the equivalence of this code to the
corresponding files in
    android/security/keystore (<-- no 2 here).
Subsequent patches can them be reviewed as evolution towards the new SPI
rather than completely new code.

Test: None. When the evolution is complete, Keystore CTS tests can be
used to check for regressions.
Bug: 159476414

Change-Id: I21a01a679e789868ce820b5f73221e616a456a61
2020-11-13 11:01:47 -08:00
Beth Thibodeau
dd1a016568 Merge "[DO NOT MERGE] Use loadDrawableAsUser in MediaDataManager" 2020-11-13 16:35:49 +00:00
Anton Hansson
51861e70e5 Remove api-stubs-docs
Remove the build rule for updating api/current.txt and other files,
which makes it easier to remove the txt files themselves.

Bug: 171029603
Test: m nothing
Change-Id: I987fd9f6075d0f7c6817f16bf7282c6239afb7db
2020-11-13 11:31:36 +00:00
Inseob Kim
56ab231a8f Remove obsolete property ro.kernel.android.tracing
Bug: 173179120
Test: build
Change-Id: If46e65dac70ab4f1835048dbbcc8b571ce598224
2020-11-13 19:39:02 +09:00
Shuo Qian
5815e26b3a Merge "Add TelephonyManager test hidden API for testing" 2020-11-13 08:34:37 +00:00
Treehugger Robot
f7d62644d6 Merge "Remove pi.append_native_lib_paths property" 2020-11-13 07:08:00 +00:00
Patrick Baumann
2288e2adff Remove pi.append_native_lib_paths property
This change removes the "pi.append_native_lib_paths" property added as a kill switch for a feature that has been out in the wild now for several releases now.

Change-Id: I21f9d158f60d0cf47e3631bb37ece711b3450494
Merged-In: I21f9d158f60d0cf47e3631bb37ece711b3450494
Fixes: 173103133
(cherry picked from commit 22efaa84228c277c436b4537a9189778c022fab5)
2020-11-13 13:27:59 +09:00
Aurimas Liutikas
bdd6c53abb Merge "Suppress all hidden abstract methods in constructable classes." 2020-11-13 02:56:37 +00:00
Aurimas Liutikas
d23189b998 Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Merged-In: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-13 02:56:20 +00:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Isak Lilja
36003d29f4 [DO NOT MERGE] Use loadDrawableAsUser in MediaDataManager
This fixes a SystemUI loopcrash when casting as a guest user.

Bug: 173026465
Test: Manual - install media app that can cast on guest user only,
      then cast from guest user.  SystemUI should not crash.
Test: atest com.android.systemui.media
Change-Id: I70f5de89a813c54a616eb701a02aa43272754580
2020-11-12 23:50:37 +00:00
Treehugger Robot
958c6e7ed7 Merge "statsd: Set min_sdk_version to "30"" 2020-11-12 23:47:15 +00:00
Brad Ebinger
c87a43111a Merge changes from topics "sip_transport_api_conn", "sip_transport_api_def"
* changes:
  AIDL Implementation of SipTransport API
  Add AIDL connections for SipDelegateManager
  Hidden SipTransport API definition
2020-11-12 23:02:49 +00:00
Shuo Qian
656ec3629e Add TelephonyManager test hidden API for testing
Test: atest
Bug: 172507765

Change-Id: I30a5b695770509dc803ab5623c75e653d40f4d11
Merged-In: I30a5b695770509dc803ab5623c75e653d40f4d11
(cherry picked from commit 53cfc4a8944c491934973d47f8c4503a5644b8ed)
2020-11-12 22:37:52 +00:00
Tyler Gunn
8185680306 Merge "Move offered RTP header extension types API." 2020-11-12 22:12:41 +00:00
Shuo Qian
83cc1b62f0 Merge "Introduce hasCompanionInCallServiceAccess API" 2020-11-12 21:51:29 +00:00
Sooraj Sasindran
eca4612629 Merge "Provide API to retrive dual connected bandwidth" 2020-11-12 21:34:48 +00:00