styleDefault is not working on some Android 12/13 devices, this PR makes it work again.
Description
The PR uses WindowInsetsControllerCompat.setAppearanceLightStatusBars instead of the deprecated SYSTEM_UI_FLAG_LIGHT_STATUS_BAR. Makes styleDefault work on new devices.
It's a breaking change because it requires androidx.core, which is only available on cordova-android > 9. At the moment the plugin doesn't have any cordova-android version requirement, so requiring cordova-android > 9 is breaking.
A separate PR would be sent to set the engines if this PR gets accepted.
Platforms affected
android
Motivation and Context
styleDefault is not working on some Android 12/13 devices, this PR makes it work again.
Description
The PR uses
WindowInsetsControllerCompat.setAppearanceLightStatusBars
instead of the deprecatedSYSTEM_UI_FLAG_LIGHT_STATUS_BAR
. MakesstyleDefault
work on new devices.It's a breaking change because it requires
androidx.core
, which is only available on cordova-android > 9. At the moment the plugin doesn't have any cordova-android version requirement, so requiring cordova-android > 9 is breaking.A separate PR would be sent to set the engines if this PR gets accepted.
closes https://github.com/apache/cordova-plugin-statusbar/issues/236
closes https://github.com/apache/cordova-plugin-statusbar/pull/235, which is a similar PR but uses deprecated methods.
Testing
Tested on real devices and emulators
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)