Modify IHealthInfoCallback interface to return V2.0 HealthInfo

Bug: 71860528
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: I47127eef791c5c2899ce67cb17b0122d6ae53433
This commit is contained in:
Hridya Valsaraju
2018-01-17 23:04:46 -08:00
parent 834ce2d499
commit a09fa9092a

View File

@@ -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