revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin

- Android EdgeToEdge was introduced in Android 15 and should only be used from there on
- Add small comment to the condition
This commit is contained in:
Manuel Beck
2026-06-23 23:02:52 +02:00
parent dd3fd3571e
commit 7364984909
2 changed files with 6 additions and 2 deletions
@@ -121,7 +121,9 @@ 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);
// Android Edge to Edge was introduced in Android 15 and can only be used from there on
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
String logLevel = preferences.getString("loglevel", "ERROR");
LOG.setLogLevel(logLevel);
@@ -55,7 +55,9 @@ public class SystemBarPlugin extends CordovaPlugin {
protected void pluginInitialize() {
context = cordova.getContext();
resources = context.getResources();
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
// Android Edge to Edge was introduced in Android 15 and can only be used from there on
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
}
@Override