storaged: update for using 1.0::HealthInfo.
Test: boots
Bug: 63702641
Change-Id: I97e322af97347c603f10b5b5b82cd3ae52c58b8f
diff --git a/storaged/include/storaged.h b/storaged/include/storaged.h
index f9ab2d5..edaa32f 100644
--- a/storaged/include/storaged.h
+++ b/storaged/include/storaged.h
@@ -130,7 +130,7 @@
void init_health_service();
virtual ::android::hardware::Return<void> healthInfoChanged(
- const ::android::hardware::health::V2_0::HealthInfo& info);
+ const ::android::hardware::health::V1_0::HealthInfo& info);
void serviceDied(uint64_t cookie, const wp<::android::hidl::base::V1_0::IBase>& who);
void report_storage_info();
diff --git a/storaged/storaged.cpp b/storaged/storaged.cpp
index 39c347a..5eacb12 100644
--- a/storaged/storaged.cpp
+++ b/storaged/storaged.cpp
@@ -62,7 +62,7 @@
using android::hardware::health::V1_0::BatteryStatus;
using android::hardware::health::V1_0::toString;
-using android::hardware::health::V2_0::HealthInfo;
+using android::hardware::health::V1_0::HealthInfo;
using android::hardware::health::V2_0::IHealth;
using android::hardware::health::V2_0::Result;
using android::hardware::interfacesEqual;
@@ -90,7 +90,7 @@
}
Return<void> storaged_t::healthInfoChanged(const HealthInfo& props) {
- mUidm.set_charger_state(is_charger_on(props.legacy.batteryStatus));
+ mUidm.set_charger_state(is_charger_on(props.batteryStatus));
return android::hardware::Void();
}