Address some IDE warnings

This commit is contained in:
arkon
2021-12-17 12:30:41 -05:00
parent 65062b4bcb
commit 532a1b1aba
11 changed files with 61 additions and 61 deletions

View File

@@ -110,7 +110,7 @@ internal class ExtensionInstaller(private val context: Context) {
.map {
downloadManager.query(query).use { cursor ->
cursor.moveToFirst()
cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))
cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS))
}
}
// Ignore duplicate results
@@ -249,7 +249,7 @@ internal class ExtensionInstaller(private val context: Context) {
downloadManager.query(query).use { cursor ->
if (cursor.moveToFirst()) {
val localUri = cursor.getString(
cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)
cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LOCAL_URI)
).removePrefix(FILE_SCHEME)
installApk(id, File(localUri).getUriCompat(context))