From 33e91d32a7a756879649fdff13ae394229865b0b Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Tue, 28 Jun 2016 09:43:10 -0700 Subject: fw: GlobalActions: Always dismiss any existing dialog The check for "mUiContext == null" is always false after the initial dialog is created, causing the dismiss logic to never trigger. All code uses getUiContext() now, so the check is not necessary. Remove it and re-align the create/dismiss logic with AOSP. Jira: BACON-4069 Change-Id: Ibba7b38a5fdc8410824db6d0a6f726f4a2822c9d --- services/core/java/com/android/server/policy/GlobalActions.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java index 34fc905..96e1c70 100644 --- a/services/core/java/com/android/server/policy/GlobalActions.java +++ b/services/core/java/com/android/server/policy/GlobalActions.java @@ -248,14 +248,12 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned) { mKeyguardShowing = keyguardShowing; mDeviceProvisioned = isDeviceProvisioned; - if (mDialog != null && mUiContext == null) { + if (mDialog != null) { mDialog.dismiss(); mDialog = null; - mDialog = createDialog(); // Show delayed, so that the dismiss of the previous dialog completes mHandler.sendEmptyMessage(MESSAGE_SHOW); } else { - mDialog = createDialog(); handleShow(); } } @@ -274,6 +272,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac private void handleShow() { awakenIfNecessary(); + mDialog = createDialog(); prepareDialog(); // If we only have 1 item and it's a simple press action, just do this action. -- cgit v1.1