Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9086f540 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Selectively show zen footer."

parents 18fce3cd 6aa83b4c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
@@ -136,6 +137,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);

@@ -649,7 +651,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();
        }