You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: android/os/Process: handle self-kill
We don't currently implement sendSignal, however Unity uses killProcess to kill its own process, which we can hadle with simple System.exit(0) and have Unity games close cleanly
This commit is contained in:
@@ -676,6 +676,11 @@ public class Process {
|
||||
* other's processes.
|
||||
*/
|
||||
public static final void killProcess(int pid) {
|
||||
if(pid == Process.myPid()) {
|
||||
System.out.println("the app called killProcess on itself");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
sendSignal(pid, SIGNAL_KILL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user