mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Fix: Error can be displayed when not launched from an activity
This commit is contained in:
parent
1d30eabfdf
commit
aa1685fae1
@ -1,5 +1,7 @@
|
|||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
|
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
||||||
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.content.pm.*;
|
import android.content.pm.*;
|
||||||
@ -76,6 +78,7 @@ public class PojavApplication extends Application {
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
|
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
|
||||||
ferrorIntent.putExtra("throwable", throwable);
|
ferrorIntent.putExtra("throwable", throwable);
|
||||||
|
ferrorIntent.setFlags(FLAG_ACTIVITY_NEW_TASK);
|
||||||
startActivity(ferrorIntent);
|
startActivity(ferrorIntent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user