From acbba9e681c74bcade4462b5b258418a83875e1f Mon Sep 17 00:00:00 2001 From: Sudheer Shanka Date: Fri, 24 May 2019 11:23:36 -0700 Subject: Temporarily stop killing apps when OP_REQUEST_INSTALL_PACKAGES is denied. Need to update tests which toggle this appop as part of the tests before changing this behavior. Bug: 133481508 Test: atest com.google.android.packageinstaller.install.gts.SessionTest Change-Id: I59ef56e4e0a559ab42081ea1343799afbfd64e0e --- .../java/com/android/server/StorageManagerService.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index bf56bc03b197..bbbec665020b 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -3243,22 +3243,7 @@ class StorageManagerService extends IStorageManager.Stub public void opChanged(int op, int uid, String packageName) throws RemoteException { if (!ENABLE_ISOLATED_STORAGE) return; - if (op == OP_REQUEST_INSTALL_PACKAGES) { - // Only handling the case when the appop is denied. The other cases will be - // handled in the synchronous callback from AppOpsService. - if (packageName != null && mIAppOpsService.checkOperation( - OP_REQUEST_INSTALL_PACKAGES, uid, packageName) != MODE_ALLOWED) { - try { - ActivityManager.getService().killUid( - UserHandle.getAppId(uid), UserHandle.getUserId(uid), - "OP_REQUEST_INSTALL_PACKAGES is denied"); - } catch (RemoteException e) { - // same process - should not happen - } - } - } else { - remountUidExternalStorage(uid, getMountMode(uid, packageName)); - } + remountUidExternalStorage(uid, getMountMode(uid, packageName)); } }; -- cgit v1.2.3-59-g8ed1b