diff --git a/app/build.gradle b/app/build.gradle index 547286b4..b5ad47eb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,13 +7,13 @@ def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion 29 + buildToolsVersion "29.0.2" defaultConfig { applicationId "com.simplemobiletools.filemanager.pro" minSdkVersion 21 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 79 versionName "6.3.7" multiDexEnabled true @@ -52,7 +52,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.18.30' + implementation 'com.simplemobiletools:commons:5.20.2' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index 803045d0..6e49b88d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -198,10 +198,10 @@ class MainActivity : SimpleActivity() { private fun initFileManager() { if (intent.action == Intent.ACTION_VIEW && intent.data != null) { val data = intent.data - if (data.scheme == "file") { - openPath(data.path) + if (data?.scheme == "file") { + openPath(data.path!!) } else { - val path = getRealPathFromURI(data) + val path = getRealPathFromURI(data!!) if (path != null) { openPath(path) } else { @@ -209,8 +209,8 @@ class MainActivity : SimpleActivity() { } } - if (!File(data.path).isDirectory) { - tryOpenPathIntent(data.path, false) + if (!File(data.path!!).isDirectory) { + tryOpenPathIntent(data.path!!, false) } } else { openPath(config.homeFolder) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt index 4a4f563f..2d34ad78 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt @@ -62,7 +62,7 @@ class ReadTextActivity : SimpleActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.menu_save -> saveText() - R.id.menu_open_with -> openPath(intent.dataString, true) + R.id.menu_open_with -> openPath(intent.dataString!!, true) R.id.menu_print -> printText() else -> return super.onOptionsItemSelected(item) } @@ -108,7 +108,7 @@ class ReadTextActivity : SimpleActivity() { private fun saveText() { if (filePath.isEmpty()) { - filePath = getRealPathFromURI(intent.data) ?: "" + filePath = getRealPathFromURI(intent.data!!) ?: "" } SaveAsDialog(this, filePath) { @@ -165,7 +165,7 @@ class ReadTextActivity : SimpleActivity() { ensureBackgroundThread { originalText = if (uri.scheme == "file") { - filePath = uri.path + filePath = uri.path!! val file = File(filePath) if (file.exists()) { file.readText() @@ -175,7 +175,7 @@ class ReadTextActivity : SimpleActivity() { } } else { try { - contentResolver.openInputStream(uri).bufferedReader().use { it.readText() } + contentResolver.openInputStream(uri)!!.bufferedReader().use { it.readText() } } catch (e: Exception) { showErrorToast(e) finish() diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt index 2d879eba..4eb34cb6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt @@ -315,7 +315,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList - get() = prefs.getStringSet(FAVORITES, HashSet()) + get() = prefs.getStringSet(FAVORITES, HashSet())!! set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply() fun saveFolderSorting(path: String, value: Int) { diff --git a/build.gradle b/build.gradle index d28a976a..684c611c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.3.61' repositories { google()