QuickTileService: show intermediate state when changing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
67ea8b2936
commit
21c15fe4ea
@ -66,6 +66,9 @@ public class QuickTileService extends TileService {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick() {
|
public void onClick() {
|
||||||
if (tunnel != null) {
|
if (tunnel != null) {
|
||||||
|
final Tile tile = getQsTile();
|
||||||
|
tile.setIcon(tile.getIcon() == iconOn ? iconOff : iconOn);
|
||||||
|
tile.updateTile();
|
||||||
tunnel.setState(State.TOGGLE).whenComplete(this::onToggleFinished);
|
tunnel.setState(State.TOGGLE).whenComplete(this::onToggleFinished);
|
||||||
} else {
|
} else {
|
||||||
final Intent intent = new Intent(this, MainActivity.class);
|
final Intent intent = new Intent(this, MainActivity.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user