diff options
author | John Spurlock <jspurlock@google.com> | 2014-11-18 11:40:22 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-11-18 11:40:22 -0500 |
commit | 7fbf573e0b7b002a914aec651208e33d443a1f1b (patch) | |
tree | 152c5818303996895ec67adaf0cd6b0021023add /packages/SystemUI | |
parent | b3ec64e1005c82d41b6d1a1d86b6933fd25d87d2 (diff) | |
download | frameworks_base-7fbf573e0b7b002a914aec651208e33d443a1f1b.zip frameworks_base-7fbf573e0b7b002a914aec651208e33d443a1f1b.tar.gz frameworks_base-7fbf573e0b7b002a914aec651208e33d443a1f1b.tar.bz2 |
Volume: Dismiss panel on nav bar interaction.
Bug: 18409164
Change-Id: I7b7f26eb823b8477a4df86a8622b4f1171ad96e6
Diffstat (limited to 'packages/SystemUI')
3 files changed, 14 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index d94f122..2e86530 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2659,6 +2659,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, @Override public void setInteracting(int barWindow, boolean interacting) { + final boolean changing = ((mInteractingWindows & barWindow) != 0) != interacting; mInteractingWindows = interacting ? (mInteractingWindows | barWindow) : (mInteractingWindows & ~barWindow); @@ -2667,6 +2668,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } else { resumeSuspendedAutohide(); } + // manually dismiss the volume panel when interacting with the nav bar + if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) { + if (mVolumeComponent != null) { + mVolumeComponent.dismissNow(); + } + } checkBarModes(); } diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeComponent.java index 31adc95..e3f8f3d 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeComponent.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeComponent.java @@ -21,4 +21,5 @@ import com.android.systemui.statusbar.policy.ZenModeController; public interface VolumeComponent extends DemoMode { ZenModeController getZenController(); + void dismissNow(); } diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 5232a17..7102c2a 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -178,7 +178,7 @@ public class VolumeUI extends SystemUI { @Override public void dismiss() throws RemoteException { - mPanel.postDismiss(0); + dismissNow(); } @Override @@ -190,6 +190,11 @@ public class VolumeUI extends SystemUI { public void dispatchDemoCommand(String command, Bundle args) { mPanel.dispatchDemoCommand(command, args); } + + @Override + public void dismissNow() { + mPanel.postDismiss(0); + } } private final class RemoteVolumeController extends IRemoteVolumeController.Stub { |