1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 13:28:12 +03:00

Different crash saving mechanism on Android

This commit is contained in:
Anuken 2020-07-29 10:44:32 -04:00
parent 6263c11ce5
commit a0459191d6
2 changed files with 2 additions and 6 deletions

View File

@ -38,6 +38,8 @@ public class AndroidLauncher extends AndroidApplication{
@Override
protected void onCreate(Bundle savedInstanceState){
Thread.setDefaultUncaughtExceptionHandler((thread, error) -> CrashSender.log(error));
super.onCreate(savedInstanceState);
if(doubleScaleTablets && isTablet(this.getContext())){
Scl.setAddition(0.5f);
@ -146,7 +148,6 @@ public class AndroidLauncher extends AndroidApplication{
}, new AndroidApplicationConfiguration(){{
useImmersiveMode = true;
hideStatusBar = true;
errorHandler = CrashSender::log;
stencil = 8;
}});
checkFiles(getIntent());

View File

@ -28,11 +28,6 @@ public class CrashSender{
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt").writeString(Strings.neatError(exception));
}catch(Throwable ignored){
}
if(exception instanceof RuntimeException){
throw (RuntimeException)exception;
}
throw new RuntimeException(exception);
}
public static void send(Throwable exception, Cons<File> writeListener){