fix #784, check storage permission before trying to import settings
This commit is contained in:
parent
1aade9c055
commit
971739631d
|
@ -692,6 +692,8 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
private fun setupImportSettings() {
|
||||
settings_import_holder.setOnClickListener {
|
||||
handlePermission(PERMISSION_READ_STORAGE) {
|
||||
if (it) {
|
||||
FilePickerDialog(this) {
|
||||
Thread {
|
||||
try {
|
||||
|
@ -703,6 +705,8 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseFile(path: String) {
|
||||
val inputStream = File(path).inputStream()
|
||||
|
|
Loading…
Reference in New Issue