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

Commit 34524151 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Modify IHealthInfoCallback interface to return V2.0 HealthInfo"

parents 30760c4a a09fa909
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -383,16 +383,16 @@ public final class BatteryService extends SystemService {
        }
    }

    private void update(HealthInfo info) {
    private void update(android.hardware.health.V2_0.HealthInfo info) {
        traceBegin("HealthInfoUpdate");
        synchronized (mLock) {
            if (!mUpdatesStopped) {
                mHealthInfo = info;
                mHealthInfo = info.legacy;
                // Process the new values.
                processValuesLocked(false);
                mLock.notifyAll(); // for any waiters on new info
            } else {
                copy(mLastHealthInfo, info);
                copy(mLastHealthInfo, info.legacy);
            }
        }
        traceEnd();
@@ -1010,7 +1010,7 @@ public final class BatteryService extends SystemService {

    private final class HealthHalCallback extends IHealthInfoCallback.Stub
            implements HealthServiceWrapper.Callback {
        @Override public void healthInfoChanged(HealthInfo props) {
        @Override public void healthInfoChanged(android.hardware.health.V2_0.HealthInfo props) {
            BatteryService.this.update(props);
        }
        // on new service registered