diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 1e7f4f0..04510da 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -177,6 +177,13 @@
     private static final String KEY_TASK_OVERLAY = "android.activity.taskOverlay";
 
     /**
+     * See {@link #setTaskOverlay}.
+     * @hide
+     */
+    private static final String KEY_TASK_OVERLAY_CAN_RESUME =
+            "android.activity.taskOverlayCanResume";
+
+    /**
      * Where the docked stack should be positioned.
      * @hide
      */
@@ -252,6 +259,7 @@
     private int mLaunchTaskId = -1;
     private int mDockCreateMode = DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
     private boolean mTaskOverlay;
+    private boolean mTaskOverlayCanResume;
     private AppTransitionAnimationSpec mAnimSpecs[];
     private int mRotationAnimationHint = -1;
 
@@ -862,6 +870,7 @@
         mLaunchStackId = opts.getInt(KEY_LAUNCH_STACK_ID, INVALID_STACK_ID);
         mLaunchTaskId = opts.getInt(KEY_LAUNCH_TASK_ID, -1);
         mTaskOverlay = opts.getBoolean(KEY_TASK_OVERLAY, false);
+        mTaskOverlayCanResume = opts.getBoolean(KEY_TASK_OVERLAY_CAN_RESUME, false);
         mDockCreateMode = opts.getInt(KEY_DOCK_CREATE_MODE, DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT);
         if (opts.containsKey(KEY_ANIM_SPECS)) {
             Parcelable[] specs = opts.getParcelableArray(KEY_ANIM_SPECS);
@@ -1071,12 +1080,13 @@
 
     /**
      * Set's whether the activity launched with this option should be a task overlay. That is the
-     * activity will always be the top activity of the task and doesn't cause the task to be moved
-     * to the front when it is added.
+     * activity will always be the top activity of the task.  If {@param canResume} is true, then
+     * the task will also not be moved to the front of the stack.
      * @hide
      */
-    public void setTaskOverlay(boolean taskOverlay) {
+    public void setTaskOverlay(boolean taskOverlay, boolean canResume) {
         mTaskOverlay = taskOverlay;
+        mTaskOverlayCanResume = canResume;
     }
 
     /**
@@ -1086,6 +1096,13 @@
         return mTaskOverlay;
     }
 
+    /**
+     * @hide
+     */
+    public boolean canTaskOverlayResume() {
+        return mTaskOverlayCanResume;
+    }
+
     /** @hide */
     public int getDockCreateMode() {
         return mDockCreateMode;
@@ -1241,6 +1258,7 @@
         b.putInt(KEY_LAUNCH_STACK_ID, mLaunchStackId);
         b.putInt(KEY_LAUNCH_TASK_ID, mLaunchTaskId);
         b.putBoolean(KEY_TASK_OVERLAY, mTaskOverlay);
+        b.putBoolean(KEY_TASK_OVERLAY_CAN_RESUME, mTaskOverlayCanResume);
         b.putInt(KEY_DOCK_CREATE_MODE, mDockCreateMode);
         if (mAnimSpecs != null) {
             b.putParcelableArray(KEY_ANIM_SPECS, mAnimSpecs);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
index 22fceff..2c41a08 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
@@ -48,7 +48,7 @@
 
         final ActivityOptions options = ActivityOptions.makeBasic();
         options.setLaunchTaskId(taskId);
-        options.setTaskOverlay(true);
+        options.setTaskOverlay(true, false /* canResume */);
         mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
index 0350cc6..e1cc6c1 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
@@ -133,7 +133,7 @@
                     ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0);
                     options.setLaunchTaskId(
                             pinnedStackInfo.taskIds[pinnedStackInfo.taskIds.length - 1]);
-                    options.setTaskOverlay(true);
+                    options.setTaskOverlay(true, true /* canResume */);
                     mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
                 } else {
                     Log.e(TAG, "No PIP tasks found");
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java b/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java
index 5920f46..17b494e 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java
@@ -112,7 +112,7 @@
             Intent intent = new Intent(mContext, ForcedResizableInfoActivity.class);
             ActivityOptions options = ActivityOptions.makeBasic();
             options.setLaunchTaskId(mPendingTaskIds.valueAt(i));
-            options.setTaskOverlay(true);
+            options.setTaskOverlay(true, false /* canResume */);
             mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
         }
         mPendingTaskIds.clear();
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index f401863..547e0b2 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -1236,16 +1236,19 @@
             mDoResume = false;
         }
 
-        if (mOptions != null && mOptions.getLaunchTaskId() != -1 && mOptions.getTaskOverlay()) {
+        if (mOptions != null && mOptions.getLaunchTaskId() != -1
+                && mOptions.getTaskOverlay()) {
             r.mTaskOverlay = true;
-            final TaskRecord task = mSupervisor.anyTaskForIdLocked(mOptions.getLaunchTaskId());
-            final ActivityRecord top = task != null ? task.getTopActivity() : null;
-            if (top != null && top.state != RESUMED) {
+            if (!mOptions.canTaskOverlayResume()) {
+                final TaskRecord task = mSupervisor.anyTaskForIdLocked(mOptions.getLaunchTaskId());
+                final ActivityRecord top = task != null ? task.getTopActivity() : null;
+                if (top != null && top.state != RESUMED) {
 
-                // The caller specifies that we'd like to be avoided to be moved to the front, so be
-                // it!
-                mDoResume = false;
-                mAvoidMoveToFront = true;
+                    // The caller specifies that we'd like to be avoided to be moved to the front,
+                    // so be it!
+                    mDoResume = false;
+                    mAvoidMoveToFront = true;
+                }
             }
         }
 
