[Android] Fix video playback crash
Geoffrey Métais
git at videolan.org
Fri Mar 18 10:06:47 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 18 09:18:56 2016 +0100| [0faabe8a80624c405db96cc16b311751a7801a16] | committer: Geoffrey Métais
Fix video playback crash
> https://code.videolan.org/videolan/vlc-android/commit/0faabe8a80624c405db96cc16b311751a7801a16
---
vlc-android/res/layout-v16/player_action_bar.xml | 4 ++--
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/vlc-android/res/layout-v16/player_action_bar.xml b/vlc-android/res/layout-v16/player_action_bar.xml
index 299155e..6ccc5c1 100644
--- a/vlc-android/res/layout-v16/player_action_bar.xml
+++ b/vlc-android/res/layout-v16/player_action_bar.xml
@@ -43,11 +43,11 @@
android:focusable="true"
android:visibility="gone" />
<!-- Useless views to fix Chrome OS build -->
- <view
+ <Space
android:id="@+id/player_overlay_systime"
android:layout_width="0dp"
android:layout_height="0dp" />
- <view
+ <Space
android:id="@+id/player_overlay_battery"
android:layout_width="0dp"
android:layout_height="0dp" />
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 9427830..9eba318 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -371,8 +371,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mActionBarView = (ViewGroup) mActionBar.getCustomView();
mTitle = (TextView) mActionBarView.findViewById(R.id.player_overlay_title);
- mSysTime = (TextView) findViewById(R.id.player_overlay_systime);
- mBattery = (TextView) findViewById(R.id.player_overlay_battery);
+ if (!AndroidUtil.isJellyBeanOrLater()) {
+ mSysTime = (TextView) findViewById(R.id.player_overlay_systime);
+ mBattery = (TextView) findViewById(R.id.player_overlay_battery);
+ }
mPlaylistToggle = (ImageView) findViewById(R.id.playlist_toggle);
mPlaylist = (RecyclerView) findViewById(R.id.video_playlist);
More information about the Android
mailing list