diff options
author | Andrew Dolgov <[email protected]> | 2015-08-18 19:35:38 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-08-18 19:35:38 +0300 |
commit | 8e53a7aa88044426df74219dde6ba1ee14d80472 (patch) | |
tree | 0b14a6062642580d9170d88a35a8b85e0fa63979 /org.fox.ttrss/src/main/java | |
parent | 792f7cc7222744190dfd0b60d96beb4745755da7 (diff) |
fix sharing of article videos; do not crash if prepareasync has already been called
Diffstat (limited to 'org.fox.ttrss/src/main/java')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java index 48a0e9ff..92c63b48 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java @@ -143,7 +143,11 @@ public class VideoPlayerActivity extends CommonActivity { @Override
public void surfaceCreated(SurfaceHolder holder) {
mediaPlayer.setDisplay(holder);
- mediaPlayer.prepareAsync();
+ try {
+ mediaPlayer.prepareAsync();
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ }
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
@@ -238,6 +242,7 @@ public class VideoPlayerActivity extends CommonActivity { if (m_streamUri != null) {
Intent intent = new Intent(Intent.ACTION_SEND);
+ intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, m_streamUri);
intent.putExtra(Intent.EXTRA_TEXT, m_streamUri);
|