Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c021af23 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add runtime crash information to sysprops" am: 68f65761 am: 0a3e8a46 am: f510d4e0

parents 88287b04 f510d4e0
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,8 @@ public class RuntimeInit {
    private static IBinder mApplicationObject;
    private static IBinder mApplicationObject;


    private static volatile boolean mCrashing = false;
    private static volatile boolean mCrashing = false;
    private static final String SYSPROP_CRASH_COUNT = "sys.system_server.crash_java";
    private static int mCrashCount;


    private static volatile ApplicationWtfHandler sDefaultApplicationWtfHandler;
    private static volatile ApplicationWtfHandler sDefaultApplicationWtfHandler;


@@ -105,6 +107,8 @@ public class RuntimeInit {
            // first clause in either of these two cases, only for system_server.
            // first clause in either of these two cases, only for system_server.
            if (mApplicationObject == null && (Process.SYSTEM_UID == Process.myUid())) {
            if (mApplicationObject == null && (Process.SYSTEM_UID == Process.myUid())) {
                Clog_e(TAG, "*** FATAL EXCEPTION IN SYSTEM PROCESS: " + t.getName(), e);
                Clog_e(TAG, "*** FATAL EXCEPTION IN SYSTEM PROCESS: " + t.getName(), e);
                mCrashCount = SystemProperties.getInt(SYSPROP_CRASH_COUNT, 0) + 1;
                SystemProperties.set(SYSPROP_CRASH_COUNT, String.valueOf(mCrashCount));
            } else {
            } else {
                logUncaught(t.getName(), ActivityThread.currentProcessName(), Process.myPid(), e);
                logUncaught(t.getName(), ActivityThread.currentProcessName(), Process.myPid(), e);
            }
            }