This is an automated email from the ASF dual-hosted git repository.
GitToTheHub pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git
The following commit(s) were added to refs/heads/master by this push:
new 190076ba chore: simplify edge-to-edge preference logic in
CordovaActivity and SystemBarPlugin (#1902)
190076ba is described below
commit 190076ba1845c7ec48240f1ec0281c0f999a1414
Author: seamlink-aalves <[email protected]>
AuthorDate: Mon Apr 20 17:00:47 2026 +0100
chore: simplify edge-to-edge preference logic in CordovaActivity and
SystemBarPlugin (#1902)
- Remove the limitation for Android version <15 when preference
AndroidEdgeToEdge is true.
- The motivation and context was described here: apache/cordova-discuss#114
- When having cordova android in Edge To Edge the app does not extend to
the full height of the device in version bellow Android 15. This change allows
the app to behave the same way it was possible to do with the statusbar plugin
preference StatusBarOverlaysWebView given that this stopped having any effect
in cordova-android 15.
---
framework/src/org/apache/cordova/CordovaActivity.java | 3 +--
framework/src/org/apache/cordova/SystemBarPlugin.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java
b/framework/src/org/apache/cordova/CordovaActivity.java
index 114727d4..3a046981 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -121,8 +121,7 @@ public class CordovaActivity extends AppCompatActivity {
// need to activate preferences before super.onCreate to avoid
"requestFeature() must be called before adding content" exception
loadConfig();
- canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
- && Build.VERSION.SDK_INT >=
Build.VERSION_CODES.VANILLA_ICE_CREAM;
+ canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
String logLevel = preferences.getString("loglevel", "ERROR");
LOG.setLogLevel(logLevel);
diff --git a/framework/src/org/apache/cordova/SystemBarPlugin.java
b/framework/src/org/apache/cordova/SystemBarPlugin.java
index 0df7a589..097fcbbc 100644
--- a/framework/src/org/apache/cordova/SystemBarPlugin.java
+++ b/framework/src/org/apache/cordova/SystemBarPlugin.java
@@ -55,8 +55,7 @@ public class SystemBarPlugin extends CordovaPlugin {
protected void pluginInitialize() {
context = cordova.getContext();
resources = context.getResources();
- canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
- && Build.VERSION.SDK_INT >=
Build.VERSION_CODES.VANILLA_ICE_CREAM;
+ canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]