Lines Matching refs:charger

9 * System properties `ro.charger.enable_suspend` and/or `ro.charger.no_ui`
10 are set to a `true` value. See [below](#charger-sysprops).
12 declaration with `class charger` in `init.rc` is different from the one
13 provided by the example implementation. See [below](#charger-init-rc).
18 ### System properties for charger {#charger-sysprops}
20 The health AIDL HAL service also provides functionalities of `charger`. As a
21 result, the system charger at `/system/bin/charger` is deprecated.
23 However, the health AIDL HAL service is not allowed to read `ro.charger.*`
25 * `ro.charger.enable_suspend`. If set, you need a custom health AIDL HAL
26 service. See [below](#charger-enable-suspend).
27 * `ro.charger.no_ui`. If set, you need a custom health AIDL HAL service.
28 See [below](#charger-no-ui).
29 * `ro.charger.draw_split_screen`. The system property is deprecated.
30 * `ro.charger.draw_split_offset`. The system property is deprecated.
31 * `ro.charger.disable_init_blank`. The system property is deprecated.
36 ### Default `service` declaration for charger in `init.rc` {#charger-init-rc}
42 has `class charger`. Most likely, the declaration looks something like this
46 service vendor.charger /system/bin/charger
47 class charger
48 seclabel u:r:charger:s0
64 `vendor.charger`, and there are actions
66 `<name>` is the name of your charger service, then you need a custom health
68 * If your service belongs to additional classes beside `charger`, you need a
70 * Modify the `seclabel` line. Replace `charger` with `charger_vendor`.
91 Then, delete any existing `service` with `class charger` in your device-specific
94 already contains an entry for charger.
96 If your device supports charger mode and it has custom charger resources,
97 [move charger resources to `/vendor`](#charger-res)
161 for charger (`ro.charger.no_ui=true`), skip the invocation of
201 ### Implementing charger {#charger}
203 #### Move charger resources to `/vendor` argument
205 Ensure that charger resources are installed to `/vendor`, not `/product`.
210 /vendor/etc/res/values/charger/animation.txt
218 /vendor/etc/res/images/charger/*.png
225 /vendor/etc/res/images/charger/default/*.png
234 #### Modify `init.rc` for charger argument
237 `class charger` to the `init.rc` file in your custom health service.
241 existing charger service (usually `vendor.charger`), then the name of the
245 Modify the entry to invoke the health service binary with `--charger` argument.
251 service vendor.charger /vendor/bin/hw/android.hardware.health-service-tuna --charger
252 class charger
257 #### No charger mode {#no-charger} argument
265 // Skip checking if arguments contain "--charger"
271 You may optionally delete the `service` entry with `class charger` in the
274 #### No charger UI {#charger-no-ui} argument
276 If your device does not have a UI for charger (`ro.charger.no_ui=true`), skip
279 You may want to keep the `KernelLogger` so that charger still logs battery
285 if (argc >= 2 && argv[1] == "--charger"sv) {
294 #### Enable suspend {#charger-enable-suspend} argument
296 If your device has `ro.charger.enable_suspend=true`, implement a new class,
310 if (argc >= 2 && argv[1] == "--charger"sv) {
321 #### SELinux rules for charger argument
324 add `charger_type` to it so the health HAL service can have charger-specific