Create a friend method for reporting battery health
Bug: 71860528 Test: Test: vts-tradefed run vts -m VtsHalHealthV2_0 Change-Id: I6c56c601ee59fe33ee4a19dd4aeafbe3a1bd4c72
This commit is contained in:
parent
89178e79d5
commit
7fa7225cc4
|
@ -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 \
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue