From d43c87a869188d526a7a77c91d14673cc049defd Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 27 Nov 2017 00:43:34 +0100 Subject: QuickTileService: show app if no profiles exist Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/QuickTileService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/wireguard/android') diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java index 9f97c6c4..31ebe568 100644 --- a/app/src/main/java/com/wireguard/android/QuickTileService.java +++ b/app/src/main/java/com/wireguard/android/QuickTileService.java @@ -29,6 +29,8 @@ public class QuickTileService extends TileService { service.disable(config.getName()); else service.enable(config.getName()); + } else { + startActivityAndCollapse(new Intent(this, ConfigActivity.class)); } } @@ -60,8 +62,8 @@ public class QuickTileService extends TileService { } } else { tile.setIcon(Icon.createWithResource(this, R.drawable.ic_tile_disabled)); - tile.setLabel(getString(R.string.loading)); - tile.setState(Tile.STATE_UNAVAILABLE); + tile.setLabel(getString(R.string.app_name)); + tile.setState(Tile.STATE_INACTIVE); } tile.updateTile(); } -- cgit v1.2.3