summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-07-23 20:23:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-23 20:23:57 +0000
commit8bf5f3075e6e0797e96a861330b7ff82eee88bee (patch)
tree2d67b1b345df5f4398d484cc176b65fe7fddbb22 /src/com/android/settings
parent9927acd3ad67ce2cc20e9f9c06af442f6ba69c8f (diff)
parent82f30d2a41fe8283f377c16d6684b013ae2a4fae (diff)
downloadpackages_apps_Settings-8bf5f3075e6e0797e96a861330b7ff82eee88bee.zip
packages_apps_Settings-8bf5f3075e6e0797e96a861330b7ff82eee88bee.tar.gz
packages_apps_Settings-8bf5f3075e6e0797e96a861330b7ff82eee88bee.tar.bz2
Merge "Fix battery detail issues with "Android OS"" into mnc-dev
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageDetail.java8
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageSummary.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
index 9e7fa48..6d4e398 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
@@ -163,7 +163,9 @@ public class PowerUsageDetail extends PowerUsageBase implements Button.OnClickLi
printWriter.flush();
args.putString(PowerUsageDetail.EXTRA_REPORT_CHECKIN_DETAILS,
result.toString());
- userId = UserHandle.getUserId(uid.getUid());
+ if (uid.getUid() != 0) {
+ userId = UserHandle.getUserId(uid.getUid());
+ }
}
}
break;
@@ -438,11 +440,11 @@ public class PowerUsageDetail extends PowerUsageBase implements Button.OnClickLi
}
});
} else {
- removePreference(KEY_HIGH_POWER);
+ mControlsParent.removePreference(findPreference(KEY_HIGH_POWER));
}
} else {
removePreference(KEY_TWO_BUTTONS);
- removePreference(KEY_HIGH_POWER);
+ mControlsParent.removePreference(findPreference(KEY_HIGH_POWER));
}
refreshStats();
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
index 1475034..9e3029d 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -346,6 +346,8 @@ public class PowerUsageSummary extends PowerUsageBase {
}
stats.add(new BatterySipper(DrainType.APP,
new FakeUid(Process.FIRST_APPLICATION_UID), use));
+ stats.add(new BatterySipper(DrainType.APP,
+ new FakeUid(0), use));
// Simulate dex2oat process.
BatterySipper sipper = new BatterySipper(DrainType.APP,