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

Commit 1012c39a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Create a friend method for reporting battery health"

parents 4640cde6 7fa7225c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ LOCAL_STATIC_LIBRARIES := \
    android.hardware.health@2.0 \
    android.hardware.health@2.0-impl \
    android.hardware.health@1.0 \
    android.hardware.health@1.0-convert \
    libhealthstoragedefault \
    libminui \
    libpng \
@@ -96,6 +97,7 @@ CHARGER_STATIC_LIBRARIES := \
    android.hardware.health@2.0-impl \
    android.hardware.health@2.0 \
    android.hardware.health@1.0 \
    android.hardware.health@1.0-convert \
    libhidltransport \
    libhidlbase \
    libhwbinder \
+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ BatteryMonitor::BatteryMonitor() : mHealthdConfig(nullptr), mBatteryDevicePresen
    initBatteryProperties(&props);
}

struct BatteryProperties getBatteryProperties(BatteryMonitor* batteryMonitor) {
    return batteryMonitor->props;
}

int BatteryMonitor::getBatteryStatus(const char* status) {
    int ret;
    struct sysfsStringEnumMap batteryStatusMap[] = {
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ class BatteryMonitor {
    int getChargeStatus();
    status_t getProperty(int id, struct BatteryProperty *val);
    void dumpState(int fd);
    friend struct BatteryProperties getBatteryProperties(BatteryMonitor* batteryMonitor);

  private:
    struct healthd_config *mHealthdConfig;