Merge "Fix NullPointerException in ActiveServices" into sc-dev

This commit is contained in:
Jing Ji
2021-06-14 04:16:23 +00:00
committed by Android (Google) Code Review

View File

@@ -4908,7 +4908,8 @@ public final class ActiveServices {
Slog.w(TAG, "Service crashed " + sr.crashCount
+ " times, stopping: " + sr);
EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH,
sr.userId, sr.crashCount, sr.shortInstanceName, sr.app.getPid());
sr.userId, sr.crashCount, sr.shortInstanceName,
sr.app != null ? sr.app.getPid() : -1);
bringDownServiceLocked(sr, true);
} else if (!allowRestart
|| !mAm.mUserController.isUserRunning(sr.userId, 0)) {