summaryrefslogtreecommitdiff
path: root/platform/android/export/export.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-03 06:51:32 +0200
committerGitHub <noreply@github.com>2019-07-03 06:51:32 +0200
commitda622682f76201655f96c13c17c273e72d3a9678 (patch)
tree7975d48e2cd65cd999fe77de3757f702a1d1ea55 /platform/android/export/export.cpp
parent0f8d939866a417f657d61f241523e36b48a41410 (diff)
parentdea414abc8ae9a11b5f8616969093c5eebe27c75 (diff)
Merge pull request #30258 from m4gr3d/make_metadata_settable
Make the AndroidManifest meta-data name attribute settable.
Diffstat (limited to 'platform/android/export/export.cpp')
-rw-r--r--platform/android/export/export.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 08cbb176fe..1b9d31d752 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -824,11 +824,17 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
encode_uint32(min_gles3 ? 0x00030000 : 0x00020000, &p_manifest.write[iofs + 16]);
}
- if (tname == "meta-data" && attrname == "value") {
+ if (tname == "meta-data" && attrname == "name" && string_table[attr_value] == "xr_mode_metadata_name") {
+ // Update the meta-data 'android:name' attribute based on the selected XR mode.
+ if (xr_mode_index == 1 /* XRMode.OVR */) {
+ string_table.write[attr_value] = "com.samsung.android.vr.application.mode";
+ }
+ }
+
+ if (tname == "meta-data" && attrname == "value" && string_table[attr_value] == "xr_mode_metadata_value") {
+ // Update the meta-data 'android:value' attribute based on the selected XR mode.
if (xr_mode_index == 1 /* XRMode.OVR */) {
string_table.write[attr_value] = "vr_only";
- } else {
- string_table.write[attr_value] = "";
}
}