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

Commit b83b533e authored by Tom Marshall's avatar Tom Marshall Committed by Michael Bestas
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 b0ac1257
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -250,11 +250,9 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
        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();
        }
    }
@@ -273,6 +271,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.