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

Commit 397f6cdc authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

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

parents 88146b48 0b2d6e1a
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();