diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/fuelgauge/PowerUsageDetail.java | 8 | ||||
-rw-r--r-- | src/com/android/settings/fuelgauge/PowerUsageSummary.java | 2 |
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, |