Skip to content

Commit 17cf555

Browse files
fix(compiler): emit landscape Quest launch activity
Meta Quest requires landscape orientation for HoloQR release validation. Emit the setting from HoloScript's Quest compiler and guard it with the MR compiler test. PASS: pnpm check:holoqr-born-from-source PASS: pnpm vitest QuestCompiler.mr QuestCompiler.golden NativeCompilerFidelity LocomotionLogic.parity RoutingLogic.parity WorldPortalLogic.parity --run PASS: pnpm holoqr:build-release
1 parent 48c5c7d commit 17cf555

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

apps/quest-universal-qr-scanner/android-mr/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<activity
7272
android:name="net.holoscript.qrscanner.StarterSampleActivity"
7373
android:launchMode="singleTask"
74+
android:screenOrientation="landscape"
7475
android:excludeFromRecents="true"
7576
android:configChanges="screenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|uiMode"
7677
android:exported="true"

packages/core/src/compiler/__tests__/QuestCompiler.mr.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ describe('QuestCompiler immersive_mr (native trait-dispatch)', () => {
4646
expect(keys.some((k) => k.endsWith('MainActivity.kt'))).toBe(false);
4747
});
4848

49+
it('emits a Meta-store-ready landscape launch activity', () => {
50+
const out = new QuestCompiler().compile(parsed.ast!, '');
51+
const manifest = out[Object.keys(out).find((k) => k.endsWith('AndroidManifest.xml'))!];
52+
expect(manifest).toContain('android:screenOrientation="landscape"');
53+
expect(manifest).toContain('android:value="quest3|quest3s"');
54+
});
55+
4956
it('PassthroughCameraController.kt is generated from the passthrough_camera trait config', () => {
5057
const out = new QuestCompiler().compile(parsed.ast!, '');
5158
const ctl = out[Object.keys(out).find((k) => k.endsWith('PassthroughCameraController.kt'))!];

packages/core/src/compiler/quest-mr-emit.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@ export function emitAndroidManifestXml(f: QuestMrFeatures): string {
958958
<activity
959959
android:name="net.holoscript.qrscanner.StarterSampleActivity"
960960
android:launchMode="singleTask"
961+
android:screenOrientation="landscape"
961962
android:excludeFromRecents="true"
962963
android:configChanges="screenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|uiMode"
963964
android:exported="true"

0 commit comments

Comments
 (0)