mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 16:47:14 -04:00
Fatal error: show 'Unexpectedly crashed' instead of 'Fatal error'
This commit is contained in:
parent
7c68a3ac2a
commit
3bbec01507
@ -6,11 +6,12 @@ import android.support.v7.app.*;
|
||||
|
||||
public class FatalErrorActivity extends AppCompatActivity
|
||||
{
|
||||
public static void showError(Context ctx, Throwable th) {
|
||||
public static void showError(Context ctx, boolean isFatalErr, Throwable th) {
|
||||
Intent ferrorIntent = new Intent(ctx, FatalErrorActivity.class);
|
||||
ferrorIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
ferrorIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
ferrorIntent.putExtra("throwable", th);
|
||||
ferrorIntent.putExtra("isFatal", isFatalErr);
|
||||
ctx.startActivity(ferrorIntent);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class PojavApplication extends Application
|
||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler(){
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable th) {
|
||||
FatalErrorActivity.showError(PojavApplication.this, th);
|
||||
FatalErrorActivity.showError(PojavApplication.this, true, th);
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
});
|
||||
|
@ -52,7 +52,7 @@
|
||||
<string name="alerttitle_installoptifine">Select OptiFine jar file</string>
|
||||
|
||||
<!-- Error messages -->
|
||||
<string name="error_fatal">Fatal error</string>
|
||||
<string name="error_fatal">Unexpectedly crashed</string>
|
||||
<string name="error_checklog">Error! Please check the log below: %s</string>
|
||||
<string name="error_no_version">No version!</string>
|
||||
<string name="error_load_version">Unable to load version %s</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user