Merge "Prevent potential NPE when forcing stop package during boot"

This commit is contained in:
Riddle Hsu
2022-02-15 07:08:14 +00:00
committed by Android (Google) Code Review

View File

@@ -6099,7 +6099,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
public boolean onForceStopPackage(String packageName, boolean doit, boolean evenPersistent,
int userId) {
synchronized (mGlobalLock) {
// In case if setWindowManager hasn't been called yet when booting.
if (mRootWindowContainer == null) return false;
return mRootWindowContainer.finishDisabledPackageActivities(packageName,
null /* filterByClasses */, doit, evenPersistent, userId,
// Only remove the activities without process because the activities with