summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2019-05-16 14:23:58 -0400
committer Fabian Kozynski <kozynski@google.com> 2019-05-16 14:23:58 -0400
commit5c6f04df30e6e9c2dc18d23decc1acb104be5a70 (patch)
tree2af4b71a868b6986c66298ac032326c0b949a65e
parentd7affe71710d08ae738c353411571a60c56e6172 (diff)
Sets Tile default state to INACTIVE
When the Tile is created, we don't have its actual state, so it has to start with some default state. Between the tile being bound and the first time the state is updated by TileService, this is the default state. When the Tile for CustomTile is created, set its default state to INACTIVE. On the first update it after it's bound it will be set correctly. This is probably less upsetting than an ACTIVE tile that suddenly becomes INACTIVE. Test: manual using logs to verify that the Tile is never ACTIVE when it shouldn't. Fixes: 132813963 Change-Id: I58bad0a2a16ca42366a5772f62fe82c74a6e2fb7
-rw-r--r--core/java/android/service/quicksettings/Tile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/service/quicksettings/Tile.java b/core/java/android/service/quicksettings/Tile.java
index 419104033bcd..79c21521fe2d 100644
--- a/core/java/android/service/quicksettings/Tile.java
+++ b/core/java/android/service/quicksettings/Tile.java
@@ -65,8 +65,8 @@ public final class Tile implements Parcelable {
private CharSequence mLabel;
private CharSequence mSubtitle;
private CharSequence mContentDescription;
- // Default to active until clients of the new API can update.
- private int mState = STATE_ACTIVE;
+ // Default to inactive until clients of the new API can update.
+ private int mState = STATE_INACTIVE;
private IQSService mService;