and put a warning where it's not possible. This is to make sure we know
when to touch bundles provided by apps.
In this CL:
* deepCopy() now doesn't deserialize lazy objects before copying. It
doesn't copy them either, it merely passes them into the new map as
the same reference. This works because we implemented fine-grained
locking into each lazy value, so concurrent access won't be a problem.
Furthermore, LazyValue caches the deserialized object, so we'd still
honor the contract of deepCopy() that "Other types of objects (such
as Parcelable or Serializable) are referenced as-is and not copied in
any way". I had to perform one extra check in the synchronized block
in LazyValue to guarantee this (double-checked locking), I explain
that in the comments.
* Removed filterValues() and codepaths that used it. This was created
with the purpose of removing items whose classes weren't available to
the system to prevent crashes coming from full deserialization. This
is not a concern anymore with lazy bundle, hence we can remove the
codepaths altogether (see email for more details).
* Put warnings in javadoc of getMap() and PeristableBundle().
Test: Boots
Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I14bb6a7874814f42cbcc6b5fd372c42752aa74c8
Its existence allows implicit readParcelable calls to invoke a Parcel
operation with mismatched read/write data sizes, allowing someone to
swap out the data on a reparcel.
Internal classes will use writeIntentInfoToParcel, so this is safe to
remove.
Bug: 191055353
Test: atest com.android.server.pm.test.parsing.parcelling
Change-Id: I44faa635faf8a77894a3dda8adf89c10064e53f1
(cherry picked from commit 75214cc510)
Some devices may not have certain partitions available and the
OverlayConfigTests use hardcoded paths to test OverlayConfig
functionality. This change ensures that the temporary directory
created to test OverlayConfig has all of the partitions defined in
PackagePartitions#SYSTEM_PARTITIONS within it.
Bug: 187020117
Bug: 187020675
Test: atest OverlayConfigTest
Change-Id: I511e24b7ccfe82e6e89ceea7107457439793ef77
In device booting, PackageParser2 uses a thread
local ParseTypeImpl obj as shared result and reset
it before parsing everty time. But it doesn't reset
the target sdk version, which could make deferError
returned unexpected error, cause apk scaned failed
and deleted by the system.
Test: atest com.android.server.pm.parsing
Change-Id: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
Signed-off-by: liulvping <liulvping@xiaomi.com>
Pass additional parameters to ART to assist with better profiling
and debuggability.
Test: m
Bug: 182793486
Bug: 185979271
Change-Id: Iae0beab92194d75f191147578922c760f04470b9
The method is called by CTS helper app to list all java shared libraries
present on the device. All classes present in the reported jar/apk files
are then collected by a CTS/GTS EDI collector.
Bug: 187823488
Test: m
Change-Id: I750065112d70bc3ab45c8b6c6cc8aa4d429488a8
Remove other OWNERS from PackageParser.java to disallow future changes.
No new code should go into PackageParser.java except in extreme outlier
circumstances.
Change-Id: I2f663d2ae527beccbd47402492aa51d0cc6f6c13
* Rename nativeHeapZeroInit to nativeHeapZeroInitialized.
* nativeHeapZeroInitialized is a tri-state, so make it an @IntDef.
* Add documentation to some accessor methods, and missing @type
annotations.
* Add attrs_manifest.xml document for the new attributes.
Bug: 182165383
Bug: 182370211
Test: com.android.cts.tagging
Change-Id: Iad46a1da9bc040baf4c438afbc5fd8cd128e99f1
Merged-In: Iad46a1da9bc040baf4c438afbc5fd8cd128e99f1
These feature flags will hold the KeyMint version for the default and
StrongBox HALs. They can be used by apps to convey that they'll only
work on devices which have a recent enough version of KeyMint.
For example, if an application requires ECDH to be implemented in
Secure Hardware it can convey this requirement by indicated that it
needs FEATURE_HARDWARE_KEYSTORE >= 100. Or if it needs this in the
StrongBox it can use FEATURE_STRONGBOX_KEYSTORE >= 100. As with other
feature flags, this can be used to only show the app on devices which
satisfy such requirements.
Test: Compiles
Bug: 160616951
Change-Id: I582e50fba92de0d598d7e86fcc3b1b2b4a91b103
TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant
is necessary for the module to register the manager with
registerContextAwareService.
Bug: 171540887
Test: m
Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389
Merged-In: I0690251ddfcdaa8a34830e110b75869a370de389
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.
ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.
So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.
Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.
Bug: 182370679
Test: m update-api
Merged-In: I30b1b146dcae82926be7bdb8b343635a01eabefe
Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.
Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
memtagMode allows an app to opt in to MTE in either sync or async mode.
nativeHeapZeroInit enables automatic initialization of heap memory.
Both attributes default to off and can be specified at either
application or process level.
Bug: 135772972
Bug: 177438394
Bug: 178038272
Test: CtsTaggingHostTestCases
Change-Id: I6a481a9d2363997bf954f248d08224c79f0c2afb
Merged-In: I6a481a9d2363997bf954f248d08224c79f0c2afb
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.
Bug: 164459559
Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo
Merged-In: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
This allows apps to request that AndroidKeyStore generate attestation
keys that can be used to sign attestations of other keys that the app
generates or imports.
Bug: 163606833
Test: atest CtsKeystoreTests
Change-Id: I943a6922271cbe909cb3a9d67021663b5646aa70