OSDN Git Service

BatteryService: Use android.hardware.health@2.0.
authorYifan Hong <elsk@google.com>
Wed, 11 Oct 2017 18:29:01 +0000 (11:29 -0700)
committerYifan Hong <elsk@google.com>
Wed, 18 Oct 2017 02:46:01 +0000 (19:46 -0700)
commit89d55c1d50305a43b3e56157a1e4cabbda0bdb0e
treea9232dea18fb261f5eafd787c803129afa24bb34
parent9a78e64d8f7e523167e0cadc632ce69edba64b3a
BatteryService: Use android.hardware.health@2.0.

- BatteryService talks to android.hardware.health@2.0::IHealth
  /default and /backup instances.
- /default is optionally implemented by vendor (for launch devices)
  and overrides /backup if it exist.
- /backup is served by healthd (for upgrading devices) and
  is the fallback option.

Before this change, BatteryService talks to healthd in binder.
This change switches to hwbinder for this communication. The information
flow between them stays the same (and is augmented with a follow-up
CL for BatteryManager).

Test: adb logcat -e "health@2.0"
Test: vts health test
Test: BatteryManagerTest

Bug: 62229583
Change-Id: I46c4c0746a579b76c94660d062b92b9a9c4a4dbd
services/core/java/com/android/server/BatteryService.java
services/tests/servicestests/src/com/android/server/BatteryServiceTest.java