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

Commit 348bc20b authored by Yifan Hong's avatar Yifan Hong
Browse files

storaged: update for using 1.0::HealthInfo.

Test: boots
Bug: 63702641

Change-Id: I97e322af97347c603f10b5b5b82cd3ae52c58b8f
parent 1106e83c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
+2 −2
Original line number Diff line number Diff line
@@ -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();
}