Merge "Fix NPE when removing policies." into udc-dev am: f76eaf9aa3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22616876 Change-Id: I9134dc7d5362715af78c5de518f74bf4729f331c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1066,6 +1066,11 @@ final class DevicePolicyEngine {
|
||||
* Removes all local policies for the provided {@code userId}.
|
||||
*/
|
||||
private void removeLocalPoliciesForUser(int userId) {
|
||||
if (!mLocalPolicies.contains(userId)) {
|
||||
// No policies on user
|
||||
return;
|
||||
}
|
||||
|
||||
Set<PolicyKey> localPolicies = new HashSet<>(mLocalPolicies.get(userId).keySet());
|
||||
for (PolicyKey policy : localPolicies) {
|
||||
PolicyState<?> policyState = mLocalPolicies.get(userId).get(policy);
|
||||
|
||||
Reference in New Issue
Block a user