summaryrefslogtreecommitdiffstats
path: root/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py1
-rw-r--r--platform/android/export/export_plugin.cpp24
2 files changed, 18 insertions, 7 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 98b3ecdeff..fea8ec3287 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -69,6 +69,7 @@ def get_flags():
return [
("arch", "arm64"), # Default for convenience.
("target", "template_debug"),
+ ("supported", ["mono"]),
]
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index d0db7b2e6c..28ab8e3335 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -830,8 +830,9 @@ bool EditorExportPlatformAndroid::_uses_vulkan() {
void EditorExportPlatformAndroid::_notification(int p_what) {
#ifndef ANDROID_ENABLED
if (p_what == NOTIFICATION_POSTINITIALIZE) {
- ERR_FAIL_NULL(EditorExport::get_singleton());
- EditorExport::get_singleton()->connect_presets_runnable_updated(callable_mp(this, &EditorExportPlatformAndroid::_update_preset_status));
+ if (EditorExport::get_singleton()) {
+ EditorExport::get_singleton()->connect_presets_runnable_updated(callable_mp(this, &EditorExportPlatformAndroid::_update_preset_status));
+ }
}
#endif
}
@@ -1911,13 +1912,22 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
}
bool EditorExportPlatformAndroid::get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const {
+ if (p_preset == nullptr) {
+ return true;
+ }
+
+ bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
+ if (p_option == "graphics/opengl_debug" ||
+ p_option == "command_line/extra_args" ||
+ p_option == "permissions/custom_permissions") {
+ return advanced_options_enabled;
+ }
if (p_option == "gradle_build/gradle_build_directory" || p_option == "gradle_build/android_source_template") {
- // @todo These are experimental options - keep them hidden for now.
- //return (bool)p_preset->get("gradle_build/use_gradle_build");
- return false;
- } else if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
+ return advanced_options_enabled && bool(p_preset->get("gradle_build/use_gradle_build"));
+ }
+ if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
// The APK templates are ignored if Gradle build is enabled.
- return !p_preset->get("gradle_build/use_gradle_build");
+ return advanced_options_enabled && !bool(p_preset->get("gradle_build/use_gradle_build"));
}
return true;
}