From 6fd881e43c49cd6691a8339860911420e045dd23 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Fri, 26 Feb 2021 08:38:39 -0800 Subject: Update the logic to load Godot Android plugins packaged into the binary. The previous logic had the side effect of imposing a limit of one plugin per `aar` binary. The update lifts that restriction. --- platform/android/export/export.cpp | 10 +--------- platform/android/export/gradle_export_util.h | 11 +---------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'platform/android/export') diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 088bb35f62..7dce7eec14 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -806,8 +806,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { manifest_text += _get_xr_features_tag(p_preset); manifest_text += _get_instrumentation_tag(p_preset); - String plugins_names = get_plugins_names(get_enabled_plugins(p_preset)); - manifest_text += _get_application_tag(p_preset, plugins_names); + manifest_text += _get_application_tag(p_preset); manifest_text += "\n"; String manifest_path = vformat("res://android/build/src/%s/AndroidManifest.xml", (p_debug ? "debug" : "release")); @@ -856,8 +855,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { int xr_mode_index = p_preset->get("xr_features/xr_mode"); bool focus_awareness = p_preset->get("xr_features/focus_awareness"); - String plugins_names = get_plugins_names(get_enabled_plugins(p_preset)); - Vector perms; // Write permissions into the perms variable. _get_permissions(p_preset, p_give_internet, perms); @@ -995,11 +992,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { encode_uint32(xr_mode_index == /* XRMode.OVR */ 1 && focus_awareness ? 0xFFFFFFFF : 0, &p_manifest.write[iofs + 16]); } - if (tname == "meta-data" && attrname == "value" && value == "plugins_value" && !plugins_names.is_empty()) { - // Update the meta-data 'android:value' attribute with the list of enabled plugins. - string_table.write[attr_value] = plugins_names; - } - is_focus_aware_metadata = tname == "meta-data" && attrname == "name" && value == "com.oculus.vr.focusaware"; iofs += 20; } diff --git a/platform/android/export/gradle_export_util.h b/platform/android/export/gradle_export_util.h index ce6a3c96db..097a2391ee 100644 --- a/platform/android/export/gradle_export_util.h +++ b/platform/android/export/gradle_export_util.h @@ -269,14 +269,6 @@ String _get_instrumentation_tag(const Ref &p_preset) { return manifest_instrumentation_text; } -String _get_plugins_tag(const String &plugins_names) { - if (!plugins_names.is_empty()) { - return vformat(" \n", plugins_names); - } else { - return " \n"; - } -} - String _get_activity_tag(const Ref &p_preset) { bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1; String orientation = _get_android_orientation_label(_get_screen_orientation()); @@ -295,7 +287,7 @@ String _get_activity_tag(const Ref &p_preset) { return manifest_activity_text; } -String _get_application_tag(const Ref &p_preset, const String &plugins_names) { +String _get_application_tag(const Ref &p_preset) { bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1; String manifest_application_text = " &p_preset, const Strin " android:icon=\"@mipmap/icon\">\n\n" " \n"; - manifest_application_text += _get_plugins_tag(plugins_names); if (uses_xr) { manifest_application_text += " \n"; } -- cgit v1.2.3