mirror of
https://github.com/apache/cordova-android.git
synced 2026-07-06 00:00:08 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user