summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-11-06 06:39:21 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-11-06 06:39:21 +0000
commita46b9ca0831cf172444fd231ca04be6643bf9f4e (patch)
treef1e8c27f59521822efeb427dc6bdefc23c9f53ff
parent4bf760b152b3aebc536626eb53cc68e516669eab (diff)
parent3c1e53ddaacf6cf0372c792fdac5287d70a3da57 (diff)
Merge "Use setTaskOverlay to launch ConfirmDeviceCredentialActivity."
-rw-r--r--core/java/android/app/ActivityOptions.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 67728840ada8..f91453ea0811 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -1301,8 +1301,8 @@ public class ActivityOptions {
/**
* 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. If {@param canResume} is true, then
- * the task will also not be moved to the front of the stack.
+ * activity will always be the top activity of the task.
+ * @param canResume {@code false} if the task will also not be moved to the front of the stack.
* @hide
*/
@TestApi
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
index b1df578c62df..ca04633b316a 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
@@ -175,7 +175,12 @@ public class WorkLockActivity extends Activity {
credential.putExtra(EXTRA_FROM_WORK_LOCK_ACTIVITY, true);
}
- startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS);
+ final ActivityOptions launchOptions = ActivityOptions.makeBasic();
+ launchOptions.setLaunchTaskId(getTaskId());
+ launchOptions.setTaskOverlay(true /* taskOverlay */, true /* canResume */);
+
+ startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS,
+ launchOptions.toBundle());
}
@Override