Deprecate [email protected]

The framework will continue to work with [email protected] until it is fully deprecated according to the standard HAL deprecation schedule. When [email protected] is deprecated (entry removed from framework compatibility matrix), healthd and libbatterymonitor must also be removed from system to avoid unknown behaviors for healthd. As [email protected] is an optional HAL and all healthd dependencies to [email protected] are guarded by NULL checks, nothing should break on deprecation.

When Android removes the legacy code path (healthd, [email protected]), [email protected] HAL is deprecated according to deprecation schedule. In addition, Android also removes the following:

  1. healthd dependency in framework
  2. healthd
  3. [email protected] HAL definition library from system
  4. [email protected] entry in framework compatibility matrix

Remove healthd

For devices launching with Android 9 and devices upgrading to Android 9 that provide the Health 2.0 HAL in the new vendor image, we recommend removing healthd from the system image to save disk space and speed boot time.

To do so:

  1. Remove healthd and healthd.rc from the system image by adding the following line to the device-specific implementation in Soong:

    cc_binary {
        name: "[email protected]_name"
        overrides: ["healthd"],
        // ...
    }
    

    Or, if the module is in Make:

    LOCAL_MODULE_NAME := \
        [email protected]_name
    LOCAL_OVERRIDES_MODULES := healthd
    

    If the default implementation [email protected] is installed, implement a device-specific [email protected]_name instead. For more information, see Implementing Health.