Loading core/java/android/os/BatterySaverPolicyConfig.java +2 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ public final class BatterySaverPolicyConfig implements Parcelable { mAdvertiseIsEnabled = in.mAdvertiseIsEnabled; mDeferFullBackup = in.mDeferFullBackup; mDeferKeyValueBackup = in.mDeferKeyValueBackup; mDeviceSpecificSettings = Collections.unmodifiableMap(in.mDeviceSpecificSettings); mDeviceSpecificSettings = Collections.unmodifiableMap( new ArrayMap<>(in.mDeviceSpecificSettings)); mDisableAnimation = in.mDisableAnimation; mDisableAod = in.mDisableAod; mDisableLaunchBoost = in.mDisableLaunchBoost; Loading core/java/android/os/PowerManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -773,8 +773,10 @@ public final class PowerManager { */ public static final int LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 4; static final int MIN_LOCATION_MODE = LOCATION_MODE_NO_CHANGE; static final int MAX_LOCATION_MODE = LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; /** @hide */ public static final int MIN_LOCATION_MODE = LOCATION_MODE_NO_CHANGE; /** @hide */ public static final int MAX_LOCATION_MODE = LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; /** * @hide Loading services/core/java/com/android/server/power/batterysaver/BatterySaverPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -594,7 +594,7 @@ public class BatterySaverPolicy extends ContentObserver { boolean forceBackgroundCheck, int locationMode) { this.adjustBrightnessFactor = adjustBrightnessFactor; this.adjustBrightnessFactor = Math.min(1, Math.max(0, adjustBrightnessFactor)); this.advertiseIsEnabled = advertiseIsEnabled; this.deferFullBackup = deferFullBackup; this.deferKeyValueBackup = deferKeyValueBackup; Loading @@ -613,7 +613,14 @@ public class BatterySaverPolicy extends ContentObserver { this.filesForNoninteractive = filesForNoninteractive; this.forceAllAppsStandby = forceAllAppsStandby; this.forceBackgroundCheck = forceBackgroundCheck; if (locationMode < PowerManager.MIN_LOCATION_MODE || PowerManager.MAX_LOCATION_MODE < locationMode) { Slog.e(TAG, "Invalid location mode: " + locationMode); this.locationMode = PowerManager.LOCATION_MODE_NO_CHANGE; } else { this.locationMode = locationMode; } mHashCode = Objects.hash( adjustBrightnessFactor, Loading Loading
core/java/android/os/BatterySaverPolicyConfig.java +2 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ public final class BatterySaverPolicyConfig implements Parcelable { mAdvertiseIsEnabled = in.mAdvertiseIsEnabled; mDeferFullBackup = in.mDeferFullBackup; mDeferKeyValueBackup = in.mDeferKeyValueBackup; mDeviceSpecificSettings = Collections.unmodifiableMap(in.mDeviceSpecificSettings); mDeviceSpecificSettings = Collections.unmodifiableMap( new ArrayMap<>(in.mDeviceSpecificSettings)); mDisableAnimation = in.mDisableAnimation; mDisableAod = in.mDisableAod; mDisableLaunchBoost = in.mDisableLaunchBoost; Loading
core/java/android/os/PowerManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -773,8 +773,10 @@ public final class PowerManager { */ public static final int LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 4; static final int MIN_LOCATION_MODE = LOCATION_MODE_NO_CHANGE; static final int MAX_LOCATION_MODE = LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; /** @hide */ public static final int MIN_LOCATION_MODE = LOCATION_MODE_NO_CHANGE; /** @hide */ public static final int MAX_LOCATION_MODE = LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; /** * @hide Loading
services/core/java/com/android/server/power/batterysaver/BatterySaverPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -594,7 +594,7 @@ public class BatterySaverPolicy extends ContentObserver { boolean forceBackgroundCheck, int locationMode) { this.adjustBrightnessFactor = adjustBrightnessFactor; this.adjustBrightnessFactor = Math.min(1, Math.max(0, adjustBrightnessFactor)); this.advertiseIsEnabled = advertiseIsEnabled; this.deferFullBackup = deferFullBackup; this.deferKeyValueBackup = deferKeyValueBackup; Loading @@ -613,7 +613,14 @@ public class BatterySaverPolicy extends ContentObserver { this.filesForNoninteractive = filesForNoninteractive; this.forceAllAppsStandby = forceAllAppsStandby; this.forceBackgroundCheck = forceBackgroundCheck; if (locationMode < PowerManager.MIN_LOCATION_MODE || PowerManager.MAX_LOCATION_MODE < locationMode) { Slog.e(TAG, "Invalid location mode: " + locationMode); this.locationMode = PowerManager.LOCATION_MODE_NO_CHANGE; } else { this.locationMode = locationMode; } mHashCode = Objects.hash( adjustBrightnessFactor, Loading