Merge "Postpone updating idle states to after the boot." into rvc-qpr-dev am: 77c54c7c4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12204314 Change-Id: Ie98696f856461e5e9f969f1218a184f2c713ec14
This commit is contained in:
@@ -455,9 +455,6 @@ public class AppStandbyController implements AppStandbyInternal {
|
|||||||
|
|
||||||
mSystemServicesReady = true;
|
mSystemServicesReady = true;
|
||||||
|
|
||||||
// Offload to handler thread to avoid boot time impact.
|
|
||||||
mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);
|
|
||||||
|
|
||||||
boolean userFileExists;
|
boolean userFileExists;
|
||||||
synchronized (mAppIdleLock) {
|
synchronized (mAppIdleLock) {
|
||||||
userFileExists = mAppIdleHistory.userFileExists(UserHandle.USER_SYSTEM);
|
userFileExists = mAppIdleHistory.userFileExists(UserHandle.USER_SYSTEM);
|
||||||
@@ -474,7 +471,9 @@ public class AppStandbyController implements AppStandbyInternal {
|
|||||||
setChargingState(mInjector.isCharging());
|
setChargingState(mInjector.isCharging());
|
||||||
|
|
||||||
// Offload to handler thread after boot completed to avoid boot time impact. This means
|
// Offload to handler thread after boot completed to avoid boot time impact. This means
|
||||||
// that headless system apps may be put in a lower bucket until boot has completed.
|
// that app standby buckets may be slightly out of date and headless system apps may be
|
||||||
|
// put in a lower bucket until boot has completed.
|
||||||
|
mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);
|
||||||
mHandler.post(this::loadHeadlessSystemAppCache);
|
mHandler.post(this::loadHeadlessSystemAppCache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user