mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
updating kotlin, commons, target SDK
This commit is contained in:
@ -7,13 +7,13 @@ def keystoreProperties = new Properties()
|
|||||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 29
|
||||||
buildToolsVersion "28.0.3"
|
buildToolsVersion "29.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.filemanager.pro"
|
applicationId "com.simplemobiletools.filemanager.pro"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 29
|
||||||
versionCode 79
|
versionCode 79
|
||||||
versionName "6.3.7"
|
versionName "6.3.7"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@ -52,7 +52,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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:RootTools:df729dcb13'
|
||||||
implementation 'com.github.Stericson:RootShell:1.6'
|
implementation 'com.github.Stericson:RootShell:1.6'
|
||||||
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
||||||
|
@ -198,10 +198,10 @@ class MainActivity : SimpleActivity() {
|
|||||||
private fun initFileManager() {
|
private fun initFileManager() {
|
||||||
if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
|
if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
|
||||||
val data = intent.data
|
val data = intent.data
|
||||||
if (data.scheme == "file") {
|
if (data?.scheme == "file") {
|
||||||
openPath(data.path)
|
openPath(data.path!!)
|
||||||
} else {
|
} else {
|
||||||
val path = getRealPathFromURI(data)
|
val path = getRealPathFromURI(data!!)
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
openPath(path)
|
openPath(path)
|
||||||
} else {
|
} else {
|
||||||
@ -209,8 +209,8 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File(data.path).isDirectory) {
|
if (!File(data.path!!).isDirectory) {
|
||||||
tryOpenPathIntent(data.path, false)
|
tryOpenPathIntent(data.path!!, false)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
openPath(config.homeFolder)
|
openPath(config.homeFolder)
|
||||||
|
@ -62,7 +62,7 @@ class ReadTextActivity : SimpleActivity() {
|
|||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.menu_save -> saveText()
|
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()
|
R.id.menu_print -> printText()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ class ReadTextActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun saveText() {
|
private fun saveText() {
|
||||||
if (filePath.isEmpty()) {
|
if (filePath.isEmpty()) {
|
||||||
filePath = getRealPathFromURI(intent.data) ?: ""
|
filePath = getRealPathFromURI(intent.data!!) ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveAsDialog(this, filePath) {
|
SaveAsDialog(this, filePath) {
|
||||||
@ -165,7 +165,7 @@ class ReadTextActivity : SimpleActivity() {
|
|||||||
|
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
originalText = if (uri.scheme == "file") {
|
originalText = if (uri.scheme == "file") {
|
||||||
filePath = uri.path
|
filePath = uri.path!!
|
||||||
val file = File(filePath)
|
val file = File(filePath)
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
file.readText()
|
file.readText()
|
||||||
@ -175,7 +175,7 @@ class ReadTextActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
contentResolver.openInputStream(uri).bufferedReader().use { it.readText() }
|
contentResolver.openInputStream(uri)!!.bufferedReader().use { it.readText() }
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
finish()
|
finish()
|
||||||
|
@ -315,7 +315,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
|
|||||||
|
|
||||||
private fun copyPath() {
|
private fun copyPath() {
|
||||||
val clip = ClipData.newPlainText(activity.getString(R.string.app_name), getFirstSelectedItemPath())
|
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()
|
finishActMode()
|
||||||
activity.toast(R.string.path_copied)
|
activity.toast(R.string.path_copied)
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
|
|||||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||||
super.onViewStateRestored(savedInstanceState)
|
super.onViewStateRestored(savedInstanceState)
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
currentPath = savedInstanceState.getString(PATH)
|
currentPath = savedInstanceState.getString(PATH)!!
|
||||||
storedItems.clear()
|
storedItems.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
|
|
||||||
var homeFolder: String
|
var homeFolder: String
|
||||||
get(): String {
|
get(): String {
|
||||||
var path = prefs.getString(HOME_FOLDER, "")
|
var path = prefs.getString(HOME_FOLDER, "")!!
|
||||||
if (path.isEmpty() || !File(path).isDirectory) {
|
if (path.isEmpty() || !File(path).isDirectory) {
|
||||||
path = context.getInternalStoragePath()
|
path = context.getInternalStoragePath()
|
||||||
homeFolder = path
|
homeFolder = path
|
||||||
@ -59,7 +59,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var favorites: MutableSet<String>
|
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()
|
set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply()
|
||||||
|
|
||||||
fun saveFolderSorting(path: String, value: Int) {
|
fun saveFolderSorting(path: String, value: Int) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.3.50'
|
ext.kotlin_version = '1.3.61'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
Reference in New Issue
Block a user