Add annotation to remove warnings (#51)

This commit is contained in:
Jean-Baptiste 2024-04-21 12:25:27 +02:00 committed by GitHub
parent d7c5101820
commit c3625a844e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,6 +195,7 @@ public class WelcomeActivity extends AppCompatActivity {
window.setStatusBarColor(Color.TRANSPARENT); window.setStatusBarColor(Color.TRANSPARENT);
} }
@SuppressWarnings("deprecation")
private void setFullScreen() { private void setFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false); getWindow().setDecorFitsSystemWindows(false);
@ -204,7 +205,6 @@ public class WelcomeActivity extends AppCompatActivity {
controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE); controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
} }
} else { } else {
//noinspection
getWindow().getDecorView().setSystemUiVisibility( getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_FULLSCREEN View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION