Merge "Fix battery detail issues with "Android OS"" into mnc-dev

This commit is contained in:
Jason Monk
2015-07-23 20:23:57 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 3 deletions

View File

@@ -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();

View File

@@ -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,