From 5c6f04df30e6e9c2dc18d23decc1acb104be5a70 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Thu, 16 May 2019 14:23:58 -0400 Subject: [PATCH] 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 --- core/java/android/service/quicksettings/Tile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/service/quicksettings/Tile.java b/core/java/android/service/quicksettings/Tile.java index 419104033bcd8..79c21521fe2d3 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;