diff options
author | Yifan Hong <elsk@google.com> | 2017-11-06 12:59:09 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2017-11-06 13:14:18 -0800 |
commit | 348bc20bf8b2d5caf2c29b99ac53ba58ead87955 (patch) | |
tree | 0ba8193756dbb587c0d7746df71bbd9117714294 | |
parent | 1106e83c5412feb51648db7b0ced00b4ffca8d7c (diff) | |
download | system_core-348bc20bf8b2d5caf2c29b99ac53ba58ead87955.tar.gz system_core-348bc20bf8b2d5caf2c29b99ac53ba58ead87955.tar.bz2 system_core-348bc20bf8b2d5caf2c29b99ac53ba58ead87955.zip |
storaged: update for using 1.0::HealthInfo.
Test: boots
Bug: 63702641
Change-Id: I97e322af97347c603f10b5b5b82cd3ae52c58b8f
-rw-r--r-- | storaged/include/storaged.h | 2 | ||||
-rw-r--r-- | storaged/storaged.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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<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 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<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(); } |