Loading cmds/statsd/src/atoms.proto +30 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,22 @@ message AppCrashOccurred { // The pid if available. -1 means not available. optional sint32 pid = 4; optional string package_name = 5; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 6; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 7; } /** Loading Loading @@ -1266,6 +1282,20 @@ message ANROccurred { optional string short_component_name = 3; optional string reason = 4; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 5; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 6; } /* Loading services/core/java/com/android/server/am/ActivityManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -15209,7 +15209,17 @@ public class ActivityManagerService extends IActivityManager.Stub Binder.getCallingUid(), eventType, processName, Binder.getCallingPid()); Binder.getCallingPid(), (r != null && r.info != null) ? r.info.packageName : "", (r != null && r.info != null) ? (r.info.isInstantApp() ? StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__TRUE : StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__FALSE) : StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__UNAVAILABLE, r != null ? (r.isInterestingToUserLocked() ? StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__FOREGROUND : StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__BACKGROUND) : StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__UNKNOWN ); addErrorToDropBox(eventType, r, processName, null, null, null, null, null, crashInfo); services/core/java/com/android/server/am/AppErrors.java +9 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,15 @@ class AppErrors { } StatsLog.write(StatsLog.ANR_OCCURRED, app.uid, app.processName, activity == null ? "unknown": activity.shortComponentName, annotation); activity == null ? "unknown": activity.shortComponentName, annotation, (app.info != null) ? (app.info.isInstantApp() ? StatsLog.ANROCCURRED__IS_INSTANT_APP__TRUE : StatsLog.ANROCCURRED__IS_INSTANT_APP__FALSE) : StatsLog.ANROCCURRED__IS_INSTANT_APP__UNAVAILABLE, app != null ? (app.isInterestingToUserLocked() ? StatsLog.ANROCCURRED__FOREGROUND_STATE__FOREGROUND : StatsLog.ANROCCURRED__FOREGROUND_STATE__BACKGROUND) : StatsLog.ANROCCURRED__FOREGROUND_STATE__UNKNOWN); mService.addErrorToDropBox("anr", app, app.processName, activity, parent, annotation, cpuInfo, tracesFile, null); Loading Loading
cmds/statsd/src/atoms.proto +30 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,22 @@ message AppCrashOccurred { // The pid if available. -1 means not available. optional sint32 pid = 4; optional string package_name = 5; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 6; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 7; } /** Loading Loading @@ -1266,6 +1282,20 @@ message ANROccurred { optional string short_component_name = 3; optional string reason = 4; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 5; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 6; } /* Loading
services/core/java/com/android/server/am/ActivityManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -15209,7 +15209,17 @@ public class ActivityManagerService extends IActivityManager.Stub Binder.getCallingUid(), eventType, processName, Binder.getCallingPid()); Binder.getCallingPid(), (r != null && r.info != null) ? r.info.packageName : "", (r != null && r.info != null) ? (r.info.isInstantApp() ? StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__TRUE : StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__FALSE) : StatsLog.APP_CRASH_OCCURRED__IS_INSTANT_APP__UNAVAILABLE, r != null ? (r.isInterestingToUserLocked() ? StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__FOREGROUND : StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__BACKGROUND) : StatsLog.APP_CRASH_OCCURRED__FOREGROUND_STATE__UNKNOWN ); addErrorToDropBox(eventType, r, processName, null, null, null, null, null, crashInfo);
services/core/java/com/android/server/am/AppErrors.java +9 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,15 @@ class AppErrors { } StatsLog.write(StatsLog.ANR_OCCURRED, app.uid, app.processName, activity == null ? "unknown": activity.shortComponentName, annotation); activity == null ? "unknown": activity.shortComponentName, annotation, (app.info != null) ? (app.info.isInstantApp() ? StatsLog.ANROCCURRED__IS_INSTANT_APP__TRUE : StatsLog.ANROCCURRED__IS_INSTANT_APP__FALSE) : StatsLog.ANROCCURRED__IS_INSTANT_APP__UNAVAILABLE, app != null ? (app.isInterestingToUserLocked() ? StatsLog.ANROCCURRED__FOREGROUND_STATE__FOREGROUND : StatsLog.ANROCCURRED__FOREGROUND_STATE__BACKGROUND) : StatsLog.ANROCCURRED__FOREGROUND_STATE__UNKNOWN); mService.addErrorToDropBox("anr", app, app.processName, activity, parent, annotation, cpuInfo, tracesFile, null); Loading