Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22f448e8 authored by Tej Singh's avatar Tej Singh Committed by Automerger Merge Worker
Browse files

Merge "Log plug state chage & other events at boot" into udc-dev am:...

Merge "Log plug state chage & other events at boot" into udc-dev am: 9ada0c5a am: 37c4486e am: ff615055

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23854042



Change-Id: Ia2a1a9cadcb47a6c3b56026917b957b33348cda7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3ad6c5e7 ff615055
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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);
        }
    }