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

Commit 20394950 authored by arthurhung's avatar arthurhung
Browse files

Fix NPE in LegacyGlobalActions

The dialog would be assigned by 'createDialog', we should use local
varible to prevent null pointer.

Bug: 156747189
Test: atest GlobalActionsImeTest
Test: open chrome, browsing and open global menu.
Change-Id: I572426158c63bbce22c79dc2e0e642914da0fd24
parent 5749a307
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn
        });
        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
        // Don't acquire soft keyboard focus, to avoid destroying state when capturing bugreports
        mDialog.getWindow().setFlags(FLAG_ALT_FOCUSABLE_IM, FLAG_ALT_FOCUSABLE_IM);
        dialog.getWindow().setFlags(FLAG_ALT_FOCUSABLE_IM, FLAG_ALT_FOCUSABLE_IM);

        dialog.setOnDismissListener(this);