Cleanup some warnings

This commit is contained in:
tarsin committed 2023-03-08 20:05:24 +08:00
1 parent 56ea23c4bf
commit 7958785588
1 file changed
-21
@@ -217,26 +217,6 @@ fun Context.getUriSize(uri: Uri): Long? {
return UniFile.fromUri(this, uri).length().takeIf { it >= 0 }
}
/**
* Returns true if [packageName] is installed.
*/
fun Context.isPackageInstalled(packageName: String): Boolean {
return try {
packageManager.getApplicationInfo(packageName, 0)
true
} catch (e: PackageManager.NameNotFoundException) {
false
}
}
fun Context.getApplicationIcon(pkgName: String): Drawable? {
return try {
packageManager.getApplicationIcon(pkgName)
} catch (e: PackageManager.NameNotFoundException) {
null
}
}
/**
* Gets system's config_navBarNeedsScrim boolean flag added in Android 10, defaults to true.
*/
@@ -253,7 +233,6 @@ fun Context.isNavigationBarNeedsScrim(): Boolean {
*/
fun Context.createReaderThemeContext(): Context {
return this
TODO()
}
inline fun Any.logcat(priority: Int = Log.DEBUG, tag: String? = null, message: () -> String) {