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

Commit e1d5fd1e authored by Simon MacMullen's avatar Simon MacMullen Committed by Android (Google) Code Review
Browse files

Merge "Add system properties for plug type and charging state. This will allow...

Merge "Add system properties for plug type and charging state. This will allow us to see the initial state in Perfetto traces."
parents 8db1a37b 36eec1fb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ import android.os.ServiceManager;
import android.os.ShellCallback;
import android.os.ShellCommand;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UEventObserver;
import android.os.UserHandle;
@@ -574,6 +575,10 @@ public final class BatteryService extends SystemService {
                EventLog.writeEvent(EventLogTags.BATTERY_STATUS,
                        mHealthInfo.batteryStatus, mHealthInfo.batteryHealth, mHealthInfo.batteryPresent ? 1 : 0,
                        mPlugType, mHealthInfo.batteryTechnology);
                SystemProperties.set(
                        "debug.tracing.battery_status",
                        Integer.toString(mHealthInfo.batteryStatus));
                SystemProperties.set("debug.tracing.plug_type", Integer.toString(mPlugType));
            }
            if (mHealthInfo.batteryLevel != mLastBatteryLevel) {
                // Don't do this just from voltage or temperature changes, that is