diff --git a/storaged/include/storaged.h b/storaged/include/storaged.h index f9ab2d59b..edaa32fad 100644 --- a/storaged/include/storaged.h +++ b/storaged/include/storaged.h @@ -130,7 +130,7 @@ public: void init_health_service(); virtual ::android::hardware::Return 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 39c347a07..5eacb127a 100644 --- a/storaged/storaged.cpp +++ b/storaged/storaged.cpp @@ -62,7 +62,7 @@ const uint32_t storaged_t::crc_init = 0x5108A4ED; /* STORAGED */ 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 @@ inline charger_stat_t is_charger_on(BatteryStatus prop) { } Return 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(); }