NOTE for legacy version: Removed Lint markers and completely dropped Jelly Bean workarounds

This commit is contained in:
Robin 2019-03-05 19:48:39 +01:00
parent 4d80bdcc9f
commit 7d68cff700
2 changed files with 3 additions and 19 deletions

View file

@ -282,15 +282,9 @@ public final class MainVideoPlayer extends AppCompatActivity
if (DEBUG) Log.d(TAG, "showSystemUi() called"); if (DEBUG) Log.d(TAG, "showSystemUi() called");
if (playerImpl != null && playerImpl.queueVisible) return; if (playerImpl != null && playerImpl.queueVisible) return;
final int visibility; final int visibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
visibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
} else {
//noinspection deprecation
visibility = View.STATUS_BAR_VISIBLE;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@ColorInt final int systenUiColor = @ColorInt final int systenUiColor =
@ -359,12 +353,7 @@ public final class MainVideoPlayer extends AppCompatActivity
protected void setShuffleButton(final ImageButton shuffleButton, final boolean shuffled) { protected void setShuffleButton(final ImageButton shuffleButton, final boolean shuffled) {
final int shuffleAlpha = shuffled ? 255 : 77; final int shuffleAlpha = shuffled ? 255 : 77;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { shuffleButton.setImageAlpha(shuffleAlpha);
shuffleButton.setImageAlpha(shuffleAlpha);
} else {
//noinspection deprecation
shuffleButton.setAlpha(shuffleAlpha);
}
} }
private boolean isInMultiWindow() { private boolean isInMultiWindow() {

View file

@ -653,12 +653,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
} }
final int shuffleAlpha = shuffled ? 255 : 77; final int shuffleAlpha = shuffled ? 255 : 77;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { shuffleButton.setImageAlpha(shuffleAlpha);
shuffleButton.setImageAlpha(shuffleAlpha);
} else {
//noinspection deprecation
shuffleButton.setAlpha(shuffleAlpha);
}
} }
private void onPlaybackParameterChanged(final PlaybackParameters parameters) { private void onPlaybackParameterChanged(final PlaybackParameters parameters) {