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

Commit bc7233a8 authored by John Spurlock's avatar John Spurlock
Browse files

Volume: Force dismiss on ACTION_CLOSE_SYSTEM_DIALOGS.

Use ACTION_CLOSE_SYSTEM_DIALOGS as an additional signal to immediately
dismiss the volume dialog, if showing.  Otherwise nav bar navigation
will not immediately dismiss the dialog.

Bug: 22173890
Change-Id: I3eee85a4579b4673b19402cf0f4048068009be35
parent bee7245c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -768,6 +768,7 @@ public class VolumeDialogController {
            filter.addAction(NotificationManager.ACTION_EFFECTS_SUPPRESSOR_CHANGED);
            filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
            filter.addAction(Intent.ACTION_SCREEN_OFF);
            filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
            mContext.registerReceiver(this, filter, null, mWorker);
        }

@@ -822,6 +823,9 @@ public class VolumeDialogController {
            } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                if (D.BUG) Log.d(TAG, "onReceive ACTION_SCREEN_OFF");
                mCallbacks.onScreenOff();
            } else if (action.equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
                if (D.BUG) Log.d(TAG, "onReceive ACTION_CLOSE_SYSTEM_DIALOGS");
                dismiss();
            }
            if (changed) {
                mCallbacks.onStateChanged(mState);