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

Commit 3ea72588 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: 9f8742df

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

Change-Id: Ifbcbcff9f885885cf6cc883f6f53d308de0e4ea9
parents bef1e772 9f8742df
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2632,10 +2632,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();