make OpenPath intent extras optional
This commit is contained in:
parent
8388415c7b
commit
e987a6eb07
2 changed files with 3 additions and 2 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.15.32'
|
||||
propVersionName = '5.15.33'
|
||||
kotlin_version = '1.3.41'
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import com.simplemobiletools.commons.views.MyTextView
|
|||
import kotlinx.android.synthetic.main.dialog_title.view.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
|
||||
fun AppCompatActivity.updateActionBarTitle(text: String, color: Int = baseConfig.primaryColor) {
|
||||
supportActionBar?.title = Html.fromHtml("<font color='${color.getContrastColor().toHex()}'>$text</font>")
|
||||
|
@ -290,7 +291,7 @@ fun Activity.openEditorIntent(path: String, forceChooser: Boolean, applicationId
|
|||
}
|
||||
}
|
||||
|
||||
fun Activity.openPathIntent(path: String, forceChooser: Boolean, applicationId: String, forceMimeType: String = "", extras: HashMap<String, Boolean>) {
|
||||
fun Activity.openPathIntent(path: String, forceChooser: Boolean, applicationId: String, forceMimeType: String = "", extras: HashMap<String, Boolean> = HashMap()) {
|
||||
ensureBackgroundThread {
|
||||
val newUri = getFinalUriFromPath(path, applicationId) ?: return@ensureBackgroundThread
|
||||
val mimeType = if (forceMimeType.isNotEmpty()) forceMimeType else getUriMimeType(path, newUri)
|
||||
|
|
Loading…
Reference in a new issue