summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJulia Reynolds <juliacr@google.com>2015-10-15 13:29:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-15 13:29:51 +0000
commit67ea77ec3fd838e1a367ad6f367970599e599a99 (patch)
tree28489c0c680c31a60634152642b97caebfdeea67 /packages
parentd8ef44bc51a4a27cd9a57c880a367636a1377082 (diff)
parent97eff878a45f4e828812fa5a4745e3477209df1f (diff)
downloadframeworks_base-67ea77ec3fd838e1a367ad6f367970599e599a99.zip
frameworks_base-67ea77ec3fd838e1a367ad6f367970599e599a99.tar.gz
frameworks_base-67ea77ec3fd838e1a367ad6f367970599e599a99.tar.bz2
Merge "Selectively show zen footer." into mnc-dr-dev
Diffstat (limited to 'packages')
-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();
}