1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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.
This commit is contained in:
Fredia Huya-Kouadio
2021-02-26 08:38:39 -08:00
parent 43e429fa93
commit c5fb32d594
5 changed files with 8 additions and 66 deletions

View File

@@ -817,8 +817,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 += "</manifest>\n";
String manifest_path = vformat("res://android/build/src/%s/AndroidManifest.xml", (p_debug ? "debug" : "release"));
@@ -869,8 +868,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<String> perms;
// Write permissions into the perms variable.
_get_permissions(p_preset, p_give_internet, perms);
@@ -1024,11 +1021,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.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;
}