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

Commit c7e08f73 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Use killUid() instead of killApplication()." into rvc-dev am:...

Merge "Merge "Use killUid() instead of killApplication()." into rvc-dev am: 804ac87b am: f0df75e3 am: 7952ccfc" into rvc-qpr-dev-plus-aosp am: c07af446

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

Change-Id: Ie78a8277a18d62f47cc478a12161e15720770c10
parents 82a06dfe c07af446
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -4658,9 +4658,8 @@ class StorageManagerService extends IStorageManager.Stub
        private void killAppForOpChange(int code, int uid, String packageName) {
            final IActivityManager am = ActivityManager.getService();
            try {
                am.killApplication(packageName,
                        UserHandle.getAppId(uid),
                        UserHandle.USER_ALL, AppOpsManager.opToName(code) + " changed.");
                am.killUid(UserHandle.getAppId(uid), UserHandle.USER_ALL,
                        AppOpsManager.opToName(code) + " changed.");
            } catch (RemoteException e) {
            }
        }
@@ -4682,7 +4681,12 @@ class StorageManagerService extends IStorageManager.Stub
                                // results in a bad UX, especially since the gid only gives access
                                // to unreliable volumes, USB OTGs that are rarely mounted. The app
                                // will get the external_storage gid on next organic restart.
                                if (packageName != null) {
                                    killAppForOpChange(code, uid, packageName);
                                } else {
                                    // TODO(b/158283222) this can happen, figure out if we need
                                    // to kill in this case as well.
                                }
                            }
                            return;
                        case OP_LEGACY_STORAGE: