From 6eb4f1e997f8412b3dc9238b0068e0db874a6fd2 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 27 Sep 2023 13:10:31 -0700 Subject: [PATCH] Remove support for Android API < 23 in StatusBarModule (#39669) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39669 Since minsdk version was increased to 23, we are deleting code using Android APIs < 23 for class StatusBarModule changelog: [Android][Breaking] Remove support for Android API < 23 in StatusBarModule Reviewed By: NickGerleman Differential Revision: D48545516 fbshipit-source-id: ff79ac0d515b9a731c1c4ed861a73ce7998cb7f8 --- .../com/facebook/react/modules/statusbar/StatusBarModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java index 8e93ff6aae789e..a2f6ad02520a16 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java @@ -194,7 +194,7 @@ public void run() { insetsController.setSystemBarsAppearance( 0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS); } - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + } else { View decorView = activity.getWindow().getDecorView(); int systemUiVisibilityFlags = decorView.getSystemUiVisibility(); if ("dark-content".equals(style)) {