QuickTileService: show intermediate state when changing

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-07-13 03:57:02 +02:00
parent 67ea8b2936
commit 21c15fe4ea

View File

@ -66,6 +66,9 @@ public class QuickTileService extends TileService {
@Override
public void onClick() {
if (tunnel != null) {
final Tile tile = getQsTile();
tile.setIcon(tile.getIcon() == iconOn ? iconOff : iconOn);
tile.updateTile();
tunnel.setState(State.TOGGLE).whenComplete(this::onToggleFinished);
} else {
final Intent intent = new Intent(this, MainActivity.class);