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

Commit d2ebc10e authored by Hai Zhang's avatar Hai Zhang
Browse files

Fix NPE in AppOpsService.

UidState.pkgOps might be null when it is empty.

Test: presubmit
Fixes: 155148115
Change-Id: If931abd4484856fa77fbd402114d8c3b48f8d181
parent de717cbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3735,7 +3735,7 @@ public class AppOpsService extends IAppOpsService.Stub {
                    mHandler.sendMessage(PooledLambda.obtainMessage(
                            AppOpsService::notifyOpChangedForAllPkgsInUid,
                            this, code, uidState.uid, true, null));
                } else {
                } else if (uidState.pkgOps != null) {
                    final ArraySet<ModeCallback> callbacks = mOpModeWatchers.get(code);
                    if (callbacks != null) {
                        for (int cbi = callbacks.size() - 1; cbi >= 0; cbi--) {