Health@2.0: IHealthInfoCallback uses 1.0 HealthInfo.
BatteryService does not use these fields for posting
sticky intents.
This is a partial revert of commit
cbfb15e0b8
.
Bug: 63702641
Test: boots
Change-Id: Id6596b04daaa19ae97d783c7a8bc111a43725334
This commit is contained in:
parent
9aec6164fd
commit
f86271dbcd
4 changed files with 4 additions and 39 deletions
|
@ -82,7 +82,6 @@ genrule {
|
|||
":android.hardware.health@2.0_hal",
|
||||
],
|
||||
out: [
|
||||
"android/hardware/health/V2_0/HealthInfo.java",
|
||||
"android/hardware/health/V2_0/Result.java",
|
||||
"android/hardware/health/V2_0/IHealth.java",
|
||||
"android/hardware/health/V2_0/IHealthInfoCallback.java",
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package android.hardware.health@2.0;
|
||||
|
||||
import @1.0::HealthInfo;
|
||||
|
||||
/**
|
||||
* IHealthInfoCallback is the callback interface to
|
||||
* {@link IHealthInfoBus.registerCallback}.
|
||||
|
|
|
@ -26,40 +26,3 @@ enum Result : @1.0::Result {
|
|||
NOT_FOUND,
|
||||
CALLBACK_DIED,
|
||||
};
|
||||
|
||||
struct HealthInfo {
|
||||
/**
|
||||
* Legacy information from 1.0 HAL.
|
||||
*
|
||||
* If a value is not available, it must be set to 0, UNKNOWN, or empty
|
||||
* string.
|
||||
*/
|
||||
@1.0::HealthInfo legacy;
|
||||
|
||||
/**
|
||||
* Average battery current in microamperes. Positive
|
||||
* values indicate net current entering the battery from a charge source,
|
||||
* negative values indicate net current discharging from the battery.
|
||||
* The time period over which the average is computed may depend on the
|
||||
* fuel gauge hardware and its configuration.
|
||||
*
|
||||
* If this value is not available, it must be set to 0.
|
||||
*/
|
||||
int32_t batteryCurrentAverage;
|
||||
|
||||
/**
|
||||
* Remaining battery capacity percentage of total capacity
|
||||
* (with no fractional part). This value must be in the range 0-100
|
||||
* (inclusive).
|
||||
*
|
||||
* If this value is not available, it must be set to 0.
|
||||
*/
|
||||
int32_t batteryCapacity;
|
||||
|
||||
/**
|
||||
* Battery remaining energy in nanowatt-hours.
|
||||
*
|
||||
* If this value is not available, it must be set to 0.
|
||||
*/
|
||||
int64_t energyCounter;
|
||||
};
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "mHealthhidl_hal_test"
|
||||
#define LOG_TAG "health_hidl_hal_test"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
@ -35,6 +35,7 @@ namespace health {
|
|||
namespace V2_0 {
|
||||
|
||||
using V1_0::BatteryStatus;
|
||||
using V1_0::HealthInfo;
|
||||
|
||||
// Test environment for graphics.composer
|
||||
class HealthHidlEnvironment : public VtsHalHidlTargetTestEnvBase {
|
||||
|
|
Loading…
Reference in a new issue