Skip to content

Commit

Permalink
fw: GlobalActions: Always dismiss any existing dialog
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tdmcyngn committed Jun 28, 2016
1 parent c93e778 commit 33e91d3
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -248,14 +248,12 @@ public void onServiceStateChanged(ServiceState serviceState) {
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();
}
}
Expand All @@ -274,6 +272,7 @@ private void awakenIfNecessary() {

private void handleShow() {
awakenIfNecessary();
mDialog = createDialog();
prepareDialog();

// If we only have 1 item and it's a simple press action, just do this action.
Expand Down

0 comments on commit 33e91d3

Please sign in to comment.