File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ui/src/main/java/com/wireguard/android/activity Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ import kotlinx.coroutines.withContext
57
57
import java.io.File
58
58
59
59
class TvMainActivity : AppCompatActivity () {
60
- private val tunnelFileImportResultLauncher = registerForActivityResult(object : ActivityResultContracts .GetContent () {
61
- override fun createIntent (context : Context , input : String ): Intent {
60
+ private val tunnelFileImportResultLauncher = registerForActivityResult(object : ActivityResultContracts .OpenDocument () {
61
+ override fun createIntent (context : Context , input : Array < String > ): Intent {
62
62
val intent = super .createIntent(context, input)
63
63
64
64
/* AndroidTV now comes with stubs that do nothing but display a Toast less helpful than
@@ -209,7 +209,7 @@ class TvMainActivity : AppCompatActivity() {
209
209
}
210
210
} else {
211
211
try {
212
- tunnelFileImportResultLauncher.launch(" */*" )
212
+ tunnelFileImportResultLauncher.launch(arrayOf( " */*" ) )
213
213
} catch (_: Throwable ) {
214
214
MaterialAlertDialogBuilder (binding.root.context).setMessage(R .string.tv_no_file_picker).setCancelable(false )
215
215
.setPositiveButton(android.R .string.ok) { _, _ ->
You can’t perform that action at this time.
0 commit comments