Commit graph

291 commits

Author SHA1 Message Date
Treehugger Robot
5f885c707f Merge "health: make libhealth_aidl_impl visibility public" am: 4795980565 am: fb57025383 am: 63b6c7a9e6 am: 48bac14c4a am: b892853f84
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1885109

Change-Id: I82470872e43a6ea4e37b71f4dad603b1abae6d1f
2021-11-09 07:46:01 +00:00
Yifan Hong
b6533047e6 Merge "health: handle charger in health HAL" am: 701ff4a1de am: abb62e5e53 am: ae92201c57 am: fe7fca6c9c am: 29af1fe837
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1866345

Change-Id: Ibfa5ee50caa763daebf701d04975c37cd16e4e26
2021-11-08 22:12:43 +00:00
Yifan Hong
0af83e56b5 Merge "health AIDL: Add readme" am: 9af94c627c am: fe5ba8ae61 am: 1c4e695225 am: 60ff9fd511 am: 2af9b1b036
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1875620

Change-Id: I92caefeef08350df8b9489553d676f5fb4c36ff1
2021-11-08 22:12:17 +00:00
Yifan Hong
2e07613c79 health: make libhealth_aidl_impl visibility public
It was meant to be the replacement of health2impl, the helper library
for implementing the health HAL. Hence, vendor implementation needs
to access it.

Test: pass
Bug: 177269435
Change-Id: I58f4bcd860983b2b16ea52fbdd6e05c8d4953454
2021-11-08 13:02:17 -08:00
Yifan Hong
701ff4a1de Merge "health: handle charger in health HAL" 2021-11-08 20:33:46 +00:00
Yifan Hong
9af94c627c Merge "health AIDL: Add readme" 2021-11-08 20:29:15 +00:00
Yifan Hong
02f04175c9 health AIDL: Add readme
Test: none
Bug: 177269435
Change-Id: I54e69d7789c6e1246bb126a27f9463e04407314e
2021-11-08 12:28:18 -08:00
Bob Badour
cbe4f23e43 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces am: 7a31e5dbd9 am: 19379841b2 am: c0ccdf2c39 am: e91b69774a am: 4c40e710f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1880391

Change-Id: I38d0a3d9a9b5185c79ffcc19a20d447f88061444
2021-11-04 23:04:34 +00:00
Bob Badour
7a31e5dbd9 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  health/utils/libhealthtest/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Icad37f04c1ca51b2b111b980a45002bf027505c8
2021-11-04 11:22:46 -07:00
Yifan Hong
a8f55cacaa health: handle charger in health HAL
Test: manual in charger mode
Bug: 203246116

Change-Id: Id02077d78fa8b1489ea4fba5b10e32f961c4cea0
2021-11-03 11:56:01 -07:00
Treehugger Robot
f765a1fd41 Merge "health AIDL: add vts tests" am: 9b965ac6a5 am: 0b1b6a0258 am: a2f7571af3 am: 5874237a8c am: 4429ee707a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1875176

Change-Id: Ie81a7e85c1b81b8eedd23065bd4b5b080106379d
2021-10-30 01:55:35 +00:00
Treehugger Robot
290b434c0b Merge "health: make AIDL HAL recovery available." am: 919d9a3da3 am: 1d798d6b05 am: 64c37c4ab2 am: 4b17ebfe10 am: a5f53f5c57
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1866341

Change-Id: I6dfb3840942b25ae34c6a7c923c13e043fd716b1
2021-10-30 01:55:25 +00:00
Treehugger Robot
9b965ac6a5 Merge "health AIDL: add vts tests" 2021-10-30 00:53:03 +00:00
Treehugger Robot
919d9a3da3 Merge "health: make AIDL HAL recovery available." 2021-10-30 00:30:34 +00:00
Yifan Hong
2200cffdad health AIDL: add vts tests
This is a direct translation of the health 2.0
and 2.1 VTS tests.

Some slight modifications are made (e.g. use googlemock
matchers) to make the test code more readable.

Test: run on Pixel
Bug: 203245778

Change-Id: Ifc3799a04a6a09d0d53f400b60d19fbfe004a3e3
2021-10-29 15:51:42 -07:00
Yifan Hong
9bcb6184ce Merge "health impl: compare interfaces with their binders" am: 1f5c57c965 am: e1bc376ed4 am: 2faf3adc25 am: f23ab16751 am: a9c420d770
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1875175

Change-Id: I53859b8fde62e359bf6756350de14b9d4f6c53fa
2021-10-29 22:25:36 +00:00
Treehugger Robot
fe3c7fda6a Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" am: 4cb51afac9 am: 77000a1e72 am: ff5abf0302 am: f112b5af06 am: 0629e64519
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1874549

Change-Id: I96c3d4eefb2056c25c21f59f3254464ccd30f164
2021-10-29 22:25:05 +00:00
Yifan Hong
1f5c57c965 Merge "health impl: compare interfaces with their binders" 2021-10-29 21:16:46 +00:00
Yifan Hong
6839f6742e health impl: compare interfaces with their binders
The intention is to compare binder objects not the
outer interface class.

Test: VTS
Bug: 177269435
Change-Id: I1c48112a75cb229b40c42ed2a3f347472d1860f9
2021-10-29 21:16:34 +00:00
Bob Badour
a88d5b1cb3 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  health/aidl/Android.bp
  health/aidl/default/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I24a0212a955a084c795990653c45b60ebda33357
2021-10-28 17:18:27 -07:00
Yifan Hong
c37f38d465 Merge "health: Add default impl of health AIDL HAL" am: 236fa8908c am: 8fe0dacf4f am: 5b3a4eb7a2 am: d4228e5de4 am: b09d3478c0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1550322

Change-Id: Id6207e8ca0adca09239a89e5729c48584422258f
2021-10-28 04:14:52 +00:00
Yifan Hong
e32a8ea137 health: make AIDL HAL recovery available.
Test: builds
Bug: 170338625
Change-Id: I45e0032e7a765cdeb39e01d17bacf11d1c10a75c
2021-10-26 23:53:55 -07:00
Yifan Hong
830cdb119e health: Add default impl of health AIDL HAL
Compared to the HIDL HAL implementation,
- libhealthloop (and the HealthLoop class) is kept
- Create libhealthaidlimpl that replaces libhealth2impl. Fork the implementation because
  libhealth2impl is highly coupled with HIDL’s design rationale. This includes forking:
  - HalHealthLoop
  - Health implementation
- Combine the passthrough Health and hwbinder BinderHealth classes into the AIDL
  implementation of Health. This is because AIDL does not support passthrough transport.
  Separating the implementation for the two transports in HIDL does not make sense for AIDL.
- In HIDL, a BinderHealth is a HalHealthLoop which is composed of a (passthrough)
  Health implementation. As a result of this change, in AIDL, a Health implementation
  is a HalHealthLoop, which associates with the Health implementation itself with a raw
  pointer.
- hidl_death_recipient becomes ScopedAIBinder_DeathRecipient
- Callback becomes LinkedCallback

Test: manual
Bug: 177269435
Change-Id: I76e914117ce09b218cdb9d655f2135d29bb629ae
2021-10-26 23:53:55 -07:00
Yifan Hong
8dd1925541 health: separate_platform_variant = false am: b47f676008 am: 4eb35d82b2 am: 5aa275fce8 am: e53f88d29d am: b1030dcd79
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1870443

Change-Id: I289584acfc28f349af485c9cd39728167a403cba
2021-10-26 23:58:26 +00:00
Yifan Hong
a180980bbb health: Convert of health HAL to AIDL am: 52ecb3f421 am: cf3b460b9b am: 359428aade am: 345c56bcad am: df4af12d1a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1550321

Change-Id: Iea670836f38eb2b457404c546f8467859da49fa6
2021-10-26 23:58:24 +00:00
Yifan Hong
4eb35d82b2 health: separate_platform_variant = false am: b47f676008
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1870443

Change-Id: I113e771f52bfd0b4bbd0b9a1f64d80e03afce01f
2021-10-26 22:55:47 +00:00
Yifan Hong
cf3b460b9b health: Convert of health HAL to AIDL am: 52ecb3f421
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1550321

Change-Id: I5083a0066a63101817886a548aabc0dcbb319722
2021-10-26 22:55:45 +00:00
Steven Moreland
713d22e0f1 Merge changes from topic "health-aidl"
* changes:
  health: Add to compatibility matrix.
  health: separate_platform_variant = false
  health: Convert of health HAL to AIDL
2021-10-26 22:33:31 +00:00
Yifan Hong
b47f676008 health: separate_platform_variant = false
Disable the generation of ndk_platform variant during the
ndk_platform -> ndk migration.

Test: builds
Bug: 177269435
Change-Id: I467eaee53542b152df1d398a8f044eb42fd01772
2021-10-26 11:03:03 -07:00
Yifan Hong
52ecb3f421 health: Convert of health HAL to AIDL
On top of the hidl2aidl translation, the following is
done manually:

- Renamed the package from health2 to health. Also pulls in
health@1.0::Battery* enums.
- Removes Result and Constants enum. Result values are returned
as transaction status codes.
- Removes health@2.1 charger related APIs.
  - remove shouldKeepScreenOn
  - remove getHealthConfig
  - remove HealthConfig type
- Removes StorageAttribute because it is not used in the framework
- Add units to HealthInfo fields and IHealth methods.
- Update docs (namely, u -> µ in various places)

Bug: 177269435
Test: pass

Change-Id: I9c9a9d9dd5d49142258e608a463412d3e89e91a3
2021-10-26 11:03:03 -07:00
Treehugger Robot
0f3f6c0f48 Merge "health: AIDL add owners." am: 68b3942abe am: 6168dbf926 am: 13b8eeecc8 am: e857abe52a am: fdac8e8d3a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1863334

Change-Id: I170f022d4ab2f29724cc364aae741daab6c414df
2021-10-19 22:24:43 +00:00
Treehugger Robot
5dbb371b10 Merge "health: drop backup instance for non-recovery." am: c900d6f20e am: 80d053dcb1 am: 5dadc03362 am: 84c24239f7 am: d665a05e5f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1861817

Change-Id: Ia4b3d03f3f0d8a5b483cc629d0bf87f1a27bd2cf
2021-10-19 21:36:31 +00:00
Treehugger Robot
68b3942abe Merge "health: AIDL add owners." 2021-10-19 21:13:20 +00:00
Yifan Hong
9ca39cef7f health: AIDL add owners.
... for usage in other places.

Test: none
Bug: 177269435
Change-Id: I74ea2a497237d966db0c146868c61a1a667e8cca
2021-10-19 19:51:58 +00:00
Yifan Hong
a76a2bf65b health: drop backup instance for non-recovery.
For the core variant (system), clients like storaged
etc. should no longer access the "backup" instance, because
healthd is removed from the system image.

For the vendor variant, this would only break if a
vendor image were launched with Android O / O-MR1 (so
health@2.0 is not required), and were compiled against an
Android T (and above) source tree (which won't check
the "backup" instance). This shouldn't be a valid configuration.

For the recovery variant, the "backup" instance has a different
meaning. It points to

  android.hardware.health@2.0-impl-default.recovery

... which was assumed by OEMs to be always installed when a
vendor-specific libhealthd is not necessary. Hence, its behavior
is kept. See

  hardware/interfaces/health/2.0/README.md

android.hardware.health@2.0-impl-default.recovery, and subsequently the
special handling of recovery mode below, can be removed once health@2.1
is the minimum required version (i.e. compatibility matrix level 3 is
removed). Health 2.1 requires OEMs to install the implementation
to the recovery partition when it is necessary (i.e. on non-A/B devices,
where IsBatteryOk() is needed in recovery).

Test: pass
Bug: 203245871

Change-Id: Ife14f5bdaba20e4cf5bd0b954aea4d04a62009c4
2021-10-19 12:50:11 -07:00
Keun young Park
ab35e0a3d0 Expose HIDL HALs to car framework apex
- all HALs also get //apex_available:platform as HAL should
  be available for platform

Bug: 192665266
Test: build
Change-Id: Ic6781447628761a8e8a9aa31e473dfc340af9989
2021-10-07 23:05:53 +00:00
Yiming Pan
1698249ddd Merge "Backfill owner information for VTS module VtsHalHealthV2_1TargetTest." am: c076175c35
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814136

Change-Id: If5c32786a0b8502443b35dbd563cc76dfdc17773
2021-09-30 00:36:58 +00:00
Yiming Pan
c076175c35 Merge "Backfill owner information for VTS module VtsHalHealthV2_1TargetTest." 2021-09-30 00:22:11 +00:00
Yiming Pan
a2ab6a9a5f Backfill owner information for VTS module VtsHalHealthV2_1TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I7cba8c0c0fc611d7499c9afdc93d5d6fe865b33a
2021-08-30 12:59:11 -07:00
Yiming Pan
b68fc32345 Merge "Update the OWNERS file of VTS module VtsHalHealthV2_0TargetTest" am: aa3873ce1c am: 1c83e9bb9e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1773797

Change-Id: I6e6fc19f1cbab4335fe9a096947e070dd2defd5a
2021-07-30 18:30:09 +00:00
Yiming Pan
aa3873ce1c Merge "Update the OWNERS file of VTS module VtsHalHealthV2_0TargetTest" 2021-07-30 17:57:35 +00:00
Yiming Pan
c14d58c01c Merge "Add OWNERS for VTS module VtsHalHealthStorageV1_0TargetTest" am: 08716a4fd9 am: f471733e9e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1773796

Change-Id: Ibbdb339a83b88e408dcf6aa122f8a6286b116f41
2021-07-28 22:03:34 +00:00
Yiming Pan
08716a4fd9 Merge "Add OWNERS for VTS module VtsHalHealthStorageV1_0TargetTest" 2021-07-28 21:29:42 +00:00
Yiming Pan
d68f282ddf Update the OWNERS file of VTS module VtsHalHealthV2_0TargetTest
Add a bug component id.

Test: Tree Hugger
Bug: 143903671
Change-Id: Ic5d5b15c72ac71cf4fbe527082b3b2af57d1866f
2021-07-28 14:27:38 -07:00
Jiyong Park
48131c0ace Merge "Remove ndk_platform backend. Use the ndk backend." am: 2346a4c6b9 am: 4ef9aa49dc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1778908

Change-Id: Ib35b7b0ddc0bebd0714d290b1ac2fab8d5a1893e
2021-07-28 12:39:05 +00:00
Jiyong Park
27f77fefd7 Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same 'ndk' backend.

Bug: 161456198
Test: m
Change-Id: Ibe8beeaf0d1b33968fb782f1f70c17ae9e9bf871
2021-07-27 14:44:47 +09:00
Yiming Pan
b438a5ad46 Add OWNERS for VTS module VtsHalHealthStorageV1_0TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I793d350f6ab1d38cb7d771b15b2d2ed0db76f0fd
2021-07-21 16:29:06 -07:00
Yifan Hong
a8f4f61de3 Merge "health: stop spamming." am: d615af1e6d am: 7d1b211f6c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1764905

Change-Id: I342f213716151cde971fe09e8b41bd8c4bcf911d
2021-07-14 00:14:53 +00:00
Yifan Hong
975a600029 health: stop spamming.
Though it is useful to log when the client is dead, it
is too spammy when the framework is dead. Stop spamming.

Test: pass
Bug: 191548101
Change-Id: I43bef16b14300c3e435173ef2af9d8dd9dbfedb8
2021-07-13 11:26:03 -07:00
Jiyong Park
72b6359859 Freeze AIDL APIs for SC
Ignore-AOSP-First: part of SC finalization

Bug: 188713899
Test: m
Change-Id: Iee18cd05954dc8ea08cc4f985499a70977d1af4f
2021-05-25 10:13:26 +09:00