Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33e91d32 authored by Tom Marshall's avatar Tom Marshall
Browse files

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
parent c93e7785
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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.