Merge "Fix the default battery drain monitor window size in AppBatteryTracker" into tm-dev am: d6433e7015
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17116786 Change-Id: I5a7946e5c3cd22de8b379e1943adc8d78b1152b8
This commit is contained in:
@@ -1217,7 +1217,7 @@ final class AppBatteryTracker extends BaseAppStateTracker<AppBatteryPolicy>
|
|||||||
mDefaultBgCurrentDrainBgRestrictedThreshold =
|
mDefaultBgCurrentDrainBgRestrictedThreshold =
|
||||||
isLowRamDeviceStatic() ? val[1] : val[0];
|
isLowRamDeviceStatic() ? val[1] : val[0];
|
||||||
mDefaultBgCurrentDrainWindowMs = resources.getInteger(
|
mDefaultBgCurrentDrainWindowMs = resources.getInteger(
|
||||||
R.integer.config_bg_current_drain_window);
|
R.integer.config_bg_current_drain_window) * 1_000;
|
||||||
val = getFloatArray(resources.obtainTypedArray(
|
val = getFloatArray(resources.obtainTypedArray(
|
||||||
R.array.config_bg_current_drain_high_threshold_to_restricted_bucket));
|
R.array.config_bg_current_drain_high_threshold_to_restricted_bucket));
|
||||||
mDefaultBgCurrentDrainRestrictedBucketHighThreshold =
|
mDefaultBgCurrentDrainRestrictedBucketHighThreshold =
|
||||||
@@ -1227,9 +1227,9 @@ final class AppBatteryTracker extends BaseAppStateTracker<AppBatteryPolicy>
|
|||||||
mDefaultBgCurrentDrainBgRestrictedHighThreshold =
|
mDefaultBgCurrentDrainBgRestrictedHighThreshold =
|
||||||
isLowRamDeviceStatic() ? val[1] : val[0];
|
isLowRamDeviceStatic() ? val[1] : val[0];
|
||||||
mDefaultBgCurrentDrainMediaPlaybackMinDuration = resources.getInteger(
|
mDefaultBgCurrentDrainMediaPlaybackMinDuration = resources.getInteger(
|
||||||
R.integer.config_bg_current_drain_media_playback_min_duration);
|
R.integer.config_bg_current_drain_media_playback_min_duration) * 1_000;
|
||||||
mDefaultBgCurrentDrainLocationMinDuration = resources.getInteger(
|
mDefaultBgCurrentDrainLocationMinDuration = resources.getInteger(
|
||||||
R.integer.config_bg_current_drain_location_min_duration);
|
R.integer.config_bg_current_drain_location_min_duration) * 1_000;
|
||||||
mDefaultBgCurrentDrainEventDurationBasedThresholdEnabled = resources.getBoolean(
|
mDefaultBgCurrentDrainEventDurationBasedThresholdEnabled = resources.getBoolean(
|
||||||
R.bool.config_bg_current_drain_event_duration_based_threshold_enabled);
|
R.bool.config_bg_current_drain_event_duration_based_threshold_enabled);
|
||||||
mDefaultCurrentDrainTypesToRestrictedBucket = resources.getInteger(
|
mDefaultCurrentDrainTypesToRestrictedBucket = resources.getInteger(
|
||||||
|
|||||||
Reference in New Issue
Block a user