Merge "Check the config before moving to restricted bucket on bg restriction" into tm-dev am: d4937bbcb2

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

Change-Id: Ie6e0e7c95205811f1c1b7d69137e41a8b38dd443
This commit is contained in:
Jing Ji
2022-03-21 16:46:21 +00:00
committed by Automerger Merge Worker

View File

@@ -1841,6 +1841,9 @@ public final class AppRestrictionController {
}
void handleUidInactive(int uid, boolean disabled) {
if (!mConstantsObserver.mBgAutoRestrictedBucket) {
return;
}
final ArrayList<Runnable> pendingTasks = mTmpRunnables;
synchronized (mSettingsLock) {
final int index = mActiveUids.indexOfKey(uid);
@@ -1863,6 +1866,9 @@ public final class AppRestrictionController {
}
void handleUidActive(int uid) {
if (!mConstantsObserver.mBgAutoRestrictedBucket) {
return;
}
synchronized (mSettingsLock) {
final AppStandbyInternal appStandbyInternal = mInjector.getAppStandbyInternal();
final int userId = UserHandle.getUserId(uid);