Before this cl, we use the first package name if there is a name
list in BatterySipper.
We should use BatteryEntry.defaultPackageName instead, which could
describle the batterysipper more accurately.
Bug: 62417935
Test: RunSettingsRoboTests
Change-Id: I44fa151c0cf8f14cba305f179c7e94e5bc3ce434
Change the formatting of the time since last used to match the
formatting in battery info.
Change-Id: Ibd59493719d9f90391713713b75afd11790deaa0
Fix: 62273254
Test: make RunSettingsRoboTests
The items in the ListView for the Advanced battery usage screen should
not ripple when touched, since these items don't do anything.
Bug: 38019330
Test: make RunSettingsRoboTests
Change-Id: I987a770f0f146b02bbf947238be7490e8a170feb
Updates several locations to use config_headlineFontFamily as the
android:fontFamily or Typeface object. This allows OEMs to specify
a custom headline font.
Bug: 36855735
Test: ag/2360364
Change-Id: I627515d2afd5ff018aae10843d099b8c83880635
This removes the jitter when the cache is empty and there is
initially no summary, and then it is replaced by the fetched summary
when it's available.
Bug:36463348
Test: make RunSettingsRoboTests
Change-Id: I92cafbf23e3c562a470488dea28fd5106bbdf885
This reverts commit c1e9f8787f.
Reason for revert: There is an issue when dropdown menu text has a '%' sign in it.
Despite testing it on my own devices, the bug did not show up immediately.
Instead of continuing down this path for OC, we'll just revert
this patch, and then as an ugly, band-aid solution, check the
summary text for the "%s" substring, and hide it when found.
In O-DR onward, we'll look for a more permanent solution.
Change-Id: Ia7a04bfb7b09c436dc0f13564f2134a1f0c436e2
Bug: 36101902
Fix: 62211676
In order to hide dynamic summaries which use SettingPref,
we check if the summary is equal to "%s".
This is a temporary, band-aid fix which should be
changed in the next release.
Bug: 36101902
Test: make RunSettingsRoboTests
Change-Id: I6cadb3ba68f09ba18ad9a6d2a817804c5d4a08e5
1. Set mNetwork before the NetworkCallbacks can be delivered.
Previously, the code would set mNetwork in updateInfo, relying
on the fact that the BroadcastReceiver registered in onResume
is immediately invoked. However, this races with the
callbacks, which are also immediately invoked. If the
callbacks won the race, mNetwork would not be set and they
would be ignored.
2. Call updateInfo in onResume instead of in displayPreference.
This ensures that it's always called exactly once before the
activity starts running, regardless of whether it's being
displayed the first time (i.e., after onStart) or resumed
by switching from another app. displayPreference is only
called in the former case.
3. Don't call getLinkProperties and getNetworkCapabilities in
updateInfo. These calls are superfluous, because this
information is update by the NetworkCallbacks, and they can
cause jank because updateInfo is called on the UI thread.
This requires that the tests be changed so they always call
onResume, since no UI elements are populated until onResume is
called.
Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: Iccb1b9ae51188755d890a6df83004dbe9bec565e
This cl refactor it so:
1. AnomayLoader could create its own BatteryStatsHelper if needed.
2. AnomalyDetector could detect the anomaly with a target package name
3. Remove FeatureProvider in AnomalyLoader and use
AnomalyDetectionPolicy instead
With this cl, we could add anomaly detection to battery usage page
more easily.
Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I1ee09701de8b5c8855f44e447813760285794c89