summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src
diff options
context:
space:
mode:
author Bernardo Rufino <brufino@google.com> 2021-09-27 17:28:38 +0100
committer Bernardo Rufino <brufino@google.com> 2021-10-05 13:39:36 +0100
commit9e26212dac8bd00a4bd881ba87a0a5e7fb7ed921 (patch)
tree761bac3505e0cfe5c7e16fed277c2f0574dac9b8 /tests/DynamicCodeLoggerIntegrationTests/src
parentd3199a6084b8e7572a445f8d513d4ff533b679ce (diff)
Avoid full unparcelling where possible in Bundle
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
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src')
0 files changed, 0 insertions, 0 deletions