Skip to content

Commit

Permalink
Expose UI_MODE_TYPE_VR_HEADSET in PlatformConstants
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Aug 9, 2022
1 parent 584b968 commit 77c256c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ private String uiMode() {
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:
Expand Down

0 comments on commit 77c256c

Please sign in to comment.