Skip to content

Commit

Permalink
Update the set of excluded permissions for the XR Editor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
m4gr3d committed Sep 26, 2024
1 parent f7c567e commit 77202e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 77202e0

Please sign in to comment.