From bc7233a8a37dd8090d6e04b8c92bc93c868e16b2 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Mon, 29 Jun 2015 15:34:18 -0400 Subject: [PATCH] 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 --- .../com/android/systemui/volume/VolumeDialogController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java index 9a59a2af98868..32d68054a6af0 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java @@ -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);