Merge "Log plug state chage & other events at boot" into udc-dev am: 9ada0c5ab2 am: 37c4486ea7 am: ff615055a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23854042 Change-Id: Ia2a1a9cadcb47a6c3b56026917b957b33348cda7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -14613,17 +14613,13 @@ public class BatteryStatsImpl extends BatteryStats {
|
||||
|
||||
// Inform StatsLog of setBatteryState changes.
|
||||
private void reportChangesToStatsLog(final int status, final int plugType, final int level) {
|
||||
if (!mHaveBatteryLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mBatteryStatus != status) {
|
||||
if (!mHaveBatteryLevel || mBatteryStatus != status) {
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.CHARGING_STATE_CHANGED, status);
|
||||
}
|
||||
if (mBatteryPlugType != plugType) {
|
||||
if (!mHaveBatteryLevel || mBatteryPlugType != plugType) {
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.PLUGGED_STATE_CHANGED, plugType);
|
||||
}
|
||||
if (mBatteryLevel != level) {
|
||||
if (!mHaveBatteryLevel || mBatteryLevel != level) {
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BATTERY_LEVEL_CHANGED, level);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user