File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ui/src/main/java/com/wireguard/android/activity Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import androidx.databinding.ObservableField
32
32
import androidx.lifecycle.lifecycleScope
33
33
import androidx.recyclerview.widget.GridLayoutManager
34
34
import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup
35
+ import com.google.android.material.dialog.MaterialAlertDialogBuilder
35
36
import com.wireguard.android.Application
36
37
import com.wireguard.android.R
37
38
import com.wireguard.android.backend.GoBackend
@@ -199,7 +200,12 @@ class TvMainActivity : AppCompatActivity() {
199
200
try {
200
201
tunnelFileImportResultLauncher.launch(" */*" )
201
202
} catch (_: Throwable ) {
202
- Toast .makeText(this @TvMainActivity, getString(R .string.tv_no_file_picker), Toast .LENGTH_LONG ).show()
203
+ MaterialAlertDialogBuilder (binding.root.context).setMessage(R .string.tv_no_file_picker).setCancelable(false ).setPositiveButton(android.R .string.ok) { _, _ ->
204
+ try {
205
+ startActivity(Intent (Intent .ACTION_VIEW , Uri .parse(" market://webstoreredirect" )))
206
+ } catch (_: Throwable ) {
207
+ }
208
+ }.show()
203
209
}
204
210
}
205
211
}
You can’t perform that action at this time.
0 commit comments