From 7cd604132b479e4cfcfaeac0a482f9a593922385 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Mon, 27 Nov 2023 23:43:19 -0800 Subject: [PATCH] Fix an issue causing the running project window to loop-restart when closed with the back button --- .../main/java/org/godotengine/editor/GodotEditor.kt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt index 02709d4dc54..0d7017ae71b 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt @@ -221,16 +221,9 @@ open class GodotEditor : GodotActivity() { val runningProcesses = activityManager.runningAppProcesses for (runningProcess in runningProcesses) { if (runningProcess.processName.endsWith(processNameSuffix)) { - if (targetClass == null) { - // Killing process directly - Log.v(TAG, "Killing Godot process ${runningProcess.processName}") - Process.killProcess(runningProcess.pid) - } else { - // Activity is running; sending a request for self termination. - Log.v(TAG, "Sending force quit request to $targetClass running on process ${runningProcess.processName}") - val forceQuitIntent = Intent(this, targetClass).putExtra(EXTRA_FORCE_QUIT, true) - startActivity(forceQuitIntent) - } + // Killing process directly + Log.v(TAG, "Killing Godot process ${runningProcess.processName}") + Process.killProcess(runningProcess.pid) return true } }