Different crash saving mechanism on Android
This commit is contained in:
@@ -38,6 +38,8 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState){
|
protected void onCreate(Bundle savedInstanceState){
|
||||||
|
Thread.setDefaultUncaughtExceptionHandler((thread, error) -> CrashSender.log(error));
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
if(doubleScaleTablets && isTablet(this.getContext())){
|
if(doubleScaleTablets && isTablet(this.getContext())){
|
||||||
Scl.setAddition(0.5f);
|
Scl.setAddition(0.5f);
|
||||||
@@ -146,7 +148,6 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}, new AndroidApplicationConfiguration(){{
|
}, new AndroidApplicationConfiguration(){{
|
||||||
useImmersiveMode = true;
|
useImmersiveMode = true;
|
||||||
hideStatusBar = true;
|
hideStatusBar = true;
|
||||||
errorHandler = CrashSender::log;
|
|
||||||
stencil = 8;
|
stencil = 8;
|
||||||
}});
|
}});
|
||||||
checkFiles(getIntent());
|
checkFiles(getIntent());
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ public class CrashSender{
|
|||||||
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt").writeString(Strings.neatError(exception));
|
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt").writeString(Strings.neatError(exception));
|
||||||
}catch(Throwable ignored){
|
}catch(Throwable ignored){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(exception instanceof RuntimeException){
|
|
||||||
throw (RuntimeException)exception;
|
|
||||||
}
|
|
||||||
throw new RuntimeException(exception);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void send(Throwable exception, Cons<File> writeListener){
|
public static void send(Throwable exception, Cons<File> writeListener){
|
||||||
|
|||||||
Reference in New Issue
Block a user