summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/audio/AudioService.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-04-28 11:19:13 -0400
committerJohn Spurlock <jspurlock@google.com>2015-04-29 09:58:38 -0400
commitd9c75dba75ad4742dbaadc34db99d2b76cebca91 (patch)
treeaf6a1b4b78602174ec8442b5d019abe1f18f0903 /services/core/java/com/android/server/audio/AudioService.java
parentfa1c1f97df601df50b3998f7ae98a2d3bfb03466 (diff)
downloadframeworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.zip
frameworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.tar.gz
frameworks_base-d9c75dba75ad4742dbaadc34db99d2b76cebca91.tar.bz2
Volume: Simple dialog footer, DND in quick settings.
- Show DND tile by default, this is now the only place to manage DND modes / end conditions. - Remove super footer from volume dialog, replace with a simplified version that displays the current mode and allows ending DND. - Remove obsolete text-only footer from codebase. - Migrate remaining volume items into main resource files. - Rename "No interruptions" to "Total silence". - Add new user information banner for "Total silence" - Crude media filtering for Total Silence. (deeper muting changes will be done as a followup) - Disable volume dialog sliders completely if muted due to zen. - Cleanup ZenModePanel: assume embedded mode, remove expandable subhead - Remember "favorite" DND mode inside the DND config panel. - AudioService: consult ringer-mode-delegate before voluming down into silent. - Add new hour options to time-based exit conditions. - Volume dialog visual updates to move closer to final visuals. - Unify ringer=silent with DND. Bug: 19260237 Change-Id: I05d7e001eca3b5125418ec3bc4087d0cb8866717
Diffstat (limited to 'services/core/java/com/android/server/audio/AudioService.java')
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 6b56279..eb28ed0 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -1803,9 +1803,7 @@ public class AudioService extends IAudioService.Stub {
if (!shouldMute) {
// unmute
// ring and notifications volume should never be 0 when not silenced
- // on voice capable devices or devices that support vibration
- if ((isPlatformVoice() || mHasVibrator) &&
- mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING) {
+ if (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING) {
synchronized (VolumeStreamState.class) {
final VolumeStreamState vss = mStreamStates[streamType];
for (int i = 0; i < vss.mIndexMap.size(); i++) {
@@ -2986,10 +2984,7 @@ public class AudioService extends IAudioService.Stub {
mLoweredFromNormalToVibrateTime = SystemClock.uptimeMillis();
}
} else {
- // (oldIndex < step) is equivalent to (old UI index == 0)
- if ((oldIndex < step)
- && mVolumePolicy.volumeDownToEnterSilent
- && mPrevVolDirection != AudioManager.ADJUST_LOWER) {
+ if (oldIndex == step && mVolumePolicy.volumeDownToEnterSilent) {
ringerMode = RINGER_MODE_SILENT;
}
}
@@ -3018,7 +3013,8 @@ public class AudioService extends IAudioService.Stub {
if (mVolumePolicy.volumeDownToEnterSilent) {
final long diff = SystemClock.uptimeMillis()
- mLoweredFromNormalToVibrateTime;
- if (diff > mVolumePolicy.vibrateToSilentDebounce) {
+ if (diff > mVolumePolicy.vibrateToSilentDebounce
+ && mRingerModeDelegate.canVolumeDownEnterSilent()) {
ringerMode = RINGER_MODE_SILENT;
}
} else {