Merge "Never clear QS tile state." into pi-dev
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index 61f7fe8..bf4374a 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -43,7 +43,7 @@
boolean isAvailable();
void setTileSpec(String tileSpec);
- void clearState();
+ @Deprecated default void clearState() {}
void refreshState();
void addCallback(Callback callback);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 0876a5d..3fc258b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -285,9 +285,6 @@
updatePageIndicator();
- for (TileRecord r : mRecords) {
- r.tile.clearState();
- }
if (mListening) {
refreshAllTiles();
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 53a576d..591e9e0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -95,7 +95,6 @@
continue;
}
tile.setListening(this, true);
- tile.clearState();
tile.refreshState();
tile.setListening(this, false);
tile.setTileSpec(spec);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
index 834feb7..022a2b4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
@@ -211,10 +211,6 @@
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 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 @@
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 @@
} 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);