mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
android: update dark mode minimum (#26623)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/26623 I noticed the min version was 10. It is actually 9 if we consider users with developer option turned on. Changelog: [Android][Fixed] - Updated Appearance module to allow Android 9/P devices. Differential Revision: D17632656 fbshipit-source-id: 893699ae37ab1cef64fe2547e0f2d6858bf3c48c
This commit is contained in:
committed by
Facebook Github Bot
parent
b53d3d80f9
commit
8dcb6ee91f
+2
-3
@@ -23,7 +23,6 @@ public class AppearanceModule extends ReactContextBaseJavaModule {
|
||||
public static final String NAME = "Appearance";
|
||||
|
||||
private static final String APPEARANCE_CHANGED_EVENT_NAME = "appearanceChanged";
|
||||
private static final int ANDROID_TEN = 29;
|
||||
|
||||
private String mColorScheme = "light";
|
||||
|
||||
@@ -34,8 +33,8 @@ public class AppearanceModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
private static String colorSchemeForCurrentConfiguration(Context context) {
|
||||
// TODO: (hramos) T52929922: Switch to Build.VERSION_CODES.ANDROID_TEN or equivalent
|
||||
if (Build.VERSION.SDK_INT >= ANDROID_TEN) {
|
||||
// Night Mode is only available in Android P and up.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
int currentNightMode =
|
||||
context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
switch (currentNightMode) {
|
||||
|
||||
Reference in New Issue
Block a user