mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Finish PlayerActivity if cleartext not permitted
This is inline with other show-toast-on-error cases in this method, and avoids leaving the user on a completely black screen. Note that the maybeRequestReadExternalStoragePermission is an exception because it's not actually an error case. #minor-release PiperOrigin-RevId: 343264869
This commit is contained in:
parent
2714fb0241
commit
622a44dce0
1 changed files with 1 additions and 0 deletions
|
|
@ -325,6 +325,7 @@ public class PlayerActivity extends AppCompatActivity
|
||||||
|
|
||||||
if (!Util.checkCleartextTrafficPermitted(mediaItem)) {
|
if (!Util.checkCleartextTrafficPermitted(mediaItem)) {
|
||||||
showToast(R.string.error_cleartext_not_permitted);
|
showToast(R.string.error_cleartext_not_permitted);
|
||||||
|
finish();
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
if (Util.maybeRequestReadExternalStoragePermission(/* activity= */ this, mediaItem)) {
|
if (Util.maybeRequestReadExternalStoragePermission(/* activity= */ this, mediaItem)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue