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

Commit 789651e2 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Temporarily stop killing apps when OP_REQUEST_INSTALL_PACKAGES is denied." into qt-dev

parents 0286f756 acbba9e6
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -3243,23 +3243,8 @@ 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));
        }
        }
    };

    private void addObbStateLocked(ObbState obbState) throws RemoteException {