summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Reynolds <juliacr@google.com>2015-09-08 13:41:45 -0400
committerJulia Reynolds <juliacr@google.com>2015-10-14 20:22:56 +0000
commit97eff878a45f4e828812fa5a4745e3477209df1f (patch)
tree6780f63f3a79429e1983ae2df91c9807cf60b506
parentb7e722b88fab8b67f8a2ef54a7acb8c6672b6f46 (diff)
downloadframeworks_base-97eff878a45f4e828812fa5a4745e3477209df1f.zip
frameworks_base-97eff878a45f4e828812fa5a4745e3477209df1f.tar.gz
frameworks_base-97eff878a45f4e828812fa5a4745e3477209df1f.tar.bz2
Selectively show zen footer.
Only show zen footer if the active stream is affected by the current zen mode. Bug: 23844466 Change-Id: I08770882f12f11c3458e1e48a287139480ae7aa3 (cherry picked from commit 6aa83b4ca0859c3f59413ef092f8d843f8646f0e)
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 7836411..e9f1095 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -104,6 +104,7 @@ public class VolumeDialog {
private final SpTexts mSpTexts;
private final SparseBooleanArray mDynamic = new SparseBooleanArray();
private final KeyguardManager mKeyguard;
+ private final AudioManager mAudioManager;
private final int mExpandButtonAnimationDuration;
private final ZenFooter mZenFooter;
private final LayoutTransition mLayoutTransition;
@@ -135,6 +136,7 @@ public class VolumeDialog {
mCallback = callback;
mSpTexts = new SpTexts(mContext);
mKeyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
+ mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
mDialog = new CustomDialog(mContext);
@@ -636,7 +638,8 @@ public class VolumeDialog {
private void updateFooterH() {
if (D.BUG) Log.d(TAG, "updateFooterH");
final boolean wasVisible = mZenFooter.getVisibility() == View.VISIBLE;
- final boolean visible = mState.zenMode != Global.ZEN_MODE_OFF;
+ final boolean visible = mState.zenMode != Global.ZEN_MODE_OFF
+ && mAudioManager.isStreamAffectedByRingerMode(mActiveStream);
if (wasVisible != visible && !visible) {
prepareForCollapse();
}