summaryrefslogtreecommitdiff
path: root/platform/android/export/export.cpp
diff options
context:
space:
mode:
authorfhuya <fhuyakou@gmail.com>2019-07-02 09:22:47 -0700
committerfhuya <fhuyakou@gmail.com>2019-07-02 11:21:26 -0700
commitdea414abc8ae9a11b5f8616969093c5eebe27c75 (patch)
tree4f8dac8e383dc26f5ff8218fbe99e635616ae826 /platform/android/export/export.cpp
parentae65c610e783e8a4c89aa9c08eab884ba64e644c (diff)
Make the meta-data name attribute settable. This will facilitate reuse for ARCore integration.
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] = "";
}
}