Skip to content

Commit 58701d7

Browse files
feat(android): enable edge-to-edge support for Android 9 and above
The goal here is to add back an approximation of the old preference StatusBarOverlaysWebview. We did this by removing the API 35, android 15, version gate on the AndroidEdgeToEdge preference, allowing edge-to-edge mode to be enabled on Android 9+ (API 28). We can do this now because AndroidEdgeToEdge is still opt in, so we can enforce an OutSystemsUI upgrade on users who choose to opt in. We couldn't do this before when it was originally going to be the default to be opted in, as that would force a breaking change on users.
1 parent 26f5ad0 commit 58701d7

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

framework/src/org/apache/cordova/CordovaActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ public void onCreate(Bundle savedInstanceState) {
119119
// need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception
120120
loadConfig();
121121

122-
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
123-
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
122+
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
124123

125124
String logLevel = preferences.getString("loglevel", "ERROR");
126125
LOG.setLogLevel(logLevel);

framework/src/org/apache/cordova/SystemBarPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public class SystemBarPlugin extends CordovaPlugin {
5555
protected void pluginInitialize() {
5656
context = cordova.getContext();
5757
resources = context.getResources();
58-
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
59-
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
58+
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
6059
}
6160

6261
@Override

0 commit comments

Comments
 (0)