From 7f6e0eee367c408cdeb357cbb79f491ded595b7f Mon Sep 17 00:00:00 2001 From: Jack Wu Date: Thu, 17 Jan 2019 21:38:27 +0800 Subject: [PATCH] battery: disable wireless for pts battery test Disable wireless charging during drain, usb charging, and charger stress test - vendor.disable.wlc 1 If a device was put on dreamliner and shut dwon(drain out), it powered up by DC_CHG and then shut down(0%) again - boot (by DC_CHG) continuously. To avoid this symptom, limit wireless current_max as 75000 after devices boot up - persist.vendor.limit.wlc.current=1 How to verify: adb shell setprop vendor.disable.wlc 1 adb shell cat /sys/class/power_supply/wireless/online >>>> 0 adb shell setprop persist.vendor.limit.wlc.current 1 adb shell cat /sys/class/power_supply/dc/current_max >>>> 75000 Bug: 179094447 Test: set the property manually and query the result from file node. Change-Id: Ic5791c53f735caa19c73bae750651d774c0d4615 Signed-off-by: Ken Tsou (synced from commit 84d73dafb7e44bd195adcc4cbb16bad28728aedc) --- init.hardware.wlc.rc.userdebug | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 init.hardware.wlc.rc.userdebug diff --git a/init.hardware.wlc.rc.userdebug b/init.hardware.wlc.rc.userdebug new file mode 100644 index 00000000..dee7b6bc --- /dev/null +++ b/init.hardware.wlc.rc.userdebug @@ -0,0 +1,24 @@ +# +# Copyright (C) 2018 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=1 + write /sys/class/power_supply/dc/current_max 75000 + +on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=0 + write /sys/class/power_supply/dc/current_max 1100000 + +on property:vendor.disable.wlc=1 + write /sys/class/power_supply/wireless/online 0