Loading health/2.0/IHealth.hal +5 −5 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value battery capacity, or INT32_MIN if not successful. * @return value battery capacity, or 0 if not successful. */ getChargeCounter() generates (Result result, int32_t value); Loading @@ -84,7 +84,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value instantaneous battery current, or INT32_MIN if not * @return value instantaneous battery current, or 0 if not * successful. */ getCurrentNow() generates (Result result, int32_t value); Loading @@ -101,7 +101,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value average battery current, or INT32_MIN if not successful. * @return value average battery current, or 0 if not successful. */ getCurrentAverage() generates (Result result, int32_t value); Loading @@ -113,7 +113,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value remaining battery capacity, or INT32_MIN if not successful. * @return value remaining battery capacity, or 0 if not successful. */ getCapacity() generates (Result result, int32_t value); Loading @@ -123,7 +123,7 @@ interface IHealth { * @return result SUCCESS if successful, * NOT_SUPPORTED if this property is not supported, * UNKNOWN for other errors. * @return value remaining energy, or INT64_MIN if not successful. * @return value remaining energy, or 0 if not successful. */ getEnergyCounter() generates (Result result, int64_t value); Loading health/2.0/default/Health.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -108,27 +108,27 @@ void getProperty(const std::unique_ptr<BatteryMonitor>& monitor, int id, T defau } Return<void> Health::getChargeCounter(getChargeCounter_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CHARGE_COUNTER, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CHARGE_COUNTER, 0, _hidl_cb); return Void(); } Return<void> Health::getCurrentNow(getCurrentNow_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CURRENT_NOW, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CURRENT_NOW, 0, _hidl_cb); return Void(); } Return<void> Health::getCurrentAverage(getCurrentAverage_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CURRENT_AVG, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CURRENT_AVG, 0, _hidl_cb); return Void(); } Return<void> Health::getCapacity(getCapacity_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CAPACITY, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CAPACITY, 0, _hidl_cb); return Void(); } Return<void> Health::getEnergyCounter(getEnergyCounter_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_ENERGY_COUNTER, INT64_MIN, _hidl_cb); getProperty<int64_t>(battery_monitor_, BATTERY_PROP_ENERGY_COUNTER, 0, _hidl_cb); return Void(); } Loading Loading
health/2.0/IHealth.hal +5 −5 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value battery capacity, or INT32_MIN if not successful. * @return value battery capacity, or 0 if not successful. */ getChargeCounter() generates (Result result, int32_t value); Loading @@ -84,7 +84,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value instantaneous battery current, or INT32_MIN if not * @return value instantaneous battery current, or 0 if not * successful. */ getCurrentNow() generates (Result result, int32_t value); Loading @@ -101,7 +101,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value average battery current, or INT32_MIN if not successful. * @return value average battery current, or 0 if not successful. */ getCurrentAverage() generates (Result result, int32_t value); Loading @@ -113,7 +113,7 @@ interface IHealth { * NOT_SUPPORTED if this property is not supported * (e.g. the file that stores this property does not exist), * UNKNOWN for other errors. * @return value remaining battery capacity, or INT32_MIN if not successful. * @return value remaining battery capacity, or 0 if not successful. */ getCapacity() generates (Result result, int32_t value); Loading @@ -123,7 +123,7 @@ interface IHealth { * @return result SUCCESS if successful, * NOT_SUPPORTED if this property is not supported, * UNKNOWN for other errors. * @return value remaining energy, or INT64_MIN if not successful. * @return value remaining energy, or 0 if not successful. */ getEnergyCounter() generates (Result result, int64_t value); Loading
health/2.0/default/Health.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -108,27 +108,27 @@ void getProperty(const std::unique_ptr<BatteryMonitor>& monitor, int id, T defau } Return<void> Health::getChargeCounter(getChargeCounter_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CHARGE_COUNTER, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CHARGE_COUNTER, 0, _hidl_cb); return Void(); } Return<void> Health::getCurrentNow(getCurrentNow_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CURRENT_NOW, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CURRENT_NOW, 0, _hidl_cb); return Void(); } Return<void> Health::getCurrentAverage(getCurrentAverage_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CURRENT_AVG, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CURRENT_AVG, 0, _hidl_cb); return Void(); } Return<void> Health::getCapacity(getCapacity_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_CAPACITY, INT32_MIN, _hidl_cb); getProperty<int32_t>(battery_monitor_, BATTERY_PROP_CAPACITY, 0, _hidl_cb); return Void(); } Return<void> Health::getEnergyCounter(getEnergyCounter_cb _hidl_cb) { getProperty(battery_monitor_, BATTERY_PROP_ENERGY_COUNTER, INT64_MIN, _hidl_cb); getProperty<int64_t>(battery_monitor_, BATTERY_PROP_ENERGY_COUNTER, 0, _hidl_cb); return Void(); } Loading