updating kotlin, commons, target SDK

This commit is contained in:
tibbi 2019-11-28 19:52:00 +01:00
parent dadf958a1b
commit ff5e43835f
7 changed files with 18 additions and 18 deletions

View File

@ -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'

View File

@ -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)

View File

@ -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()

View File

@ -315,7 +315,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
private fun copyPath() {
val clip = ClipData.newPlainText(activity.getString(R.string.app_name), getFirstSelectedItemPath())
(activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager).primaryClip = clip
(activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager).setPrimaryClip(clip)
finishActMode()
activity.toast(R.string.path_copied)
}

View File

@ -71,7 +71,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
override fun onViewStateRestored(savedInstanceState: Bundle?) {
super.onViewStateRestored(savedInstanceState)
if (savedInstanceState != null) {
currentPath = savedInstanceState.getString(PATH)
currentPath = savedInstanceState.getString(PATH)!!
storedItems.clear()
}
}

View File

@ -22,7 +22,7 @@ class Config(context: Context) : BaseConfig(context) {
var homeFolder: String
get(): String {
var path = prefs.getString(HOME_FOLDER, "")
var path = prefs.getString(HOME_FOLDER, "")!!
if (path.isEmpty() || !File(path).isDirectory) {
path = context.getInternalStoragePath()
homeFolder = path
@ -59,7 +59,7 @@ class Config(context: Context) : BaseConfig(context) {
}
var favorites: MutableSet<String>
get() = prefs.getStringSet(FAVORITES, HashSet<String>())
get() = prefs.getStringSet(FAVORITES, HashSet<String>())!!
set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply()
fun saveFolderSorting(path: String, value: Int) {

View File

@ -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()