diff options
author | Harsh Shandilya <harsh@prjkt.io> | 2018-08-12 18:13:04 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-26 11:04:01 -0600 |
commit | c677e67884a9a9ae81f72f5166fe531978747c13 (patch) | |
tree | 127a1834764201efde25c46ab8d156d9f53caea9 /app/src/main/java | |
parent | 0b8620e1273dd739c844cfa8586d1ef89bb141f4 (diff) |
QuickTileService: Don't use deprecated getDrawable method
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/QuickTileService.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java index 15b06670..22b4c384 100644 --- a/app/src/main/java/com/wireguard/android/QuickTileService.java +++ b/app/src/main/java/com/wireguard/android/QuickTileService.java @@ -58,14 +58,13 @@ public class QuickTileService extends TileService { return ret; } - @SuppressWarnings("deprecation") @Override public void onCreate() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { iconOff = iconOn = Icon.createWithResource(this, R.drawable.ic_tile); return; } - final SlashDrawable icon = new SlashDrawable(getResources().getDrawable(R.drawable.ic_tile)); + final SlashDrawable icon = new SlashDrawable(getResources().getDrawable(R.drawable.ic_tile, Application.get().getTheme())); icon.setAnimationEnabled(false); /* Unfortunately we can't have animations, since Icons are marshaled. */ icon.setSlashed(false); Bitmap b = Bitmap.createBitmap(icon.getIntrinsicWidth(), icon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); |