Commit Graph

10918 Commits

Author SHA1 Message Date
Lucas Silva
2a92e01a83 Merge "Add internal API to PowerManager which allows napping when device is asleep." into tm-qpr-dev am: a13bb16268 am: 0ddce51ce5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20165504

Change-Id: Id7223aa20f51f153e5950060dd7f52a6d771dc2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 18:52:39 +00:00
Lucas Silva
0ddce51ce5 Merge "Add internal API to PowerManager which allows napping when device is asleep." into tm-qpr-dev am: a13bb16268
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20165504

Change-Id: I5810bf382dfe6063982544478be2b20fb50d8191
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 18:43:25 +00:00
Lais Andrade
842bbe0022 Merge "Update Vibrator documentation for support check methods." am: 669bfab549 am: aef7473d30 am: ee6ef24c82
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256077

Change-Id: I32de34c1e992ad30297bea40aaaa23a9259f1537
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 16:10:54 +00:00
Lais Andrade
ee6ef24c82 Merge "Update Vibrator documentation for support check methods." am: 669bfab549 am: aef7473d30
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256077

Change-Id: I828536bc2f5bf4adaf601970da93523c1fec1efa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 15:06:45 +00:00
Lais Andrade
aef7473d30 Merge "Update Vibrator documentation for support check methods." am: 669bfab549
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256077

Change-Id: Iaa8c45c265848faab5b1e12ad3b951746b06af0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 14:37:44 +00:00
Lais Andrade
ba35aa1ebf Update Vibrator documentation for support check methods.
Update documentation for methods areAllEffectsSupported and areAllPrimitivesSupported to explain the default behavior for empty queries. The behavior remains unchanged.

Change-Id: I23dd792af7e3ee2c70fec136fb7db4965a7195be
Fix: 237509304
Test: N/A
2022-10-17 12:37:30 +00:00
Winson Chiu
b41437f51f Merge "Move SystemConfig to services.jar" 2022-10-14 20:06:56 +00:00
Kean Mariotti
9b2784ac64 Merge "Add bugreport pre-dump functionality" 2022-10-14 06:54:01 +00:00
TreeHugger Robot
ceea5bfb21 Merge "Dedupe vibrator state in SystemVibrator callbacks" 2022-10-13 19:22:03 +00:00
Winson Chiu
9efbc1352b Move SystemConfig to services.jar
Migrates getDefaultVrComponents used by SettingsProvider and
adds a flag for hidden API enforcement to ApplicationInfo.

This removes any dependency on SystemConfig from core/ and
so it can be moved into services/core and exposed as a
mainline API.

This was done instead of exposing all of the methods through
SystemConfigManager, as that is designed for use across
processes, and it's more efficient to expose SystemConfig
directly for modules running in the server process.

Although VrManager is a nullable service, so getDefaultVrComponents
had to live there to simplify the logic and maintain the existing
behavior.

Bug: 236389629

Change-Id: I4c2b14e1d34aaf439ceb1a3f9c8207e5d39fa6c2
2022-10-13 15:54:15 +00:00
Lucas Silva
16d6ddde58 Add internal API to PowerManager which allows napping when device is
asleep.

This allows us to enter the dream directly while the device is off, instead of needing to wake the device before entering dream.

Bug: 246472225
Test: adb shell cmd dreams start-dreaming (while device asleep)
Test: atest PowerGroupTest
Change-Id: Id4634f3d5f7c3ae324f85f11a6991f0cab068a7d
2022-10-13 10:52:06 -04:00
Lais Andrade
e6aa36d092 Dedupe vibrator state in SystemVibrator callbacks
Add check for state change in SystemVibrator implementation for
OnVibratorStateChangedListener callbacks on devices with more than one
vibrator. The registered listener should be notified only once for
each state when any vibrator starts or stops vibrating.

Fix: 249727855
Test: android.os.VibratorTest
Change-Id: Ied46ad70186a2df1c7aa24ccf04e5e8e05824876
2022-10-13 13:56:05 +01:00
Kean Mariotti
615fb23f29 Add bugreport pre-dump functionality
Allow apps to trigger the dump of certain critical data, e.g. data stored in short
ring buffers that might get lost by the time a bugreport is requested.

Then, a bugreport request can specify whether the pre-dumped data should be used.

Fixes: 205138504
Test: atest com.android.os.bugreports.tests.BugreportManagerTest
Change-Id: I55c7b53e235ebf2baa694e6fdc4e4a321a459c8b
2022-10-12 11:49:44 +00:00
Suprabh Shukla
774a7e61c4 Adding uid attribution mechanism for kernel wakeups
BatteryStats currently only stores the reason it receives from the
suspend control service. Starting with this change, batterystats will
now try to attribute these wakeups in more detail.

IRQ style wakeups where there has been an IRQ from a device get a
well structured reason string from the kernel. CpuWakeupStats will parse
it to get irq devices and then use irq_device_map xml to map the wakeup
to possible pre-defined subsystems that may have caused it.

Different parts of the system can use these subsystems to report any
associated activity (not to be confused with the class
android.app.Activity) tha could have caused a wakeup. CpuWakeupStats
will then attempt to associate this information with any wakeup that
may have occurred due to an IRQ from the relevant device.

This change defines the "Alarm" subsystem, and relies on the device
overlay to map this subsystem to the rtc device that ultimately enables
waking up the CPU when needed to process a wakeup alarm. Whenever there
is a batch of wakeup alarms that is dispatched, alarm manager notifies
batterystats (and hence cpuwakeupstats) of this "activity", which will
then try to associate it with any temporally proximal wakeups that have
happened due to the rtc device.

Currently, the information supported is only the uids that have
requested or initiated the activity from the subsystem that should be
blamed for the wakeup. But this can be extended to include more enum
style codes to represent other information.

Test: atest FrameworksServicesTests:IrqDeviceMapTest
Test: atest FrameworksServicesTests:CpuWakeupStatsTest

Bug: 249370357
Bug: 195684213
Change-Id: Idfbba82e9c007b5c9f15b9fd785b9a96cb202572
2022-10-11 15:10:37 -07:00
Philip Junker
715cba5f63 Sync BatteryStats user activity types with PowerManager ones.
Add more logs when entering doze.

Bug: 243518837
Test: atest BatteryStatsTests
Test: atest PowerManagerServiceTest
Test: manually observe logs using logcat / adb bugreport

Change-Id: I234a999cf41da0346ce4d9f05663cae116b095a3
Merged-In: I234a999cf41da0346ce4d9f05663cae116b095a3
2022-10-07 08:17:41 +00:00
Dmitri Plotnikov
3416dc96f1 Merge "Add CPU time-in-state data to battery history" 2022-10-06 16:51:23 +00:00
Philip Junker
4928d74f0d Sync BatteryStats user activity types with PowerManager ones.
Add more logs when entering doze.

Bug: 243518837
Test: atest BatteryStatsTests
Test: atest PowerManagerServiceTest
Test: manually observe logs using logcat / adb bugreport

Change-Id: I234a999cf41da0346ce4d9f05663cae116b095a3
Merged-In: I234a999cf41da0346ce4d9f05663cae116b095a3
2022-10-06 12:32:48 +00:00
Dmitri Plotnikov
c70cff6ad7 Add CPU time-in-state data to battery history
Bug: 244623253
Test: atest FrameworksServicesTests:BatteryStatsHistoryTest

Change-Id: I12ca7e8951e00bcc264f74b84b14b1c51cb095a8
2022-10-05 18:36:16 -07:00
Hao Ke
7c4f30abe0 Merge "Update Parcel readLazyValue to ignore negative object lengths" into tm-qpr-dev am: 1616c18830 am: a7af799f90
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20111891

Change-Id: I05cb905d2d9c18035b59d2232a25930c2ad8198e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 21:28:39 +00:00
Hao Ke
a7af799f90 Merge "Update Parcel readLazyValue to ignore negative object lengths" into tm-qpr-dev am: 1616c18830
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20111891

Change-Id: I4217009290de35449c380f6636838e5870674d54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 20:36:26 +00:00
Hao Ke
1616c18830 Merge "Update Parcel readLazyValue to ignore negative object lengths" into tm-qpr-dev 2022-10-05 20:03:42 +00:00
T.J. Mercier
79825c6f2f Freeze package cgroup before killing
Apps are able to prevent their death by forking multiple processes
under different services and monitoring for the death of any of these.
When a child death is detected, the remaining process restarts the
terminating/terminated service before it's able to be killed itself.
This is now prevented by freezing the entire cgroup of the package to be
killed before killing the individual processes. After the kills are
completed synchronously, the cgroup can be unfrozen to allow for
restarts. Before freezing the cgroup, the binder interfaces of the
processes about to be frozen are also frozen to prevent indefinite
blocking by synchronous Binder callers.

Bug: 236708592
Bug: 148425913
Test: raven:/ $ monkey -p com.haok.nirvana 1
Test: bash arg: -p
Test: bash arg: com.haok.nirvana
Test: bash arg: 1
Test: args: [-p, com.haok.nirvana, 1]
Test: arg: "-p"
Test: arg: "com.haok.nirvana"
Test: arg: "1"
Test: data="com.haok.nirvana"
Test: Events injected: 1
Test: ## Network stats: elapsed time=14ms (0ms mobile, 0ms wifi, 14ms not connected)
Test: raven:/ $ ps -eo pid,uid,ppid,name|grep 10266
Test: 2499 10266   823 com.haok.nirvana
Test: 2577 10266   823 com.haok.nirvana:resident
Test: 2584 10266   823 android.media
Test: 2669 10266     1 app_d
Test: 2672 10266     1 app_d
Test: raven:/ $ am force-stop com.haok.nirvana
Test: raven:/ $ ps -eo pid,uid,ppid,name|grep 10266
Test: 1|raven:/ $
Test: atest PermissionControllerHostTest
Change-Id: I1718a9263a01d18da7e3d2e3771091cf8475e599
2022-10-05 00:49:39 +00:00
TreeHugger Robot
626dfc8928 Merge "Add proto output of battery usage stats" into tm-qpr-dev am: eb59079888
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20107348

Change-Id: I4edeb8faa2a1c6cd7d4c48522cece62645bfaaf7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-04 22:16:41 +00:00
Tim Murray
0b2c9f211f Merge "PowerManager: cleanup async traces" 2022-10-04 21:21:07 +00:00
Eric Biggers
fd8bf04f1f Merge changes from topic "sps-on-creation"
* changes:
  Make the CE key always be encrypted by the synthetic password
  Give all users SP-based credentials
  Unlock user keys from LockSettingsService only
2022-10-04 20:21:45 +00:00
Tim Murray
4bbe0cebf0 PowerManager: cleanup async traces
Merge WakeLock trace tracks into "WakeLocks" and SuspendBlocker tracks
into "SuspendBlockers" to create fewer tracks and make traces easier
to navigate.

Test: WakeLock/SuspendBlocker traces appear
Bug: 250614152
Change-Id: Ifadc31368d5ea3c5954aeef0d0d056a66ff94213
2022-10-04 10:55:38 -07:00
Hani Kazmi
8e01230dd2 Update Parcel readLazyValue to ignore negative object lengths
Addresses a security vulnerability where a (-8) length object would
cause dataPosition to be reset back to the statt of the value, and be
re-read again.

Bug: 240138294
Test: atest ParcelTest BundleTest AmbiguousBundlesTest
Test: manually ran PoC
Change-Id: I1ab1df6f2a802d8cdf02c89c12959b09d7b1a5c4
Merged-In: I1ab1df6f2a802d8cdf02c89c12959b09d7b1a5c4
2022-10-04 17:32:07 +00:00
Eric Biggers
d20b250477 Make the CE key always be encrypted by the synthetic password
Currently, whenever an LSKF isn't set, the CE key isn't encrypted by the
SP but rather by a non-auth-bound Keystore key.  This is inconsistent,
and it's preventing us from taking advantage of the secure deletion
support of Weaver (on devices that support Weaver), with the current
scheme relying entirely on rollback resistance support in Keystore.

Therefore, make the CE key always be encrypted by the SP-derived key.

To do this, encrypt the CE key by the SP-derived key when the SP is
initially created.  After the corresponding vold change, this will start
being the only time that the CE key is written to disk at all.

Also re-encrypt the CE key of existing users who don't have an LSKF, so
that we don't have to continue to support the legacy scheme.

Both operations are done via the new vold method setUserKeyProtection()
(accessed via StorageManagerService), which (re-)encrypts the CE key
using the given secret.  The CE key must be either not-yet-persisted or
default-encrypted.  This method replaces addUserKeyAuth(),
clearUserKeyAuth(), and fixateUserKeyAuth().

On the unlock side, make unlockUserKeyIfUnsecured() unwrap the SP and
unlock the CE key using it.  As this makes
tryDeriveVendorAuthSecretForUnsecuredPrimaryUser() no longer needed,
remove that too.

Test: atest com.android.server.locksettings && \
      atest com.android.server.am.UserControllerTest \
            com.android.server.pm.UserManagerServiceTest \
            com.android.server.pm.UserManagerTest
Test: Booted and rebooted Cuttlefish, both phone and auto builds
Test: Without the CLs in this topic, set up a Pixel 6 to have a user
      with an LSKF, a user with no LSKF or SP, and a user with an SP but
      no LSKF.  Upgraded to the CLs in this topic.  Checked log for
      the expected messages from LockSettingsService.  Verified that all
      the users can still be unlocked.  Verified that
      /data/system_de/$userId/spblob exists for all users, and that
      /data/misc/vold/user_keys/ce/$userId/encrypted_key exists but not
      a keymaster_key_blob file alongside it.  Verified that
      /data/system/locksettings.db contains
      migrated_all_users_to_sp_and_bound_ce=true.
Bug: 232452368
Change-Id: Ia753ea21bbaca8ef7a90c03fe73b66c896b1536e
2022-10-04 16:41:28 +00:00
Eric Biggers
3d5653e11e Unlock user keys from LockSettingsService only
In preparation for making the CE key of each user always be protected by
the user's synthetic password even when the user has no LSKF, make
LockSettingsService the sole caller of IStorageManager.unlockUserKey().

For the opportunistic secret-less unlock by UserController at user start
time, call a new method LSS.unlockUserKeyIfUnsecured().  For now this
method calls IStorageManager.unlockUserKey() with a null secret.  Later
it will unwrap the user's synthetic password if needed.

For the unlock via credential verification that is triggered by LSS,
make LSS call IStorageManager.unlockUserKey() before calling
IActivityManager.unlockUser(), rather than passing the SP-derived secret
to IActivityManager.unlockUser() for it to do the unlockUserKey().

Since neither the secret nor the token arguments to
IActivityManager.unlockUser() are used anymore, add a new method
IActivityManager.unlockUser2() that lacks these arguments.  Note that
method name overloading cannot be used because AIDL doesn't support it.

Test: atest com.android.server.locksettings && \
      atest com.android.server.am.UserControllerTest \
            com.android.server.pm.UserManagerServiceTest \
            com.android.server.pm.UserManagerTest
Test: Boot and reboot Cuttlefish
Bug: 232452368
Change-Id: I8971b92bb5055fca8e19e0f9d14e8f0a7022b453
2022-10-04 16:41:23 +00:00
Dmitri Plotnikov
eb91d0c6cd Add proto output of battery usage stats
Bug: 245832387
Test: adb shell dumpsys batterystats --usage --proto | \
      gqui from rawproto:- proto $ANDROID_BUILD_TOP/frameworks/base/core/proto/android/os/batteryusagestats.proto:android.os.BatteryUsageStatsAtomsProto --protoprint_annotations=no
Change-Id: I297f09892accf0d2adef41d4cbd384a505c9c189
(cherry picked from commit db0d388e48)
2022-10-04 01:01:45 +00:00
Jeff Sharkey
8ccb8be42f Handle accidental null arguments to Trace APIs.
We have @NonNull annotations, but not everyone is watching the warning
messages related to them.  Make the implementation a bit more robust
by swapping in the "(null)" literal when someone accidentally leaks
one through.

Bug: 249325721
Test: atest FrameworksCoreTests:TraceTest
Change-Id: Ic0f5a0236fbce88e086f3d68b2e5c6ed6b0aa33c
2022-10-03 15:34:51 -06:00
Michael Wright
5e009b253c Merge "Reconcile WorkSource parcel and unparcel code." 2022-10-01 12:32:04 +00:00
Nikhil Kumar
d4a001386b Remove associated profiles when removing a user
Modified remove user flow to delete the associated profiles when
deleting the user.

Test: atest UserManagerTest

Bug: 217758779
Change-Id: If0943cedd3892789f41cacbd4e0311fb9061b719
2022-09-30 14:51:03 +01:00
Steven Moreland
ccfc86ed79 Merge "Parcel: more stacks printed when recycle twice." am: 31075f2951 am: 97b1f3149b am: 72b727c7c7 am: f24decea67 am: 4d78aee579
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237374

Change-Id: I6554b3261b9f88e5e60e6bf8f8963d7d8f62f055
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 23:38:29 +00:00
Steven Moreland
4d78aee579 Merge "Parcel: more stacks printed when recycle twice." am: 31075f2951 am: 97b1f3149b am: 72b727c7c7 am: f24decea67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237374

Change-Id: Icc979e323fecac342eb5cd82d16895f81ddf0d7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 22:55:12 +00:00
Steven Moreland
72b727c7c7 Merge "Parcel: more stacks printed when recycle twice." am: 31075f2951 am: 97b1f3149b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237374

Change-Id: I186d0998a0dda2eb4eff7ee334c83a33a7c60625
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 21:44:29 +00:00
Steven Moreland
31075f2951 Merge "Parcel: more stacks printed when recycle twice." 2022-09-29 20:48:15 +00:00
Steven Moreland
cdb5f00ecb Parcel: more stacks printed when recycle twice.
We can print the second stack by default.

Bug: 243768096
Test: N/A
Change-Id: I49d4e72f87c15fc04ddf94a19ff8f76512b6ebbc
2022-09-29 01:00:47 +00:00
Juan Yescas
25b673f920 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da am: 12ffdf5523 am: 4b3bbca1c6 am: 1713d59d14
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: Ic19697f393bdde52e463eeb6b1f00c2cfb6dea53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 22:07:12 +00:00
Juan Yescas
ee06f03d35 Add method to parse the size in FileUtils am: 71e11ae9ba am: ab61310d91 am: 7158f0deaa am: 86b3d4dd2e am: 4a61cdf513
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192359

Change-Id: I39ec1d099c0fb27f91810b442e011f682f2a455f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 22:06:29 +00:00
Juan Yescas
1713d59d14 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da am: 12ffdf5523 am: 4b3bbca1c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: I539c176132222b3a024cb789ea7808dc386e6fe2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 22:00:06 +00:00
Juan Yescas
4a61cdf513 Add method to parse the size in FileUtils am: 71e11ae9ba am: ab61310d91 am: 7158f0deaa am: 86b3d4dd2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192359

Change-Id: I5eb67f191d7cf4406a35fb52aa73be893cffc396
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 21:59:56 +00:00
Juan Yescas
12ffdf5523 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: I872060fbb5e3d4ba311ed83c7be539e9925e573c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 21:02:01 +00:00
Juan Yescas
7158f0deaa Add method to parse the size in FileUtils am: 71e11ae9ba am: ab61310d91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192359

Change-Id: I01b5f1e175b412c67e0ada83bcd45be22e3af85a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 21:01:54 +00:00
Juan Yescas
7afbbec42f Add new field in MemoryInfo to get advertised memory size.
This API will get the advertised memory size from the bootloader parameter
passed to the kernel. The advertised memory size might be different from
the MemTotal value in /proc/meminfo. This could be due the original design
manufacturer (ODM) reserved part of the memory for the Trusted Execution
Environment.

Test: Run test caes
Bug: 231718727
Change-Id: I06494cb9013048d73a83f2180a9241c2259d46eb
2022-09-27 15:11:52 +00:00
Juan Yescas
71e11ae9ba Add method to parse the size in FileUtils
The method parseSize() will parse the strings that match
the regular expression:

  "^((\\s*[-+]?[0-9]+)\\s*(B|K|KB|M|MB|G|GB|Ki|KiB|Mi|MiB|Gi|GiB)\\s*)$"

For example: 12GB, +100MB, 23MiB.

It will return the size in bytes.

Test: atest
Bug: 231718727
Change-Id: Id4b9084d2ff8a0a8bd23ddb8a7e10dcf17391c49
2022-09-27 15:11:05 +00:00
Felipe Leme
b9e759bb68 Merge "Disabled support for profiles on secondary displays." 2022-09-26 22:36:11 +00:00
Michael Wright
63a336737a Reconcile WorkSource parcel and unparcel code.
Prior to this CL, WorkSources would Parcel their list of WorkChains as
-1 if null, or the size of the list followed by the list itself if
non-null. When reading it back in, on the other hand, they would check
if the size was positive, and only then read the list from the Parcel.
This works for all cases except when the WorkSource has an empty but
non-null list of WorkChains as the list would get written to the parcel,
but then never read on the other side.

If parceling a list was a no-op when empty this wouldn't be an issue,
but it must write at least its size into the parcel to know how many
elements to extract. In the empty list case, this single element is left
unread as the size is not positive which essentially corrupts any future
items read from that same parcelable.

Bug: 220302519
Test: atest android.security.cts.WorkSourceTest#testWorkChainParceling
Change-Id: I2fec40dfced420ca38e717059b0e95ee8ef9946a
2022-09-26 20:37:33 +01:00
Kweku Adams
9acefa4233 Merge "Drop invalid data." 2022-09-24 00:50:03 +00:00
Kweku Adams
666e8ac60a Drop invalid data.
Drop invalid data when writing or reading from XML. PersistableBundle
does lazy unparcelling, so checking the values during unparcelling would
remove the benefit of the lazy unparcelling. Checking the validity when
writing to or reading from XML seems like the best alternative.

Bug: 246542285
Test: install test app with invalid job config, start app to schedule job, then check logcat and jobscheduler persisted file
Change-Id: Ie817aa0993e9046cb313a750d2323cadc8c1ef15
2022-09-23 21:24:33 +00:00