Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2514cf07 authored by Miriam Polzer's avatar Miriam Polzer
Browse files

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
parent 1c2633f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment