Remove usage of TV-specific setting in playback devices in CTS

Bug: 162062287
Test: atest
Change-Id: I72fd6e1f310047df09b168b83ed7d499cefaca20
(cherry picked from commit 5dfb62b08891509308669e0e3e2a05412d2f7172)
Merged-In: I72fd6e1f310047df09b168b83ed7d499cefaca20
diff --git a/hostsidetests/hdmicec/src/android/hdmicec/cts/common/HdmiCecSystemStandbyTest.java b/hostsidetests/hdmicec/src/android/hdmicec/cts/common/HdmiCecSystemStandbyTest.java
index ccad335..82aea9a 100644
--- a/hostsidetests/hdmicec/src/android/hdmicec/cts/common/HdmiCecSystemStandbyTest.java
+++ b/hostsidetests/hdmicec/src/android/hdmicec/cts/common/HdmiCecSystemStandbyTest.java
@@ -45,9 +45,14 @@
 
     private static final String HDMI_CONTROL_DEVICE_AUTO_OFF =
             "hdmi_control_auto_device_off_enabled";
+    private static final String POWER_CONTROL_MODE =
+            "send_standby_on_sleep";
+    private static final String POWER_CONTROL_MODE_NONE =
+            "none";
 
     public List<LogicalAddress> mLogicalAddresses = new ArrayList<>();
-    public boolean wasOn;
+    public boolean previousDeviceAutoOff;
+    public String previousPowerControlMode;
 
     @Rule
     public RuleChain ruleChain =
@@ -59,14 +64,16 @@
     @Before
     public void initialTestSetup() throws Exception {
         defineLogicalAddressList();
-        wasOn = setHdmiControlDeviceAutoOff(false);
+        previousDeviceAutoOff = setHdmiControlDeviceAutoOff(false);
+        previousPowerControlMode = setPowerControlMode(POWER_CONTROL_MODE_NONE);
     }
 
     @After
     public void resetDutState() throws Exception {
         /* Wake up the device */
         getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP");
-        setHdmiControlDeviceAutoOff(wasOn);
+        setHdmiControlDeviceAutoOff(previousDeviceAutoOff);
+        setPowerControlMode(previousPowerControlMode);
     }
 
     /**
@@ -142,6 +149,12 @@
         return val.equals("1");
     }
 
+    private String setPowerControlMode(String valToSet) throws Exception {
+        String val = getSettingsValue(POWER_CONTROL_MODE);
+        setSettingsValue(POWER_CONTROL_MODE, valToSet);
+        return val;
+    }
+
     private void checkDeviceAsleepAfterStandbySent() throws Exception {
         ITestDevice device = getDevice();
         TimeUnit.SECONDS.sleep(5);