1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Improve android java support

- Use Log.d/Log.w instead of System.printf
- Remove commented code
- Cherry-pick: Manual backport of d698814367
This commit is contained in:
Xavier Sellier
2018-02-22 00:38:04 -05:00
parent 0af3f8e053
commit 88e779cd5e
25 changed files with 127 additions and 433 deletions

View File

@@ -129,7 +129,6 @@ Error DirAccessJAndroid::change_dir(String p_dir) {
else
new_dir = current_dir.plus_file(p_dir);
//print_line("new dir is: "+new_dir);
//test if newdir exists
new_dir = new_dir.simplify_path();
@@ -225,30 +224,14 @@ void DirAccessJAndroid::setup(jobject p_io) {
JNIEnv *env = ThreadAndroid::get_env();
io = p_io;
__android_log_print(ANDROID_LOG_INFO, "godot", "STEP7");
jclass c = env->GetObjectClass(io);
cls = (jclass)env->NewGlobalRef(c);
__android_log_print(ANDROID_LOG_INFO, "godot", "STEP8");
_dir_open = env->GetMethodID(cls, "dir_open", "(Ljava/lang/String;)I");
if (_dir_open != 0) {
__android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_open ok!!");
}
_dir_next = env->GetMethodID(cls, "dir_next", "(I)Ljava/lang/String;");
if (_dir_next != 0) {
__android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_next ok!!");
}
_dir_close = env->GetMethodID(cls, "dir_close", "(I)V");
if (_dir_close != 0) {
__android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_close ok!!");
}
_dir_is_dir = env->GetMethodID(cls, "dir_is_dir", "(I)Z");
if (_dir_is_dir != 0) {
__android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_is_dir ok!!");
}
// (*env)->CallVoidMethod(env,obj,aMethodID, myvar);
}
DirAccessJAndroid::DirAccessJAndroid() {