From b284dd92d3a9e1cfc03432f6d6b5fecf8caf66d5 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Wed, 26 Jan 2022 08:58:47 -0800 Subject: Fix XR Android manifest metadata - Adds the parameters for supported Meta devices, which is required to access some device specific capabilities - Remove the 'com.samsung.android.vr.application.mode' metadata --- platform/android/export/export_plugin.cpp | 14 -------------- platform/android/export/gradle_export_util.cpp | 5 ++--- 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'platform/android/export') diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 78155fbef3..61d2f897ef 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -975,20 +975,6 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref &p } } - if (tname == "meta-data" && attrname == "name" && value == "xr_mode_metadata_name") { - // Update the meta-data 'android:name' attribute based on the selected XR mode. - if (xr_mode_index == XR_MODE_OPENXR) { - string_table.write[attr_value] = "com.samsung.android.vr.application.mode"; - } - } - - if (tname == "meta-data" && attrname == "value" && value == "xr_mode_metadata_value") { - // Update the meta-data 'android:value' attribute based on the selected XR mode. - if (xr_mode_index == XR_MODE_OPENXR) { - string_table.write[attr_value] = "vr_only"; - } - } - if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_metadata_name") { if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) { string_table.write[attr_value] = "com.oculus.handtracking.frequency"; diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp index 287b669fd1..babd8173d0 100644 --- a/platform/android/export/gradle_export_util.cpp +++ b/platform/android/export/gradle_export_util.cpp @@ -278,7 +278,6 @@ String _get_application_tag(const Ref &p_preset, bool p_has_ " android:requestLegacyExternalStorage=\"%s\"\n" " tools:replace=\"android:allowBackup,android:isGame,android:hasFragileUserData,android:requestLegacyExternalStorage\"\n" " tools:ignore=\"GoogleAppIndexingWarning\">\n\n" - " \n" " \n", bool_to_string(p_preset->get("user_data_backup/allow")), bool_to_string(p_preset->get("package/classify_as_game")), @@ -286,8 +285,6 @@ String _get_application_tag(const Ref &p_preset, bool p_has_ bool_to_string(p_has_storage_permission)); if (uses_xr) { - manifest_application_text += " \n"; - bool hand_tracking_enabled = (int)(p_preset->get("xr_features/hand_tracking")) > XR_HAND_TRACKING_NONE; if (hand_tracking_enabled) { int hand_tracking_frequency_index = p_preset->get("xr_features/hand_tracking_frequency"); @@ -296,6 +293,8 @@ String _get_application_tag(const Ref &p_preset, bool p_has_ " \n", hand_tracking_frequency); } + } else { + manifest_application_text += " \n"; } manifest_application_text += _get_activity_tag(p_preset); manifest_application_text += " \n"; -- cgit v1.2.3