OSDN Git Service

Sets Tile default state to INACTIVE
authorFabian Kozynski <kozynski@google.com>
Thu, 16 May 2019 18:23:58 +0000 (14:23 -0400)
committerFabian Kozynski <kozynski@google.com>
Thu, 16 May 2019 18:23:58 +0000 (14:23 -0400)
commit5c6f04df30e6e9c2dc18d23decc1acb104be5a70
tree2af4b71a868b6986c66298ac032326c0b949a65e
parentd7affe71710d08ae738c353411571a60c56e6172
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