Added uncaughtException report

This commit is contained in:
PeratX 2017-05-22 20:39:31 +08:00
parent e715398679
commit f75f78da83

View File

@ -12,6 +12,7 @@ import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
@ -40,6 +41,15 @@ import java.util.List;
* (at your option) any later version.
*/
public class Daedalus extends Application {
static {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
FirebaseCrash.report(e);
}
});
}
private static final String SHORTCUT_ID_ACTIVATE = "shortcut_activate";
private static final String TAG = "Daedalus";