Commit 1f518958 authored by Geoffrey Métais's avatar Geoffrey Métais

VideoPlayerActivity: Prevent ClassCastException

On Android 4.0.x

(cherry picked from commit e943418c)
parent a20eb7a7
......@@ -385,8 +385,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mTitle = mActionBarView.findViewById(R.id.player_overlay_title);
if (!AndroidUtil.isJellyBeanOrLater) {
mSysTime = (TextView) findViewById(R.id.player_overlay_systime);
mBattery = (TextView) findViewById(R.id.player_overlay_battery);
View v = findViewById(R.id.player_overlay_systime);
if (v instanceof TextView) mSysTime = (TextView) v;
v = findViewById(R.id.player_overlay_battery);
if (v instanceof TextView) mBattery = (TextView) v;
}
mPlaylistToggle = (ImageView) findViewById(R.id.playlist_toggle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment