Merge "[pm] fix crash caused by race condition onUidGone" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a3aa00e29c
@@ -4311,7 +4311,12 @@ public class ComputerEngine implements Computer {
|
|||||||
if (Process.isIsolatedUid(uid)
|
if (Process.isIsolatedUid(uid)
|
||||||
&& mPermissionManager.getHotwordDetectionServiceProvider() != null
|
&& mPermissionManager.getHotwordDetectionServiceProvider() != null
|
||||||
&& uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
|
&& uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
|
||||||
uid = getIsolatedOwner(uid);
|
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 callingUserId = UserHandle.getUserId(callingUid);
|
||||||
final int appId = UserHandle.getAppId(uid);
|
final int appId = UserHandle.getAppId(uid);
|
||||||
@@ -4352,7 +4357,12 @@ public class ComputerEngine implements Computer {
|
|||||||
if (Process.isIsolatedUid(uid)
|
if (Process.isIsolatedUid(uid)
|
||||||
&& mPermissionManager.getHotwordDetectionServiceProvider() != null
|
&& mPermissionManager.getHotwordDetectionServiceProvider() != null
|
||||||
&& uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
|
&& uid == mPermissionManager.getHotwordDetectionServiceProvider().getUid()) {
|
||||||
uid = getIsolatedOwner(uid);
|
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 int appId = UserHandle.getAppId(uid);
|
||||||
final Object obj = mSettings.getSettingBase(appId);
|
final Object obj = mSettings.getSettingBase(appId);
|
||||||
|
|||||||
Reference in New Issue
Block a user