diff options
| author | 2025-02-18 11:41:24 +0000 | |
|---|---|---|
| committer | 2025-02-18 11:41:24 +0000 | |
| commit | 2514cf07c6b68d4b111f26febf448e61b639bba9 (patch) | |
| tree | 5f23e194f35c3e6aee981b51fe5fa12375267f01 /libs/androidfw/FileStream.cpp | |
| parent | 1c2633f9af68fc1671d13d617708f5532c18f07e (diff) | |
Save the user id when iterating mLocalPolicies
mLocalPolicies is a sparse array of user ids, whenever a new user is
added, the keyAt(i) function may return different results. To avoid
crashes or unexpected behavior, save the user id for subsequent calls.
Now when new users are added, we may skip iterating over them, or
iterate over the same user twice. This issue seems to exist in multiple
places in policy engine and I will take a look in a follow up.
Fix: 374511959
Test: atest com.android.cts.devicepolicy.ManagedProfileTest
Flag: EXEMPT BUG_FIX
Change-Id: Ifb34be2f33bc1e7c9b8cee3f8c26642766a5d101
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions