Loading packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +13 −9 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public class VolumePanel extends Handler { private static final int TIMEOUT_DELAY_SHORT = 1500; private static final int TIMEOUT_DELAY_COLLAPSED = 4500; private static final int TIMEOUT_DELAY_SAFETY_WARNING = 5000; private static final int TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK = 25000; private static final int TIMEOUT_DELAY_EXPANDED = 10000; private static final int MSG_VOLUME_CHANGED = 0; Loading Loading @@ -794,8 +793,7 @@ public class VolumePanel extends Handler { } private void updateTimeoutDelay() { mTimeoutDelay = sSafetyWarning != null ? mAccessibilityManager.isEnabled() ? TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK : TIMEOUT_DELAY_SAFETY_WARNING mTimeoutDelay = sSafetyWarning != null ? TIMEOUT_DELAY_SAFETY_WARNING : mActiveStreamType == AudioManager.STREAM_MUSIC ? TIMEOUT_DELAY_SHORT : mZenPanelExpanded ? TIMEOUT_DELAY_EXPANDED : isZenPanelVisible() ? TIMEOUT_DELAY_COLLAPSED Loading Loading @@ -1218,9 +1216,13 @@ public class VolumePanel extends Handler { } updateStates(); } if (mAccessibilityManager.isTouchExplorationEnabled()) { removeMessages(MSG_TIMEOUT); } else { updateTimeoutDelay(); resetTimeout(); } } /** * Lock on this VolumePanel instance as long as you use the returned ToneGenerator. Loading Loading @@ -1373,11 +1375,13 @@ public class VolumePanel extends Handler { private void resetTimeout() { if (LOGD) Log.d(mTag, "resetTimeout at " + System.currentTimeMillis() + " delay=" + mTimeoutDelay); if (sSafetyWarning == null || !mAccessibilityManager.isTouchExplorationEnabled()) { removeMessages(MSG_TIMEOUT); sendEmptyMessageDelayed(MSG_TIMEOUT, mTimeoutDelay); removeMessages(MSG_USER_ACTIVITY); sendEmptyMessage(MSG_USER_ACTIVITY); } } private void forceTimeout(long delay) { removeMessages(MSG_TIMEOUT); Loading Loading
packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +13 −9 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public class VolumePanel extends Handler { private static final int TIMEOUT_DELAY_SHORT = 1500; private static final int TIMEOUT_DELAY_COLLAPSED = 4500; private static final int TIMEOUT_DELAY_SAFETY_WARNING = 5000; private static final int TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK = 25000; private static final int TIMEOUT_DELAY_EXPANDED = 10000; private static final int MSG_VOLUME_CHANGED = 0; Loading Loading @@ -794,8 +793,7 @@ public class VolumePanel extends Handler { } private void updateTimeoutDelay() { mTimeoutDelay = sSafetyWarning != null ? mAccessibilityManager.isEnabled() ? TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK : TIMEOUT_DELAY_SAFETY_WARNING mTimeoutDelay = sSafetyWarning != null ? TIMEOUT_DELAY_SAFETY_WARNING : mActiveStreamType == AudioManager.STREAM_MUSIC ? TIMEOUT_DELAY_SHORT : mZenPanelExpanded ? TIMEOUT_DELAY_EXPANDED : isZenPanelVisible() ? TIMEOUT_DELAY_COLLAPSED Loading Loading @@ -1218,9 +1216,13 @@ public class VolumePanel extends Handler { } updateStates(); } if (mAccessibilityManager.isTouchExplorationEnabled()) { removeMessages(MSG_TIMEOUT); } else { updateTimeoutDelay(); resetTimeout(); } } /** * Lock on this VolumePanel instance as long as you use the returned ToneGenerator. Loading Loading @@ -1373,11 +1375,13 @@ public class VolumePanel extends Handler { private void resetTimeout() { if (LOGD) Log.d(mTag, "resetTimeout at " + System.currentTimeMillis() + " delay=" + mTimeoutDelay); if (sSafetyWarning == null || !mAccessibilityManager.isTouchExplorationEnabled()) { removeMessages(MSG_TIMEOUT); sendEmptyMessageDelayed(MSG_TIMEOUT, mTimeoutDelay); removeMessages(MSG_USER_ACTIVITY); sendEmptyMessage(MSG_USER_ACTIVITY); } } private void forceTimeout(long delay) { removeMessages(MSG_TIMEOUT); Loading