battery: disable wireless for pts battery test

Disable wireless charging during drain, usb charging,
and charger stress test
  - vendor.disable.wlc 1
If device put onto dreamliner and shutdwon(drain out),
it would boot up by DC_CHG and keep shutdown(0%)-boot up
(by DC_CHG) continously. To avoid this symptom, limit wireless
current_max as 75000 after device 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: 117845723
Test: set the property manually and query the result from file node.
Signed-off-by: Jack Wu <wjack@google.com>
Signed-off-by: Maggie White <maggiewhite@google.com>
Change-Id: Ic5791c53f735caa19c73bae750651d774c0d4615
(cherry picked from commit bff033f25b8b41bc28b37d86b3c3ab3bb4deb3fb)
This commit is contained in:
Jack Wu 2019-01-17 21:38:27 +08:00 committed by Cyan_Hsieh
parent af49589c6d
commit e2bd20f2ce
2 changed files with 26 additions and 0 deletions

View File

@ -177,6 +177,8 @@ PRODUCT_COPY_FILES += \
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.hardware.chamber.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).chamber.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).wlc.rc
endif
# Audio effects

View File

@ -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