Merge "Fix NullPointerException in ActiveServices" into sc-dev am: 3d90b48371

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14926030

Change-Id: I229d08e76a44c640a258f52bfcfd3bba9f928e38
This commit is contained in:
Jing Ji
2021-06-14 04:36:34 +00:00
committed by Automerger Merge Worker

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)) {