Updates how the REQUEST_INSTALL_PACKAGES permission is handled

- Only request the permission the first time the editor tries to open an apk
- Disable the permission for the HorizonOS build as the HorizonOS store doesn't support it yet
This commit is contained in:
Fredia Huya-Kouadio 2024-12-23 23:04:50 -08:00
parent 0f95e9f8e6
commit 7ad9d23a1d
7 changed files with 53 additions and 58 deletions

View file

@ -52,7 +52,7 @@ void register_android_exporter() {
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/debug_keystore_pass", PROPERTY_HINT_PASSWORD));
#ifdef ANDROID_ENABLED
EDITOR_DEF_BASIC("export/android/install_exported_apk", true);
EDITOR_DEF_BASIC("export/android/install_exported_apk", !OS::get_singleton()->has_feature("horizonos"));
#else
EDITOR_DEF_BASIC("export/android/java_sdk_path", OS::get_singleton()->get_environment("JAVA_HOME"));
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/java_sdk_path", PROPERTY_HINT_GLOBAL_DIR));