mirror of
https://github.com/apache/cordova-android.git
synced 2026-07-25 00:00:05 +08:00
fix(SystemBarPlugin): remove canEdgeToEdge check for execute method (#1971)
- Setting `StatusBarBackgroundColor` by `config.xml` is allowed and influences the light/dark appeareance of the status bar in edge-to-edge mode. This should also be possible by the Status Bar JS API method `setBackgroundColor``, so a user can dynamically change the light/dark appeareance of the status bar, even if the background color is not applied visually.
This commit is contained in:
@@ -80,10 +80,6 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
|
||||
@Override
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
if(canEdgeToEdge) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ("setStatusBarVisible".equals(action)) {
|
||||
boolean visible = args.getBoolean(0);
|
||||
cordova.getActivity().runOnUiThread(() -> setStatusBarVisible(visible));
|
||||
|
||||
Reference in New Issue
Block a user