Repository navigation
Adapt the main screen to Meta Quest headsets - #3
Merged
Merged
Conversation
On a Quest 3, the proximity sensor puts the headset to sleep when it is taken off, so Stay awake and Keep screen on have no effect. The Quest also never sets development_settings_enabled, so the Developer options warning always showed. Detect a Quest by the oculus.hardware.standalone_vr system feature. On a Quest, hide the two keep-awake features with a note that says why, hide the Developer options warning, and point the setup steps at the Meta Horizon app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The app now detects a Meta Quest headset and adapts its main screen:
oculus.hardware.standalone_vrsystem feature, which every Quest model has. The logic is indata/DevicePlatform.kt, free of Android framework calls, with unit tests inDevicePlatformTest.Phones behave exactly as before.
Why
Testing on a Quest 3 (Horizon OS, Android 14) showed:
stay_on_while_plugged_inset to 7 and aSCREEN_BRIGHT_WAKE_LOCKheld. So the two keep-awake features have no effect.development_settings_enabledis never set on a Quest, so the warning always showed, and its advice ("tap Build number") does not apply.cmd statusbar, so Quick Settings tiles cannot be used. The tiles stay in the manifest; they cause no harm.Testing
./gradlew testDebugUnitTest lintDebug assembleDebugpasses.🤖 Generated with Claude Code