diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java index b46a8e70295..bca3584524a 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java @@ -808,6 +808,12 @@ public class FlutterActivity extends Activity /*shouldDelayFirstAndroidViewDraw=*/ getRenderMode() == RenderMode.surface); } + /** + * @deprecated This method is outdated because it calls {@code setStatusBarColor}, which is + * deprecated in Android 15 and above. Consider using the new WindowInsetsController or other + * Android 15+ APIs for system UI styling. + */ + @Deprecated private void configureStatusBarForFullscreenFlutterExperience() { Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java index 033ea576b15..1af53203796 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java @@ -600,6 +600,12 @@ public class FlutterFragmentActivity extends FragmentActivity } } + /** + * @deprecated This method is outdated because it calls {@code setStatusBarColor}, which is + * deprecated in Android 15 and above. Consider using the new WindowInsetsController or other + * Android 15+ APIs for system UI styling. + */ + @Deprecated private void configureStatusBarForFullscreenFlutterExperience() { Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); diff --git a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index e798d76c7be..2c94fe9c70a 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -403,7 +403,13 @@ public class PlatformPlugin { updateSystemUiOverlays(); } - @SuppressWarnings("deprecation") + /** + * @deprecated This method is outdated because it calls {@code setStatusBarColor}, {@code + * setNavigationBarColor} and {@code setNavigationBarDividerColor}, which are deprecated in + * Android 15 and above. Consider using the new WindowInsetsController or other Android 15+ + * APIs for system UI styling. + */ + @Deprecated private void setSystemChromeSystemUIOverlayStyle( PlatformChannel.SystemChromeStyle systemChromeStyle) { Window window = activity.getWindow();