From 535c611f2d4cf4bfdc99e0eb3400b7bd09d55477 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 12 Aug 2018 18:13:04 +0530 Subject: QuickTileService: Don't use deprecated getDrawable method Signed-off-by: Harsh Shandilya --- app/src/main/java/com/wireguard/android/QuickTileService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (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 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); -- cgit v1.2.3