summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/fuelgauge/PowerUsageDetail.java
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-07-22 10:12:05 -0400
committerJason Monk <jmonk@google.com>2015-07-22 10:12:05 -0400
commit82f30d2a41fe8283f377c16d6684b013ae2a4fae (patch)
treee9885655c8694f4e208c0ec4bed265bef1220147 /src/com/android/settings/fuelgauge/PowerUsageDetail.java
parentd85fafce30f6fb71ea9de9de3c6d8aafc99dba33 (diff)
downloadpackages_apps_Settings-82f30d2a41fe8283f377c16d6684b013ae2a4fae.zip
packages_apps_Settings-82f30d2a41fe8283f377c16d6684b013ae2a4fae.tar.gz
packages_apps_Settings-82f30d2a41fe8283f377c16d6684b013ae2a4fae.tar.bz2
Fix battery detail issues with "Android OS"
Bug: 22638215 Change-Id: Ia5bab7eb3bfb964e7f914e8c8f392f4fea66eb29
Diffstat (limited to 'src/com/android/settings/fuelgauge/PowerUsageDetail.java')
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageDetail.java8
1 files changed, 5 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();