From 77202e08b4794dd28ff626ac3a33348e4d13b13a Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Wed, 25 Sep 2024 23:21:16 -0700 Subject: [PATCH] Update the set of excluded permissions for the XR Editor A few permissions including the `USE_SCENE` permission are being renamed with the launch of the Meta Spatial SDK, so we update the excluded list to avoid requesting them on app start. --- .../src/horizonos/java/org/godotengine/editor/GodotEditor.kt | 4 ++-- .../src/horizonos/java/org/godotengine/editor/GodotXRGame.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt index 6cb08ae94b6..9dc34f22672 100644 --- a/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt +++ b/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt @@ -45,14 +45,14 @@ open class GodotEditor : BaseGodotEditor() { internal val XR_RUN_GAME_INFO = EditorWindowInfo(GodotXRGame::class.java, 1667, ":GodotXRGame") - internal const val USE_SCENE_PERMISSION = "com.oculus.permission.USE_SCENE" + internal val USE_SCENE_PERMISSIONS = listOf("com.oculus.permission.USE_SCENE", "horizonos.permission.USE_SCENE") } override fun getExcludedPermissions(): MutableSet { val excludedPermissions = super.getExcludedPermissions() // The USE_SCENE permission is requested when the "xr/openxr/enabled" project setting // is enabled. - excludedPermissions.add(USE_SCENE_PERMISSION) + excludedPermissions.addAll(USE_SCENE_PERMISSIONS) return excludedPermissions } diff --git a/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotXRGame.kt b/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotXRGame.kt index 5db2879aad3..0c82791e891 100644 --- a/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotXRGame.kt +++ b/platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotXRGame.kt @@ -69,7 +69,7 @@ open class GodotXRGame: GodotGame() { val automaticPermissionsRequestEnabled = automaticallyRequestPermissionsSetting.isNullOrEmpty() || automaticallyRequestPermissionsSetting.toBoolean() if (automaticPermissionsRequestEnabled) { - permissionsToEnable.add(USE_SCENE_PERMISSION) + permissionsToEnable.addAll(USE_SCENE_PERMISSIONS) } }