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

Commit 601ac10f authored by Yiling Chuang's avatar Yiling Chuang
Browse files

Add charging status as a global variable for flexibility

Expose charging status info as a protected variable so classes inherit it can also get this info.

Bug: 391270019
Flag: EXEMPT bugfix
Test: atest SystemUITests
Change-Id: I34250714e9a76c79f32948a2557c80d9e07eb402
parent 48ed9e63
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ public class KeyguardIndicationController {
    protected boolean mPowerPluggedInDock;
    protected int mChargingSpeed;
    protected boolean mPowerCharged;
    protected int mChargingStatus;

    /** Whether the battery defender is triggered. */
    private boolean mBatteryDefender;
@@ -1260,6 +1261,7 @@ public class KeyguardIndicationController {
        pw.println("  mPowerCharged: " + mPowerCharged);
        pw.println("  mChargingSpeed: " + mChargingSpeed);
        pw.println("  mChargingWattage: " + mChargingWattage);
        pw.println("  mChargingStatus: " + mChargingStatus);
        pw.println("  mMessageToShowOnScreenOn: " + mBiometricErrorMessageToShowOnScreenOn);
        pw.println("  mDozing: " + mDozing);
        pw.println("  mTransientIndication: " + mTransientIndication);
@@ -1317,6 +1319,7 @@ public class KeyguardIndicationController {
            mPowerCharged = status.isCharged();
            mChargingWattage = status.maxChargingWattage;
            mChargingSpeed = status.getChargingSpeed(mContext);
            mChargingStatus = status.chargingStatus;
            mBatteryLevel = status.level;
            mBatteryPresent = status.present;
            mBatteryDefender = isBatteryDefender(status);