Skip to content

Commit

Permalink
防止播放界面调用外部软件打开视频时videoURL空指针异常
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixc committed Jan 28, 2024
1 parent dce1243 commit b7075bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ void openMyVideo() {
Intent i = new Intent();
i.addCategory(Intent.CATEGORY_DEFAULT);
i.setAction(android.content.Intent.ACTION_VIEW);
if (videoURL == null) return;
i.setDataAndType(Uri.parse(videoURL), "video/*");
startActivity(Intent.createChooser(i, "Open Video with ..."));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ void openMyVideo() {
Intent i = new Intent();
i.addCategory(Intent.CATEGORY_DEFAULT);
i.setAction(android.content.Intent.ACTION_VIEW);
if (videoURL == null) return;
i.setDataAndType(Uri.parse(videoURL), "video/*");
startActivity(Intent.createChooser(i, "Open Video with ..."));
}
Expand Down

0 comments on commit b7075bd

Please sign in to comment.