Merge "resolve merge conflicts of 758b2d4ae6
to master"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2f09c9e4c8
@@ -576,31 +576,8 @@ public class PowerUsageSummary extends PowerUsageBase implements
|
||||
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.totalPowerMah < ((mStatsHelper.getMaxRealPower() * 2) / 3)) {
|
||||
continue;
|
||||
}
|
||||
if (percentOfTotal < 10) {
|
||||
continue;
|
||||
}
|
||||
if ("user".equals(Build.TYPE)) {
|
||||
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.totalPowerMah < (mStatsHelper.getMaxRealPower() / 2)) {
|
||||
continue;
|
||||
}
|
||||
if (percentOfTotal < 5) {
|
||||
continue;
|
||||
}
|
||||
if ("user".equals(Build.TYPE)) {
|
||||
continue;
|
||||
}
|
||||
if (shouldHideSipper(sipper)) {
|
||||
continue;
|
||||
}
|
||||
final UserHandle userHandle = new UserHandle(UserHandle.getUserId(sipper.getUid()));
|
||||
final BatteryEntry entry = new BatteryEntry(getActivity(), mHandler, mUm, sipper);
|
||||
@@ -650,6 +627,13 @@ public class PowerUsageSummary extends PowerUsageBase implements
|
||||
BatteryEntry.startRequestQueue();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
boolean shouldHideSipper(BatterySipper sipper) {
|
||||
// Don't show over-counted and unaccounted in any condition
|
||||
return sipper.drainType == BatterySipper.DrainType.OVERCOUNTED
|
||||
|| sipper.drainType == BatterySipper.DrainType.UNACCOUNTED;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void refreshAnomalyIcon() {
|
||||
for (int i = 0, size = mAnomalySparseArray.size(); i < size; i++) {
|
||||
|
Reference in New Issue
Block a user