summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/android/export/export.cpp5
-rw-r--r--platform/android/java_glue.cpp6
3 files changed, 4 insertions, 9 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index bc67f6e6dc..892b1b6a85 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -277,7 +277,7 @@ def get_ndk_version(path):
try:
with open(prop_file_path) as prop_file:
for line in prop_file:
- key_value = map(lambda x: string.strip(x), line.split("="))
+ key_value = list(map(lambda x: x.strip(), line.split("=")))
if key_value[0] == "Pkg.Revision":
return key_value[1]
except:
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 255413bf2c..d4c079cfc6 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -352,10 +352,11 @@ class EditorExportAndroid : public EditorExportPlatform {
ea->device_lock->unlock();
}
+ uint64_t sleep = OS::get_singleton()->get_power_state() == OS::POWERSTATE_ON_BATTERY ? 1000 : 100;
uint64_t wait = 3000000;
uint64_t time = OS::get_singleton()->get_ticks_usec();
while (OS::get_singleton()->get_ticks_usec() - time < wait) {
- OS::get_singleton()->delay_usec(1000);
+ OS::get_singleton()->delay_usec(1000 * sleep);
if (ea->quit_request)
break;
}
@@ -1305,7 +1306,7 @@ public:
return valid;
}
- virtual String get_binary_extension() const {
+ virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const {
return "apk";
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index bc57f2032f..1e28ef4c6a 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -935,13 +935,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
}
__android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %i\n", cmdlen, int(use_apk_expansion));
-#if 0
- char *args[]={"-test","render",NULL};
- __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup...");
- Error err = Main::setup("apk",2,args,false);
-#else
Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
-#endif
if (cmdline) {
free(cmdline);
}