Loading core/java/android/app/ActivityOptions.java +27 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,12 @@ public class ActivityOptions extends ComponentOptions { */ private static final String KEY_LAUNCH_TASK_ID = "android.activity.launchTaskId"; /** * See {@link #setDisableStartingWindow}. * @hide */ private static final String KEY_DISABLE_STARTING_WINDOW = "android.activity.disableStarting"; /** * See {@link #setPendingIntentLaunchFlags(int)} * @hide Loading Loading @@ -467,6 +473,7 @@ public class ActivityOptions extends ComponentOptions { private PictureInPictureParams mLaunchIntoPipParams; private boolean mDismissKeyguard; private boolean mIgnorePendingIntentCreatorForegroundState; private boolean mDisableStartingWindow; /** * Create an ActivityOptions specifying a custom animation to run when Loading Loading @@ -1272,6 +1279,7 @@ public class ActivityOptions extends ComponentOptions { mDismissKeyguard = opts.getBoolean(KEY_DISMISS_KEYGUARD); mIgnorePendingIntentCreatorForegroundState = opts.getBoolean( KEY_IGNORE_PENDING_INTENT_CREATOR_FOREGROUND_STATE); mDisableStartingWindow = opts.getBoolean(KEY_DISABLE_STARTING_WINDOW); } /** Loading Loading @@ -1670,6 +1678,22 @@ public class ActivityOptions extends ComponentOptions { return mLaunchTaskId; } /** * Sets whether recents disable showing starting window when activity launch. * @hide */ @RequiresPermission(START_TASKS_FROM_RECENTS) public void setDisableStartingWindow(boolean disable) { mDisableStartingWindow = disable; } /** * @hide */ public boolean getDisableStartingWindow() { return mDisableStartingWindow; } /** * Specifies intent flags to be applied for any activity started from a PendingIntent. * Loading Loading @@ -2178,6 +2202,9 @@ public class ActivityOptions extends ComponentOptions { b.putBoolean(KEY_IGNORE_PENDING_INTENT_CREATOR_FOREGROUND_STATE, mIgnorePendingIntentCreatorForegroundState); } if (mDisableStartingWindow) { b.putBoolean(KEY_DISABLE_STARTING_WINDOW, mDisableStartingWindow); } return b; } Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +1 −1 Original line number Diff line number Diff line Loading @@ -1481,7 +1481,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { handleNonResizableTaskIfNeeded(task, WINDOWING_MODE_UNDEFINED, mRootWindowContainer.getDefaultTaskDisplayArea(), currentRootTask, forceNonResizeable); if (r != null) { if (r != null && (options == null || !options.getDisableStartingWindow())) { // Use a starting window to reduce the transition latency for reshowing the task. // Note that with shell transition, this should be executed before requesting // transition to avoid delaying the starting window. Loading services/core/java/com/android/server/wm/SafeActivityOptions.java +1 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ public class SafeActivityOptions { ActivityOptions options, int callingPid, int callingUid) { // If a launch task id is specified, then ensure that the caller is the recents // component or has the START_TASKS_FROM_RECENTS permission if (options.getLaunchTaskId() != INVALID_TASK_ID if ((options.getLaunchTaskId() != INVALID_TASK_ID || options.getDisableStartingWindow()) && !supervisor.mRecentTasks.isCallerRecents(callingUid)) { final int startInTaskPerm = ActivityTaskManagerService.checkPermission( START_TASKS_FROM_RECENTS, callingPid, callingUid); Loading services/core/java/com/android/server/wm/Task.java +3 −0 Original line number Diff line number Diff line Loading @@ -5074,6 +5074,9 @@ class Task extends TaskFragment { == ActivityOptions.ANIM_SCENE_TRANSITION) { doShow = false; } if (options != null && options.getDisableStartingWindow()) { doShow = false; } if (r.mLaunchTaskBehind) { // Don't do a starting window for mLaunchTaskBehind. More importantly make sure we // tell WindowManager that r is visible even though it is at the back of the root Loading Loading
core/java/android/app/ActivityOptions.java +27 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,12 @@ public class ActivityOptions extends ComponentOptions { */ private static final String KEY_LAUNCH_TASK_ID = "android.activity.launchTaskId"; /** * See {@link #setDisableStartingWindow}. * @hide */ private static final String KEY_DISABLE_STARTING_WINDOW = "android.activity.disableStarting"; /** * See {@link #setPendingIntentLaunchFlags(int)} * @hide Loading Loading @@ -467,6 +473,7 @@ public class ActivityOptions extends ComponentOptions { private PictureInPictureParams mLaunchIntoPipParams; private boolean mDismissKeyguard; private boolean mIgnorePendingIntentCreatorForegroundState; private boolean mDisableStartingWindow; /** * Create an ActivityOptions specifying a custom animation to run when Loading Loading @@ -1272,6 +1279,7 @@ public class ActivityOptions extends ComponentOptions { mDismissKeyguard = opts.getBoolean(KEY_DISMISS_KEYGUARD); mIgnorePendingIntentCreatorForegroundState = opts.getBoolean( KEY_IGNORE_PENDING_INTENT_CREATOR_FOREGROUND_STATE); mDisableStartingWindow = opts.getBoolean(KEY_DISABLE_STARTING_WINDOW); } /** Loading Loading @@ -1670,6 +1678,22 @@ public class ActivityOptions extends ComponentOptions { return mLaunchTaskId; } /** * Sets whether recents disable showing starting window when activity launch. * @hide */ @RequiresPermission(START_TASKS_FROM_RECENTS) public void setDisableStartingWindow(boolean disable) { mDisableStartingWindow = disable; } /** * @hide */ public boolean getDisableStartingWindow() { return mDisableStartingWindow; } /** * Specifies intent flags to be applied for any activity started from a PendingIntent. * Loading Loading @@ -2178,6 +2202,9 @@ public class ActivityOptions extends ComponentOptions { b.putBoolean(KEY_IGNORE_PENDING_INTENT_CREATOR_FOREGROUND_STATE, mIgnorePendingIntentCreatorForegroundState); } if (mDisableStartingWindow) { b.putBoolean(KEY_DISABLE_STARTING_WINDOW, mDisableStartingWindow); } return b; } Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +1 −1 Original line number Diff line number Diff line Loading @@ -1481,7 +1481,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { handleNonResizableTaskIfNeeded(task, WINDOWING_MODE_UNDEFINED, mRootWindowContainer.getDefaultTaskDisplayArea(), currentRootTask, forceNonResizeable); if (r != null) { if (r != null && (options == null || !options.getDisableStartingWindow())) { // Use a starting window to reduce the transition latency for reshowing the task. // Note that with shell transition, this should be executed before requesting // transition to avoid delaying the starting window. Loading
services/core/java/com/android/server/wm/SafeActivityOptions.java +1 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ public class SafeActivityOptions { ActivityOptions options, int callingPid, int callingUid) { // If a launch task id is specified, then ensure that the caller is the recents // component or has the START_TASKS_FROM_RECENTS permission if (options.getLaunchTaskId() != INVALID_TASK_ID if ((options.getLaunchTaskId() != INVALID_TASK_ID || options.getDisableStartingWindow()) && !supervisor.mRecentTasks.isCallerRecents(callingUid)) { final int startInTaskPerm = ActivityTaskManagerService.checkPermission( START_TASKS_FROM_RECENTS, callingPid, callingUid); Loading
services/core/java/com/android/server/wm/Task.java +3 −0 Original line number Diff line number Diff line Loading @@ -5074,6 +5074,9 @@ class Task extends TaskFragment { == ActivityOptions.ANIM_SCENE_TRANSITION) { doShow = false; } if (options != null && options.getDisableStartingWindow()) { doShow = false; } if (r.mLaunchTaskBehind) { // Don't do a starting window for mLaunchTaskBehind. More importantly make sure we // tell WindowManager that r is visible even though it is at the back of the root Loading