Change test to use set-mode cmd.

Change-Id: I23c0888ba105067f19ebe516ce3fbc6868ed2b17
This commit is contained in:
Jocelyn Dang
2017-04-12 15:31:51 -07:00
parent 697f449f89
commit e7d7cd1369

View File

@@ -700,9 +700,9 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation
Log.i(TAG, "Setting Battery Saver Mode to " + enabled);
if (enabled) {
turnBatteryOff();
executeSilentShellCommand("settings put global low_power 1");
executeSilentShellCommand("cmd power set-mode 1");
} else {
executeSilentShellCommand("settings put global low_power 0");
executeSilentShellCommand("cmd power set-mode 0");
turnBatteryOn();
}
}