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

Commit 3e57340b authored by Julia Reynolds's avatar Julia Reynolds Committed by Ian Pedowitz
Browse files

Fix radio button flash on hour change.

Also delete confusing debug variable.

Bug: 25459795
Bug: 25783349
Change-Id: I9208ece4edf5fbcff5f257994f47d81a901766e8
parent 8e79dae3
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -70,9 +70,7 @@ public class ZenModePanel extends LinearLayout {
    private static final int SECONDS_MS = 1000;
    private static final int MINUTES_MS = 60 * SECONDS_MS;

    private static final int[] MINUTE_BUCKETS = DEBUG
            ? new int[] { 0, 1, 2, 5, 15, 30, 45, 60, 120, 180, 240, 480 }
            : ZenModeConfig.MINUTE_BUCKETS;
    private static final int[] MINUTE_BUCKETS = ZenModeConfig.MINUTE_BUCKETS;
    private static final int MIN_BUCKET_MINUTES = MINUTE_BUCKETS[0];
    private static final int MAX_BUCKET_MINUTES = MINUTE_BUCKETS[MINUTE_BUCKETS.length - 1];
    private static final int DEFAULT_BUCKET_INDEX = Arrays.binarySearch(MINUTE_BUCKETS, 60);
@@ -603,13 +601,6 @@ public class ZenModePanel extends LinearLayout {
        if (DEBUG) Log.d(mTag, "bind i=" + mZenConditions.indexOfChild(row) + " first=" + first
                + " condition=" + conditionId);
        tag.rb.setEnabled(enabled);
        final boolean checked = (mSessionExitCondition != null
                    || mAttachedZen != Global.ZEN_MODE_OFF)
                && (sameConditionId(mSessionExitCondition, tag.condition));
        if (checked != tag.rb.isChecked()) {
            if (DEBUG) Log.d(mTag, "bind checked=" + checked + " condition=" + conditionId);
            tag.rb.setChecked(checked);
        }
        tag.rb.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {