Merge "Add AMS lock protection to mAppsInBackgroundRestricted collection" into tm-qpr-dev

This commit is contained in:
Jing Ji
2022-07-14 17:29:10 +00:00
committed by Android (Google) Code Review

View File

@@ -2269,7 +2269,9 @@ public final class ProcessList {
final boolean inBgRestricted = ast.isAppBackgroundRestricted(
app.info.uid, app.info.packageName);
if (inBgRestricted) {
mAppsInBackgroundRestricted.add(app);
synchronized (mService) {
mAppsInBackgroundRestricted.add(app);
}
}
app.mState.setBackgroundRestricted(inBgRestricted);
}