mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Deprecated methods that call setStatusBarColor, setNavigationBarColor, setNavigationBarDividerColor (#165737)
Added @deprecated annotation and explanation to methods that use these methods: setStatusBarColor, setNavigationBarColor, setNavigationBarDividerColor This PR partially addresses #165327 --------- Co-authored-by: Reid Baker <1063596+reidbaker@users.noreply.github.com> Co-authored-by: Camille Simon <43054281+camsim99@users.noreply.github.com> Co-authored-by: Camille Simon <camillesimon@google.com>
This commit is contained in:
parent
7141eb3bdc
commit
9eddcb7ba4
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user