Volume: delay dismissing panel when starting settings.
Bug:16211952
Change-Id: I067721d932076dafb35c6afd99583301acff9bea
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
index 08216c4..3570257 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
@@ -263,7 +263,7 @@
synchronized (sConfirmSafeVolumeLock) {
sConfirmSafeVolumeDialog = null;
}
- mVolumePanel.forceTimeout();
+ mVolumePanel.forceTimeout(0);
mVolumePanel.updateStates();
}
}
@@ -293,7 +293,7 @@
public boolean onTouchEvent(MotionEvent event) {
if (isShowing() && event.getAction() == MotionEvent.ACTION_OUTSIDE &&
sConfirmSafeVolumeDialog == null) {
- forceTimeout();
+ forceTimeout(0);
return true;
}
return false;
@@ -718,8 +718,8 @@
obtainMessage(MSG_DISPLAY_SAFE_VOLUME_WARNING, flags, 0).sendToTarget();
}
- public void postDismiss() {
- forceTimeout();
+ public void postDismiss(long delay) {
+ forceTimeout(delay);
}
public void postLayoutDirection(int layoutDirection) {
@@ -1205,9 +1205,9 @@
sendEmptyMessage(MSG_USER_ACTIVITY);
}
- private void forceTimeout() {
+ private void forceTimeout(long delay) {
removeMessages(MSG_TIMEOUT);
- sendEmptyMessage(MSG_TIMEOUT);
+ sendEmptyMessageDelayed(MSG_TIMEOUT, delay);
}
public ZenModeController getZenController() {