Skip to content

Commit 41b322a

Browse files
Implement triggers on the power.battery_input.suspended property
Bug: 167636754 Test: adb shell setprop power.battery_input.suspended true to disable charging Test: adb shell setprop power.battery_input.suspended false to reenable charging Change-Id: I57cc8bdadbb9f8e85b18df975a5eee22f5392d4e
1 parent 631067c commit 41b322a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

init.hardware.diag.rc.userdebug

+6
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,9 @@ on property:vendor.usb.config=*
109109

110110
on property:persist.vendor.usb.usbradio.config=*
111111
start usbd
112+
113+
on property:power.battery_input.suspended=true
114+
write /sys/class/power_supply/battery/input_suspend 1
115+
116+
on property:power.battery_input.suspended=false
117+
write /sys/class/power_supply/battery/input_suspend 0

0 commit comments

Comments
 (0)