summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/android/QuickTileService.java
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-07-12 19:10:35 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-13 03:46:23 +0200
commit67ea8b2936343526ff0b3f476c515f0e11dbb272 (patch)
tree84f904d66f6111a7d8f897164eb236bc62199cae /app/src/main/java/com/wireguard/android/QuickTileService.java
parentfbaa4d9ab1b59ba4610fe273743872f35e7e9091 (diff)
global: Add nullity annotations
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/QuickTileService.java')
-rw-r--r--app/src/main/java/com/wireguard/android/QuickTileService.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java
index 77f01502..008fdee8 100644
--- a/app/src/main/java/com/wireguard/android/QuickTileService.java
+++ b/app/src/main/java/com/wireguard/android/QuickTileService.java
@@ -12,12 +12,11 @@ import android.databinding.Observable;
import android.databinding.Observable.OnPropertyChangedCallback;
import android.graphics.Bitmap;
import android.graphics.Canvas;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Build;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
+import android.support.annotation.Nullable;
import android.util.Log;
import android.widget.Toast;
@@ -41,9 +40,9 @@ public class QuickTileService extends TileService {
private final OnStateChangedCallback onStateChangedCallback = new OnStateChangedCallback();
private final OnTunnelChangedCallback onTunnelChangedCallback = new OnTunnelChangedCallback();
- private Tunnel tunnel;
- private Icon iconOn;
- private Icon iconOff;
+ @Nullable private Tunnel tunnel;
+ @Nullable private Icon iconOn;
+ @Nullable private Icon iconOff;
@SuppressWarnings("deprecation")
@Override
@@ -91,7 +90,7 @@ public class QuickTileService extends TileService {
}
private void onToggleFinished(@SuppressWarnings("unused") final State state,
- final Throwable throwable) {
+ @Nullable final Throwable throwable) {
if (throwable == null)
return;
final String error = ExceptionLoggers.unwrapMessage(throwable);