summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/fuelgauge/PowerUsageSummary.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-07-17 19:20:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-17 17:59:02 +0000
commitbe875db541d673aa62dd99acebc523a26018616e (patch)
treeb7b6a96f4ac563f3026f1a205193859bc16613b2 /src/com/android/settings/fuelgauge/PowerUsageSummary.java
parentf1d56ebb111d10779b25f1105c3077cd9fd39890 (diff)
parentc19eb361a407058b76cbbc866106db9fc81d9596 (diff)
downloadpackages_apps_Settings-be875db541d673aa62dd99acebc523a26018616e.tar.gz
packages_apps_Settings-be875db541d673aa62dd99acebc523a26018616e.tar.bz2
packages_apps_Settings-be875db541d673aa62dd99acebc523a26018616e.zip
Merge "Battery chart fixes." into lmp-dev
Diffstat (limited to 'src/com/android/settings/fuelgauge/PowerUsageSummary.java')
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageSummary.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
index 70e917621..a691d4d57 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -272,6 +272,26 @@ public class PowerUsageSummary extends PreferenceFragment {
if (((int) (percentOfTotal + .5)) < 1) {
continue;
}
+ if (sipper.drainType == BatterySipper.DrainType.OVERCOUNTED) {
+ // Don't show over-counted unless it is at least 2/3 the size of
+ // the largest real entry, and its percent of total is more significant
+ if (sipper.value < ((mStatsHelper.getMaxRealPower()*2)/3)) {
+ continue;
+ }
+ if (percentOfTotal < 10) {
+ continue;
+ }
+ }
+ if (sipper.drainType == BatterySipper.DrainType.UNACCOUNTED) {
+ // Don't show over-counted unless it is at least 1/2 the size of
+ // the largest real entry, and its percent of total is more significant
+ if (sipper.value < (mStatsHelper.getMaxRealPower()/2)) {
+ continue;
+ }
+ if (percentOfTotal < 5) {
+ continue;
+ }
+ }
final UserHandle userHandle = new UserHandle(UserHandle.getUserId(sipper.getUid()));
final BatteryEntry entry = new BatteryEntry(getActivity(), mHandler, mUm, sipper);
final PowerGaugePreference pref = new PowerGaugePreference(getActivity(),