Remove hidden api for mainline project.
This commit is only for
getSystemConfigEnabledProfilesForPackage
because this will trigger a SEDenial
Bug: 190440540
Test: Manual
Tag: #refactor
Merged-In: Icb822ab703e7617d2c96275d94f682d30171998f
Change-Id: Icb822ab703e7617d2c96275d94f682d30171998f
* changes:
Hook the new APIs in StagingManager to PackageManagerNative service
Notify StagedApexObservers when there is a change in set of staged APEX
Open up new API in StagingManager to get information about staged APEX
Connect the new API from ApexService to ApexManager
Implement lazy deserialization for custom types in bundle:
* Parcelable (VAL_PARCELABLE)
* Serializable (VAL_SERIALIZABLE)
* Parcelable array (VAL_PARCELABLEARRAY)
* Lists (VAL_LIST)
* Sparse array (VAL_SPARSEARRAY)
* Bundle (VAL_BUNDLE)
This enhances security, makes bundles more robust to deserialization
errors and avoid deserializing unneeded objects in some cases*, for more
details check go/lazy-bundle.
To do that, we prefix those types with their length when writing them on
the wire. Map serialization and deserialization now happens inside
Bundle (instead of calling Parcel's readArrayMapInternal() /
writeArrayMapInternal()) and we use an intermediary object - LazyValue -
that holds information about the position and length of the value we
will deserialize when queried.
So, there are basically 3 states:
1. We received the bundle but haven't queried anything about it (not
even isEmpty()): in this case the original parcel is held inside and
we haven't attempted any deserialization (except for the metadata at
the beginning such as the magic, etc)
2. We queried something on it (eg. isEmpty()): Now we deserialize the
bundle skipping the custom values above (we're able to do this now
with the length written on the wire) and instead placing LazyValue
objects for them in the map.
3. We query one of the lazy values: Now, we deserialize the object
represented by LazyValue and replace it on the map.
Since after (2) LazyValue objects are the only ones holding references
to the original Parcel, when all LazyValues are deserialized, the
original Parcel is available for GC.
Inside bundle now we differentiate between unparcel(itemwise = true) and
unparcel(itemwise = false) where the first also deserializes each item
(such that there are no LazyValues in the map). This is because some
operations such as kindofEquals() need all items deserialized.
I had to break a few methods in parcel into multiple methods in parcel
to be able to control the format in bundle. They are all @hide.
* In quick local experiments, counting the bytes that didn't need to be
deserialized after the change. Roughly 10% of bytes from custom-type
items in Bundle are not deserialized in the testing scenario (if I
haven't messed up the stats :). That's on a sdk_gphone_x86_64_arm64 a
few minutes after boot. Check
https://screenshot.googleplex.com/53uXrrqDMYahzg3, stats collection is
on ag/15403076.
Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Test: Boot device
Bug: 195622897
Change-Id: Icfe8880cad00c3cd2afcbe4b92400ad4579e680e
* changes:
Hook the new APIs in StagingManager to PackageManagerNative service
Notify StagedApexObservers when there is a change in set of staged APEX
Open up new API in StagingManager to get information about staged APEX
Connect the new API from ApexService to ApexManager
This allows APEXes to include permission XMLs like the NFC XMLs in
frameworks/native/data/etc which declare NFC features.
(This also enables `unavailable-feature` declarations.)
Bug: 197680726
Test: Include an NFC permission XML in an APEX.
Observe feature is set correctly in logs and by
enabling NFC in Settings app.
Change-Id: Ied425b8897ab80df250d42cfbf0525634ed948aa
RawBytes should always be at least 1 to avoid division by 0 and
ArithmeticException resulting in Settings crash.
Bug: 197292638
Change-Id: I4e5ac9da7adf707d7f991483555ab5c6d0cc3245
The NDK is built out of internal *-release branches. Unfortunately, the
internal and external manifest attribute IDs don't currently line up.
As a result, NDK-built apps with memtagMode='[a]sync' won't turn on MTE
on AOSP images, but work in internal images.
We'd like NDK-built apps to work out of the box with AOSP images, and
so let's line up these IDs to fix the silent failure. This is especially
important as testing is mostly done using AOSP-on-QEMU.
RESTRICT AUTOMERGE because this should be an AOSP-only patch.
Bug: N/A
Test: Build the sanitizer test app
(https://github.com/google/sanitizers/tree/master/android) with an MTE
attribute and make sure you crash with MTE errors.
Change-Id: I48a3e08d01508dc6694fefd9563fb7d3f25108a9
This was missed in 133879b6836c0d00f2c89bf480e48bbe14cfb536.
Emergency number list is internally represented as Map<Integer,
List<EmergencyNumber>>, which is not supported by AIDL.
Bug: 192615532
Test: m
Change-Id: I5dc8b0f94b13b6625bb31933c6488dc87c9db713
Since TEST_MAPPING files can reference test suites flung far across
the source tree, allow anyone to make changes to them.
Bug: 174932174
Test: none
Change-Id: I11dd436ac55e516263a587f9f82b17ce56e9e2e2
Remove hidden api for mainline project.
This commit is only for
getSystemConfigEnabledProfilesForPackage
because this will trigger a SEDenial
Bug: 190440540
Test: Manual
Tag: #refactor
Merged-In: Icb822ab703e7617d2c96275d94f682d30171998f
Change-Id: Icb822ab703e7617d2c96275d94f682d30171998f