Check the config before moving to restricted bucket on bg restriction
Bug: 221886417 Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest Change-Id: I20602e9d6b4745d08857c30dcdcb4a7224a3a0e2
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user