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

Commit cef89a47 authored by Sanjana Sunil's avatar Sanjana Sunil Committed by Automerger Merge Worker
Browse files

Merge "Do not verify client app uid and package when stopping the sandbox"...

Merge "Do not verify client app uid and package when stopping the sandbox" into udc-dev am: b736edc2 am: 2ba25f18

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



Change-Id: Ice41bb6639b97b8fe70022aab6d9572be7486b27
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1f187a2c 2ba25f18
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -17279,6 +17279,9 @@ public class ActivityManagerService extends IActivityManager.Stub
        public ComponentName startSdkSandboxService(Intent service, int clientAppUid,
                String clientAppPackage, String processName) throws RemoteException {
            validateSdkSandboxParams(service, clientAppUid, clientAppPackage, processName);
            if (mAppOpsService.checkPackage(clientAppUid, clientAppPackage) != MODE_ALLOWED) {
                throw new IllegalArgumentException("uid does not belong to provided package");
            }
            // TODO(b/269598719): Is passing the application thread of the system_server alright?
            // e.g. the sandbox getting privileged access due to this.
            ComponentName cn = ActivityManagerService.this.startService(
@@ -17345,6 +17348,9 @@ public class ActivityManagerService extends IActivityManager.Stub
                String processName, long flags)
                throws RemoteException {
            validateSdkSandboxParams(service, clientAppUid, clientAppPackage, processName);
            if (mAppOpsService.checkPackage(clientAppUid, clientAppPackage) != MODE_ALLOWED) {
                throw new IllegalArgumentException("uid does not belong to provided package");
            }
            if (conn == null) {
                throw new IllegalArgumentException("connection is null");
            }
@@ -17397,9 +17403,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            if (!UserHandle.isApp(clientAppUid)) {
                throw new IllegalArgumentException("uid is not within application range");
            }
            if (mAppOpsService.checkPackage(clientAppUid, clientAppPackage) != MODE_ALLOWED) {
                throw new IllegalArgumentException("uid does not belong to provided package");
            }
        }
        @Override