Rename unused caught exceptions to _
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ class BlacklistProvider @Inject constructor(
|
||||
} else {
|
||||
json.decodeFromString<MutableSet<String>>(rawBlacklist)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
mutableSetOf()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ object PackageUtil {
|
||||
|
||||
fun isArchived(context: Context, packageName: String): Boolean = try {
|
||||
isVAndAbove && context.packageManager.getArchivedPackage(packageName) != null
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
false
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ object PackageUtil {
|
||||
return try {
|
||||
val packageInfo = getPackageInfo(context, packageName)
|
||||
return versionCode > PackageInfoCompat.getLongVersionCode(packageInfo)
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
} catch (_: PackageManager.NameNotFoundException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
@@ -194,13 +194,13 @@ object PackageUtil {
|
||||
|
||||
fun getInstalledVersionName(context: Context, packageName: String): String = try {
|
||||
getPackageInfo(context, packageName).versionName ?: ""
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
} catch (_: PackageManager.NameNotFoundException) {
|
||||
""
|
||||
}
|
||||
|
||||
fun getInstalledVersionCode(context: Context, packageName: String): Long = try {
|
||||
PackageInfoCompat.getLongVersionCode(getPackageInfo(context, packageName))
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
} catch (_: PackageManager.NameNotFoundException) {
|
||||
0
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class DeviceMiuiSheet : BaseDialogSheet<SheetDeviceMiuiBinding>() {
|
||||
binding.btnPrimary.setOnClickListener {
|
||||
try {
|
||||
startActivity(Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS))
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
toast(R.string.toast_developer_setting_failed)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ class AppDetailsViewModel @Inject constructor(
|
||||
val exodusReport = json.decodeFromString<ExodusReport>(exodusObject.toString())
|
||||
|
||||
return exodusReport.reports
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
return emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user