summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2014-08-21 19:13:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-21 19:13:32 +0000
commit1889c5c36df8cd027f1f3f69aa227a6bdad17849 (patch)
tree9b64cbfadbf5a5a44fede5a947ec8fda80f423df /services
parent88180d269e5356db11e84a53755e470f430eceec (diff)
parent63f29d9d7cab8c714f54db520eebd3047977d19c (diff)
downloadframeworks_base-1889c5c36df8cd027f1f3f69aa227a6bdad17849.zip
frameworks_base-1889c5c36df8cd027f1f3f69aa227a6bdad17849.tar.gz
frameworks_base-1889c5c36df8cd027f1f3f69aa227a6bdad17849.tar.bz2
Merge "Show lock to app request on all users" into lmp-dev
Diffstat (limited to 'services')
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java1
-rw-r--r--services/core/java/com/android/server/am/LockToAppRequestDialog.java8
2 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 58a24b4..f36f25f 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -1841,6 +1841,7 @@ public final class ActivityManagerService extends ActivityManagerNative
BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_START,
Integer.toString(msg.arg1), msg.arg1);
mSystemServiceManager.switchUser(msg.arg1);
+ mLockToAppRequest.clearPrompt();
break;
}
case ENTER_ANIMATION_COMPLETE_MSG: {
diff --git a/services/core/java/com/android/server/am/LockToAppRequestDialog.java b/services/core/java/com/android/server/am/LockToAppRequestDialog.java
index 5abf699..a1eb31e 100644
--- a/services/core/java/com/android/server/am/LockToAppRequestDialog.java
+++ b/services/core/java/com/android/server/am/LockToAppRequestDialog.java
@@ -74,11 +74,15 @@ public class LockToAppRequestDialog implements OnClickListener {
return 0;
}
- public void showLockTaskPrompt(TaskRecord task) {
+ public void clearPrompt() {
if (mDialog != null) {
mDialog.dismiss();
mDialog = null;
}
+ }
+
+ public void showLockTaskPrompt(TaskRecord task) {
+ clearPrompt();
mRequestedTask = task;
final int unlockStringId = getLockString(task.userId);
@@ -97,6 +101,8 @@ public class LockToAppRequestDialog implements OnClickListener {
mDialog = builder.create();
mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ mDialog.getWindow().getAttributes().privateFlags |=
+ WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
mDialog.show();
if (unlockStringId != 0) {