mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 13:40:17 -10:00
24 lines
586 B
Java
24 lines
586 B
Java
package org.mozilla.gecko;
|
|
|
|
import android.app.IntentService;
|
|
import android.content.Intent;
|
|
import android.support.annotation.Nullable;
|
|
|
|
|
|
public class CrashHandlerService extends IntentService {
|
|
|
|
public CrashHandlerService() {
|
|
super("Crash Handler");
|
|
}
|
|
|
|
@Override
|
|
protected void onHandleIntent(@Nullable Intent intent) {
|
|
intent.setClass(this, CrashReporterActivity.class);
|
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
startActivity(intent);
|
|
|
|
// Avoid ANR due to background limitations on Oreo+
|
|
System.exit(0);
|
|
}
|
|
}
|