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

Commit ca2b42b2 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Return invalid task id if no acceptable target app" into sc-dev am:...

Merge "Return invalid task id if no acceptable target app" into sc-dev am: 397f6cdc am: 7866acdd

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

Change-Id: Ic7f87cf3dfd93cb96b0d6947fe3dfa1f8ccf63f5
parents 79e422da 7866acdd
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2633,10 +2633,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                }
                final ActivityInfo ainfo = AppGlobals.getPackageManager().getActivityInfo(comp,
                        STOCK_PM_FLAGS, UserHandle.getUserId(callingUid));
                if (ainfo.applicationInfo.uid != callingUid) {
                    throw new SecurityException(
                            "Can't add task for another application: target uid="
                                    + ainfo.applicationInfo.uid + ", calling uid=" + callingUid);
                if (ainfo == null || ainfo.applicationInfo.uid != callingUid) {
                    Slog.e(TAG, "Can't add task for another application: target uid="
                            + (ainfo == null ? Process.INVALID_UID : ainfo.applicationInfo.uid)
                            + ", calling uid=" + callingUid);
                    return INVALID_TASK_ID;
                }

                final Task rootTask = r.getRootTask();