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

Commit 2769ac29 authored by John Spurlock's avatar John Spurlock
Browse files

VolumeZen: Only display active condition when entering.

Instead of always displaying the active condition, only
show it the first time (when turning zen on).

Bug:15455271
Change-Id: I89e8e2c09fa0d06a5e4c3174f825dfe5a452f06e
parent 8089ce7c
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -333,6 +333,7 @@ public class VolumePanel extends Handler {
                public void onDismiss(DialogInterface dialog) {
                    mActiveStreamType = -1;
                    mAudioManager.forceVolumeControlStream(mActiveStreamType);
                    collapse();
                }
            });

@@ -651,13 +652,9 @@ public class VolumePanel extends Handler {
            mExpandDivider.setVisibility(show ? View.VISIBLE : View.GONE);
            mExpandButton.setImageResource(zen ? com.android.systemui.R.drawable.ic_vol_zen_on
                    : com.android.systemui.R.drawable.ic_vol_zen_off);
            if (show) {
                if (zen) {
                    expand();
                } else {
            if (show && !zen) {
                collapse();
            }
            }
        } else {
            mExpandButton.setVisibility(View.GONE);
            mExpandDivider.setVisibility(View.GONE);
+0 −4
Original line number Diff line number Diff line
@@ -323,10 +323,6 @@ public class ZenModePanel extends LinearLayout {
            button1.setVisibility(View.GONE);
            button2.setVisibility(View.GONE);
        }
        if (mExitConditionId != null && mExitConditionId.equals(tag.conditionId)) {
            if (DEBUG) Log.d(mTag, "Auto-selecting row with mExitConditionId=" + mExitConditionId);
            tag.rb.setChecked(true);
        }
    }

    private void onClickTimeButton(View row, ConditionTag tag, boolean up) {