From b6789eb6478e8027bdad1bd9fdf4999104770261 Mon Sep 17 00:00:00 2001 From: yihsiang_peng Date: Wed, 21 Jun 2017 10:41:25 +0800 Subject: [PATCH] Restricting battery charging in retail demo mode Writing an upper threshold value of 35% for the battery level when the device goes into retail demo mode. Bug: 38105321 Change-Id: I21fd84cdd367914387749c4faa403cdeb50edd13 Signed-off-by: yihsiang_peng Signed-off-by: Yueyao Zhu --- init.common.usb.rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.common.usb.rc b/init.common.usb.rc index 19e93d1..629f0f6 100644 --- a/init.common.usb.rc +++ b/init.common.usb.rc @@ -3,3 +3,11 @@ import /vendor/etc/init/hw/init.wahoo.usb.rc on boot && property:ro.bootmode=usbradio && property:persist.sys.usb.usbradio.config=* setprop sys.usb.config "none" setprop sys.usb.config ${persist.sys.usb.usbradio.config} + +# battery driver settings for the retail demo environment where +# the device will be perpertually plugged in to a power source +on property:sys.retaildemo.enabled=1 + write /sys/module/htc_battery/parameters/full_level_dis_chg 35 + +on property:sys.retaildemo.enabled=0 + write /sys/module/htc_battery/parameters/full_level_dis_chg 100