Skip to content

Commit dede488

Browse files
committed
improve: setup chooser
1 parent 5a3e87f commit dede488

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/io/neoterm/ui/setup/SetupActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ class SetupActivity : AppCompatActivity(), View.OnClickListener, ResultListener
134134
R.id.setup_method_backup,
135135
R.id.setup_method_local -> {
136136
val intent = Intent(Intent.ACTION_GET_CONTENT)
137-
intent.addCategory(Intent.CATEGORY_OPENABLE)
138-
intent.type = "*/*";
137+
intent.type = "*/*"
139138
try {
140-
startActivityForResult(intent, REQUEST_SELECT_PARAMETER)
139+
startActivityForResult( Intent.createChooser(intent, getString(R.string.setup_local)),
140+
REQUEST_SELECT_PARAMETER)
141141
} catch (ignore: ActivityNotFoundException) {
142142
Toast.makeText(this, R.string.no_file_picker, Toast.LENGTH_SHORT).show()
143143
}

0 commit comments

Comments
 (0)