Merge "Automatically load ActivityManager DeviceConfig constants."

This commit is contained in:
TreeHugger Robot
2020-01-30 20:39:31 +00:00
committed by Android (Google) Code Review

View File

@@ -438,14 +438,15 @@ final class ActivityManagerConstants extends ContentObserver {
DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER,
ActivityThread.currentApplication().getMainExecutor(),
mOnDeviceConfigChangedListener);
updateMaxCachedProcesses();
loadDeviceConfigConstants();
// The following read from Settings.
updateActivityStartsLoggingEnabled();
updateBackgroundActivityStarts();
updateForceRestrictedBackgroundCheck();
updateForegroundServiceStartsLoggingEnabled();
updateBackgroundFgsStartsRestriction();
updateOomAdjUpdatePolicy();
updateImperceptibleKillExemptions();
}
private void loadDeviceConfigConstants() {
mOnDeviceConfigChangedListener.onPropertiesChanged(
DeviceConfig.getProperties(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER));
}
public void setOverrideMaxCachedProcesses(int value) {