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

Commit adbaa679 authored by Song Chun Fan's avatar Song Chun Fan Committed by Automerger Merge Worker
Browse files

Merge "[pm] fix crash caused by race condition onUidGone" into udc-dev am:...

Merge "[pm] fix crash caused by race condition onUidGone" into udc-dev am: a3aa00e2 am: e6bfe7de

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23678532



Change-Id: I0f30e4bf1cc9199292a92557254ebee9f51edb02
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b06cf219 e6bfe7de
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -4311,7 +4311,12 @@ public class ComputerEngine implements Computer {
        if (Process.isIsolatedUid(uid)
                && mPermissionManager.getHotwordDetectionServiceProvider() != null
                && uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
            try {
                uid = getIsolatedOwner(uid);
            } catch (IllegalStateException e) {
                // If the owner uid doesn't exist, just use the current uid
                Slog.wtf(TAG, "Expected isolated uid " + uid + " to have an owner", e);
            }
        }
        final int callingUserId = UserHandle.getUserId(callingUid);
        final int appId = UserHandle.getAppId(uid);
@@ -4352,7 +4357,12 @@ public class ComputerEngine implements Computer {
            if (Process.isIsolatedUid(uid)
                    && mPermissionManager.getHotwordDetectionServiceProvider() != null
                    && uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
                try {
                    uid = getIsolatedOwner(uid);
                } catch (IllegalStateException e) {
                    // If the owner uid doesn't exist, just use the current uid
                    Slog.wtf(TAG, "Expected isolated uid " + uid + " to have an owner", e);
                }
            }
            final int appId = UserHandle.getAppId(uid);
            final Object obj = mSettings.getSettingBase(appId);