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

Commit 61ce5164 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Never clear QS tile state." into pi-dev

parents abd5538e 334d1bce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public interface QSTile {
    boolean isAvailable();
    void setTileSpec(String tileSpec);

    void clearState();
    @Deprecated default void clearState() {}
    void refreshState();

    void addCallback(Callback callback);
+0 −3
Original line number Diff line number Diff line
@@ -285,9 +285,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback, Brightne

        updatePageIndicator();

        for (TileRecord r : mRecords) {
            r.tile.clearState();
        }
        if (mListening) {
            refreshAllTiles();
        }
+0 −1
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ public class TileQueryHelper {
                continue;
            }
            tile.setListening(this, true);
            tile.clearState();
            tile.refreshState();
            tile.setListening(this, false);
            tile.setTileSpec(spec);
+4 −17
Original line number Diff line number Diff line
@@ -211,10 +211,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
        mHandler.obtainMessage(H.REFRESH_STATE, arg).sendToTarget();
    }

    public void clearState() {
        mHandler.sendEmptyMessage(H.CLEAR_STATE);
    }

    public void userSwitch(int newUserId) {
        mHandler.obtainMessage(H.USER_SWITCH, newUserId, 0).sendToTarget();
    }
@@ -266,11 +262,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {

    public abstract Intent getLongClickIntent();

    protected void handleClearState() {
        mTmpState = newTileState();
        mState = newTileState();
    }

    protected void handleRefreshState(Object arg) {
        handleUpdateState(mTmpState, arg);
        final boolean changed = mTmpState.copyTo(mState);
@@ -409,11 +400,10 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
        private static final int TOGGLE_STATE_CHANGED = 8;
        private static final int SCAN_STATE_CHANGED = 9;
        private static final int DESTROY = 10;
        private static final int CLEAR_STATE = 11;
        private static final int REMOVE_CALLBACKS = 12;
        private static final int REMOVE_CALLBACK = 13;
        private static final int SET_LISTENING = 14;
        private static final int STALE = 15;
        private static final int REMOVE_CALLBACKS = 11;
        private static final int REMOVE_CALLBACK = 12;
        private static final int SET_LISTENING = 13;
        private static final int STALE = 14;

        @VisibleForTesting
        protected H(Looper looper) {
@@ -467,9 +457,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
                } else if (msg.what == DESTROY) {
                    name = "handleDestroy";
                    handleDestroy();
                } else if (msg.what == CLEAR_STATE) {
                    name = "handleClearState";
                    handleClearState();
                } else if (msg.what == SET_LISTENING) {
                    name = "handleSetListeningInternal";
                    handleSetListeningInternal(msg.obj, msg.arg1 != 0);