From 21c15fe4ea6472517d672da46d9aa774a9e3253c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 13 Jul 2018 03:57:02 +0200 Subject: QuickTileService: show intermediate state when changing Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/QuickTileService.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java index 008fdee8..8630ccfd 100644 --- a/app/src/main/java/com/wireguard/android/QuickTileService.java +++ b/app/src/main/java/com/wireguard/android/QuickTileService.java @@ -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); -- cgit v1.2.3