From 162b6397050e1577c113a88e7b7cfe9f98e6a45c Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 30 Nov 2023 22:19:38 -0500 Subject: [PATCH] Remove unused resources --- .../util/system/ContextExtensions.kt | 30 ------------------- .../main/res/color/ripple_toolbar_fainter.xml | 5 ---- .../main/res/color/slider_active_track.xml | 5 ---- .../main/res/color/slider_inactive_track.xml | 5 ---- app/src/main/res/drawable/ic_blank_24dp.xml | 7 ----- .../main/res/drawable/ic_offline_pin_24dp.xml | 9 ------ app/src/main/res/drawable/ic_webview_24dp.xml | 7 ----- .../drawable/transparent_tabs_background.xml | 16 ---------- app/src/main/res/values-sw720dp/dimens.xml | 3 -- app/src/main/res/values/dimens.xml | 2 -- 10 files changed, 89 deletions(-) delete mode 100644 app/src/main/res/color/ripple_toolbar_fainter.xml delete mode 100644 app/src/main/res/color/slider_active_track.xml delete mode 100644 app/src/main/res/color/slider_inactive_track.xml delete mode 100644 app/src/main/res/drawable/ic_blank_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_offline_pin_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_webview_24dp.xml delete mode 100644 app/src/main/res/drawable/transparent_tabs_background.xml delete mode 100644 app/src/main/res/values-sw720dp/dimens.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt index 5f91bfbacc..44635e98dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt @@ -1,13 +1,11 @@ package eu.kanade.tachiyomi.util.system -import android.app.ActivityManager import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.Intent import android.content.pm.PackageManager import android.content.res.Configuration -import android.graphics.drawable.Drawable import android.net.Uri import android.os.Build import android.os.PowerManager @@ -68,26 +66,6 @@ fun Context.hasPermission( val Context.powerManager: PowerManager get() = getSystemService()!! -/** - * Convenience method to acquire a partial wake lock. - */ -fun Context.acquireWakeLock(tag: String): PowerManager.WakeLock { - val wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "$tag:WakeLock") - wakeLock.acquire() - return wakeLock -} - -/** - * Returns true if the given service class is running. - */ -fun Context.isServiceRunning(serviceClass: Class<*>): Boolean { - val className = serviceClass.name - val manager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager - @Suppress("DEPRECATION") - return manager.getRunningServices(Integer.MAX_VALUE) - .any { className == it.service.className } -} - fun Context.openInBrowser(url: String, forceDefaultBrowser: Boolean = false) { this.openInBrowser(url.toUri(), forceDefaultBrowser) } @@ -200,11 +178,3 @@ fun Context.isInstalledFromFDroid(): Boolean { // F-Droid builds typically disable the updater (!BuildConfig.INCLUDE_UPDATER && !isDevFlavor) } - -fun Context.getApplicationIcon(pkgName: String): Drawable? { - return try { - packageManager.getApplicationIcon(pkgName) - } catch (e: PackageManager.NameNotFoundException) { - null - } -} diff --git a/app/src/main/res/color/ripple_toolbar_fainter.xml b/app/src/main/res/color/ripple_toolbar_fainter.xml deleted file mode 100644 index e7fb4ba66b..0000000000 --- a/app/src/main/res/color/ripple_toolbar_fainter.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/color/slider_active_track.xml b/app/src/main/res/color/slider_active_track.xml deleted file mode 100644 index 764d21bf3d..0000000000 --- a/app/src/main/res/color/slider_active_track.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/color/slider_inactive_track.xml b/app/src/main/res/color/slider_inactive_track.xml deleted file mode 100644 index 0f624c1173..0000000000 --- a/app/src/main/res/color/slider_inactive_track.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_blank_24dp.xml b/app/src/main/res/drawable/ic_blank_24dp.xml deleted file mode 100644 index 940db069fd..0000000000 --- a/app/src/main/res/drawable/ic_blank_24dp.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_offline_pin_24dp.xml b/app/src/main/res/drawable/ic_offline_pin_24dp.xml deleted file mode 100644 index f3dcb36251..0000000000 --- a/app/src/main/res/drawable/ic_offline_pin_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_webview_24dp.xml b/app/src/main/res/drawable/ic_webview_24dp.xml deleted file mode 100644 index 9400f45ed1..0000000000 --- a/app/src/main/res/drawable/ic_webview_24dp.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/transparent_tabs_background.xml b/app/src/main/res/drawable/transparent_tabs_background.xml deleted file mode 100644 index a503ef6985..0000000000 --- a/app/src/main/res/drawable/transparent_tabs_background.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/main/res/values-sw720dp/dimens.xml b/app/src/main/res/values-sw720dp/dimens.xml deleted file mode 100644 index 5cb983dc47..0000000000 --- a/app/src/main/res/values-sw720dp/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 24dp - diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e822887675..af52b6c3dd 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,6 +1,4 @@ - 16dp - 16dp 12dp