This commit is contained in:
Anuken
2020-07-29 11:02:39 -04:00
parent a0459191d6
commit b8d1f66653
2 changed files with 15 additions and 3 deletions

View File

@ -1,7 +1,6 @@
package mindustry.android;
import android.*;
import android.annotation.*;
import android.app.*;
import android.content.*;
import android.content.pm.*;
@ -25,6 +24,7 @@ import mindustry.ui.dialogs.*;
import java.io.*;
import java.lang.System;
import java.lang.Thread.*;
import java.util.*;
import static mindustry.Vars.*;
@ -38,7 +38,19 @@ public class AndroidLauncher extends AndroidApplication{
@Override
protected void onCreate(Bundle savedInstanceState){
Thread.setDefaultUncaughtExceptionHandler((thread, error) -> CrashSender.log(error));
UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler((thread, error) -> {
CrashSender.log(error);
//try to forward exception to system handler
if(handler != null){
handler.uncaughtException(thread, error);
}else{
error.printStackTrace();
System.exit(1);
}
});
super.onCreate(savedInstanceState);
if(doubleScaleTablets && isTablet(this.getContext())){

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=0d2c8ba5d7bd56ee549f0bdee193cef0a0cac1e1
archash=810c593d485c495fe6fe8612796a0f060030d0ab