mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix an issue causing the running project window to loop-restart when closed with the back button
This commit is contained in:
parent
a008a85443
commit
7cd604132b
1 changed files with 3 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue