From 2ecad8d87dafed4ff5d671eff8bb811020b744df Mon Sep 17 00:00:00 2001 From: peter_li Date: Tue, 4 Oct 2016 13:36:03 +0800 Subject: [PATCH] =?UTF-8?q?[CTS]It=20should=20be=20more=20reasonable=20to?= =?UTF-8?q?=20control=20battery=20saver=20function=20from=20setting=20DB?= =?UTF-8?q?=20instead=20of=20plugging/unplugging=20charger=20for=20?= =?UTF-8?q?=E2=80=9CCtsHostsideNetworkTests=E2=80=9D=20test=20case.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Symptom: It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for “CtsHostsideNetworkTests” test case. Root Cause: The test function “setBatterySaverMode” of “CtsHostsideNetworkTests” use command to set setting DB when trying to turn on battery saver. But while trying to turn off battery saver, it only use charger plug-in event. It should be more reasonable to turn off battery saver through similar DB setting as this function did at turning on. Solution: To control battery saver function from setting DB. Project: Note: Test done by RD: Futher testing need Q team's support: Bug: 31897608 Change-Id: Id70ba458e85f98393d7652bb4e79bd182172c60f --- .../net/hostside/AbstractRestrictBackgroundNetworkTestCase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java index 9980327bbe..70fc51acfc 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java @@ -610,6 +610,7 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation executeSilentShellCommand("cmd battery unplug"); executeSilentShellCommand("settings put global low_power 1"); } else { + executeSilentShellCommand("settings put global low_power 0"); turnBatteryOn(); } }