mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Expose UI_MODE_TYPE_VR_HEADSET in PlatformConstants
Summary: The Android version of PlatformConstants exposes the device's [UI Mode]( https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier). It is missing the case for 'vrheadset', added in Android API 26. We should return the expected result when this is queried. Changelog: [Android][Added] - Expose UI_MODE_TYPE_VR_HEADSET in PlatformConstants Reviewed By: rshest Differential Revision: D38495875 fbshipit-source-id: fd904bd11213448415b7d75145d9ba6311ed407b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
584b968683
commit
77c256ca91
+2
@@ -50,6 +50,8 @@ public class AndroidInfoModule extends NativePlatformConstantsAndroidSpec implem
|
||||
return "desk";
|
||||
case Configuration.UI_MODE_TYPE_WATCH:
|
||||
return "watch";
|
||||
case Configuration.UI_MODE_TYPE_VR_HEADSET:
|
||||
return "vrheadset";
|
||||
case Configuration.UI_MODE_TYPE_NORMAL:
|
||||
return "normal";
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user