Deletes the broken and unused Bluetooth Power tests.

Bug: None
Test: UT
Change-Id: I4790eeba36e2a42e92de455398e7c0ebdda40323
diff --git a/acts/framework/acts/test_utils/bt/PowerBaseTest.py b/acts/framework/acts/test_utils/bt/PowerBaseTest.py
deleted file mode 100644
index b268e49..0000000
--- a/acts/framework/acts/test_utils/bt/PowerBaseTest.py
+++ /dev/null
@@ -1,594 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2016 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.
-"""
-This test script is the base class for Bluetooth power testing
-"""
-
-import json
-import os
-import statistics
-import time
-
-from acts import asserts
-from acts import utils
-from acts.controllers import monsoon
-from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
-from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check
-from acts.test_utils.tel.tel_test_utils import set_phone_screen_on
-from acts.test_utils.tel.tel_test_utils import toggle_airplane_mode_by_adb
-from acts.test_utils.wifi import wifi_test_utils as wutils
-from acts.utils import create_dir
-from acts.utils import force_airplane_mode
-from acts.utils import get_current_human_time
-from acts.utils import set_adaptive_brightness
-from acts.utils import set_ambient_display
-from acts.utils import set_auto_rotate
-from acts.utils import set_location_service
-from acts.utils import sync_device_time
-
-
-class PowerBaseTest(BluetoothBaseTest):
-    # Monsoon output Voltage in V
-    MONSOON_OUTPUT_VOLTAGE = 4.2
-    # Monsoon output max current in A
-    MONSOON_MAX_CURRENT = 7.8
-    # Power mesaurement sampling rate in Hz
-    POWER_SAMPLING_RATE = 10
-    SCREEN_TIME_OFF = 5
-    # Wait time for PMC to start in seconds
-    WAIT_TIME = 60
-    # Wait time for PMC to write AlarmTimes
-    ALARM_WAIT_TIME = 600
-
-    START_PMC_CMD = ("am start -n com.android.pmc/com.android.pmc."
-                     "PMCMainActivity")
-    PMC_VERBOSE_CMD = "setprop log.tag.PMC VERBOSE"
-
-    def setup_test(self):
-        self.timer_list = []
-        for a in self.android_devices:
-            a.ed.clear_all_events()
-            a.droid.setScreenTimeout(20)
-            self.ad.go_to_sleep()
-        return True
-
-    def disable_location_scanning(self):
-        """Utility to disable location services from scanning.
-
-        Unless the device is in airplane mode, even if WiFi is disabled
-        the DUT will still perform occasional scans. This will greatly impact
-        the power numbers.
-
-        Returns:
-            True if airplane mode is disabled and Bluetooth is enabled;
-            False otherwise.
-        """
-        self.ad.log.info("DUT phone Airplane is ON")
-        if not toggle_airplane_mode_by_adb(self.log, self.android_devices[0],
-                                           True):
-            self.log.error("FAILED to toggle Airplane on")
-            return False
-        self.ad.log.info("DUT phone Bluetooth is ON")
-        if not bluetooth_enabled_check(self.android_devices[0]):
-            self.log.error("FAILED to enable Bluetooth on")
-            return False
-        return True
-
-    def teardown_test(self):
-        return True
-
-    def setup_class(self):
-        # Not to call Base class setup_class()
-        # since it removes the bonded devices
-        for ad in self.android_devices:
-            sync_device_time(ad)
-        self.ad = self.android_devices[0]
-        self.mon = self.monsoons[0]
-        self.mon.set_voltage(self.MONSOON_OUTPUT_VOLTAGE)
-        self.mon.set_max_current(self.MONSOON_MAX_CURRENT)
-        # Monsoon phone
-        self.mon.attach_device(self.ad)
-        self.monsoon_log_path = os.path.join(self.log_path, "MonsoonLog")
-        create_dir(self.monsoon_log_path)
-
-        asserts.assert_true(
-            self.mon.usb("auto"),
-            "Failed to turn USB mode to auto on monsoon.")
-
-        asserts.assert_true(
-            force_airplane_mode(self.ad, True),
-            "Can not turn on airplane mode on: %s" % self.ad.serial)
-        asserts.assert_true(
-            bluetooth_enabled_check(self.ad),
-            "Failed to set Bluetooth state to enabled")
-        set_location_service(self.ad, False)
-        set_adaptive_brightness(self.ad, False)
-        set_ambient_display(self.ad, False)
-        self.ad.adb.shell("settings put system screen_brightness 0")
-        set_auto_rotate(self.ad, False)
-
-        wutils.wifi_toggle_state(self.ad, False)
-
-        # Start PMC app.
-        self.log.info("Start PMC app...")
-        self.ad.adb.shell(self.START_PMC_CMD)
-        self.ad.adb.shell(self.PMC_VERBOSE_CMD)
-
-        self.log.info("Check to see if PMC app started")
-        for _ in range(self.WAIT_TIME):
-            time.sleep(1)
-            try:
-                self.ad.adb.shell('ps -A | grep "S com.android.pmc"')
-                break
-            except adb.AdbError as e:
-                self.log.info("PMC app is NOT started yet")
-
-    def check_pmc_status(self, log_file, label, status_msg):
-        """Utility function to check if the log file contains certain label.
-
-        Args:
-            log_file: Log file name for PMC log file
-            label: the label to be looked for in the log file
-            status_msg: error message to be displayed when the expected label is not found
-
-        Returns:
-            A list of objects which contain start and end timestamps
-        """
-
-        # Check if PMC is ready
-        start_time = time.time()
-        result = False
-        while time.time() < start_time + self.WAIT_TIME:
-            out = self.ad.adb.shell("cat /mnt/sdcard/Download/" + log_file)
-            self.log.info("READ file: " + out)
-            if -1 != out.find(label):
-                result = True
-                break
-            time.sleep(1)
-
-        if not result:
-            self.log.error(status_msg)
-            return False
-        else:
-            return True
-
-    def check_pmc_timestamps(self, log_file):
-        """Utility function to get timestampes from a log file.
-
-        Args:
-            log_file: Log file name for PMC log file
-
-        Returns:
-            A list of objects which contain start and end timestamps
-        """
-
-        start_time = time.time()
-        alarm_written = False
-        while time.time() < start_time + self.ALARM_WAIT_TIME:
-            out = self.ad.adb.shell("cat /mnt/sdcard/Download/" + log_file)
-            self.log.info("READ file: " + out)
-            if -1 != out.find("READY"):
-                # AlarmTimes has not been written, wait
-                self.log.info("AlarmTimes has not been written, wait")
-            else:
-                alarm_written = True
-                break
-            time.sleep(1)
-
-        if alarm_written is False:
-            self.log.info("PMC never wrote alarm file")
-        json_data = json.loads(out)
-        if json_data["AlarmTimes"]:
-            return json_data["AlarmTimes"]
-
-    def save_logs_for_power_test(self,
-                                 monsoon_result,
-                                 time1,
-                                 time2,
-                                 single_value=True):
-        """Utility function to save power data into log file.
-
-        Steps:
-        1. Save power data into a file if being configed.
-        2. Create a bug report if being configured
-
-        Args:
-            monsoon_result: power data object
-            time1: A single value or a list
-                   For single value it is time duration (sec) for measure power
-                   For a list of values they are a list of start times
-            time2: A single value or a list
-                   For single value it is time duration (sec) which is not
-                       counted toward power measurement
-                   For a list of values they are a list of end times
-            single_value: True means time1 and time2 are single values
-                          Otherwise they are arrays of time values
-
-        Returns:
-            BtMonsoonData for Current Average and Std Deviation
-        """
-        current_time = get_current_human_time()
-        file_name = "{}_{}".format(self.current_test_name, current_time)
-
-        if single_value:
-            bt_monsoon_result = BtMonsoonData(monsoon_result, time1, time2,
-                                              self.log)
-        else:
-            bt_monsoon_result = BtMonsoonDataWithPmcTimes(
-                monsoon_result, time1, time2, self.log)
-
-        bt_monsoon_result.save_to_text_file(bt_monsoon_result,
-                                            os.path.join(
-                                                self.monsoon_log_path,
-                                                file_name))
-
-        self.ad.take_bug_report(self.current_test_name, current_time)
-        return (bt_monsoon_result.average_cur, bt_monsoon_result.stdev)
-
-    def check_test_pass(self, average_current, watermark_value):
-        """Compare watermark numbers for pass/fail criteria.
-
-        b/67960377 = for BT codec runs
-        b/67959834 = for BLE scan+GATT runs
-
-        Args:
-            average_current: the numbers calculated from Monsoon box
-            watermark_value: the reference numbers from config file
-
-        Returns:
-            True if the current is within 10%; False otherwise
-
-        """
-        watermark_value = float(watermark_value)
-        variance_plus = watermark_value + (watermark_value * 0.1)
-        variance_minus = watermark_value - (watermark_value * 0.1)
-        if (average_current > variance_plus) or (average_current <
-                                                 variance_minus):
-            self.log.error('==> FAILED criteria from check_test_pass method')
-            return False
-        self.log.info('==> PASS criteria from check_test_pass method')
-        return True
-
-
-class BtMonsoonData(monsoon.MonsoonData):
-    """A class for encapsulating power measurement data from monsoon.
-       It implements the power averaging and standard deviation for
-       mulitple cycles of the power data. Each cycle is defined by a constant
-       measure time and a constant idle time.  Measure time is the time
-       duration when power data are included for calculation.
-       Idle time is the time when power data should be removed from calculation
-
-    """
-    # Accuracy for current and power data
-    ACCURACY = 4
-    THOUSAND = 1000
-
-    def __init__(self, monsoon_data, measure_time, idle_time, log):
-        """Instantiates a MonsoonData object.
-
-        Args:
-            monsoon_data: A list of current values in Amp (float).
-            measure_time: Time for measuring power.
-            idle_time: Time for not measuring power.
-            log: log object to log info messages.
-        """
-
-        super(BtMonsoonData, self).__init__(
-            monsoon_data.data_points, monsoon_data.timestamps, monsoon_data.hz,
-            monsoon_data.voltage, monsoon_data.offset)
-
-        # Change timestamp to use small granularity of time
-        # Monsoon libray uses the seconds as the time unit
-        # Using sample rate to calculate timestamps between the seconds
-        t0 = self.timestamps[0]
-        dt = 1.0 / monsoon_data.hz
-        index = 0
-
-        for ind, t in enumerate(self.timestamps):
-            if t == t0:
-                index = index + 1
-                self.timestamps[ind] = t + dt * index
-            else:
-                t0 = t
-                index = 1
-
-        self.measure_time = measure_time
-        self.idle_time = idle_time
-        self.log = log
-        self.average_cur = None
-        self.stdev = None
-
-    def _calculate_average_current_n_std_dev(self):
-        """Utility function to calculate average current and standard deviation
-           in the unit of mA.
-
-        Returns:
-            A tuple of average current and std dev as float
-        """
-        if self.idle_time == 0:
-            # if idle time is 0 use Monsoon calculation
-            # in this case standard deviation is 0
-            return round(self.average_current, self.ACCURACY), 0
-
-        self.log.info(
-            "Measure time: {} Idle time: {} Total Data Points: {}".format(
-                self.measure_time, self.idle_time, len(self.data_points)))
-
-        # The base time to be used to calculate the relative time
-        base_time = self.timestamps[0]
-
-        # Index for measure and idle cycle index
-        measure_cycle_index = 0
-        # Measure end time of measure cycle
-        measure_end_time = self.measure_time
-        # Idle end time of measure cycle
-        idle_end_time = self.measure_time + self.idle_time
-        # Sum of current data points for a measure cycle
-        current_sum = 0
-        # Number of current data points for a measure cycle
-        data_point_count = 0
-        average_for_a_cycle = []
-        # Total number of measure data point
-        total_measured_data_point_count = 0
-
-        # Flag to indicate whether the average is calculated for this cycle
-        # For 1 second there are multiple data points
-        # so time comparison will yield to multiple cases
-        done_average = False
-
-        for t, d in zip(self.timestamps, self.data_points):
-            relative_timepoint = t - base_time
-            # When time exceeds 1 cycle of measurement update 2 end times
-            if relative_timepoint > idle_end_time:
-                measure_cycle_index += 1
-                measure_end_time = measure_cycle_index * (
-                    self.measure_time + self.idle_time) + self.measure_time
-                idle_end_time = measure_end_time + self.idle_time
-                done_average = False
-
-            # Within measure time sum the current
-            if relative_timepoint <= measure_end_time:
-                current_sum += d
-                data_point_count += 1
-            elif not done_average:
-                # Calculate the average current for this cycle
-                average_for_a_cycle.append(current_sum / data_point_count)
-                total_measured_data_point_count += data_point_count
-                current_sum = 0
-                data_point_count = 0
-                done_average = True
-
-        # Calculate the average current and convert it into mA
-        current_avg = round(
-            statistics.mean(average_for_a_cycle) * self.THOUSAND,
-            self.ACCURACY)
-        # Calculate the min and max current and convert it into mA
-        current_min = round(
-            min(average_for_a_cycle) * self.THOUSAND, self.ACCURACY)
-        current_max = round(
-            max(average_for_a_cycle) * self.THOUSAND, self.ACCURACY)
-
-        # Calculate the standard deviation and convert it into mA
-        stdev = round(
-            statistics.stdev(average_for_a_cycle) * self.THOUSAND,
-            self.ACCURACY)
-        self.log.info("Total Counted Data Points: {}".format(
-            total_measured_data_point_count))
-        self.log.info("Average Current: {} mA ".format(current_avg))
-        self.log.info("Standard Deviation: {} mA".format(stdev))
-        self.log.info("Min Current: {} mA ".format(current_min))
-        self.log.info("Max Current: {} mA".format(current_max))
-
-        return current_avg, stdev
-
-    def _format_header(self):
-        """Utility function to write the header info to the file.
-           The data is formated as tab delimited for spreadsheets.
-
-        Returns:
-            None
-        """
-        strs = [""]
-        if self.tag:
-            strs.append("\t\t" + self.tag)
-        else:
-            strs.append("\t\tMonsoon Measurement Data")
-        average_cur, stdev = self._calculate_average_current_n_std_dev()
-        total_power = round(average_cur * self.voltage, self.ACCURACY)
-
-        self.average_cur = average_cur
-        self.stdev = stdev
-
-        strs.append("\t\tAverage Current: {} mA.".format(average_cur))
-        strs.append("\t\tSTD DEV Current: {} mA.".format(stdev))
-        strs.append("\t\tVoltage: {} V.".format(self.voltage))
-        strs.append("\t\tTotal Power: {} mW.".format(total_power))
-        strs.append(
-            ("\t\t{} samples taken at {}Hz, with an offset of {} samples."
-             ).format(len(self.data_points), self.hz, self.offset))
-        return "\n".join(strs)
-
-    def _format_data_point(self):
-        """Utility function to format the data into a string.
-           The data is formated as tab delimited for spreadsheets.
-
-        Returns:
-            Average current as float
-        """
-        strs = []
-        strs.append(self._format_header())
-        strs.append("\t\tTime\tAmp")
-        # Get the relative time
-        start_time = self.timestamps[0]
-
-        for t, d in zip(self.timestamps, self.data_points):
-            strs.append("{}\t{}".format(
-                round((t - start_time), 1), round(d, self.ACCURACY)))
-
-        return "\n".join(strs)
-
-    @staticmethod
-    def save_to_text_file(bt_monsoon_data, file_path):
-        """Save BtMonsoonData object to a text file.
-           The data is formated as tab delimited for spreadsheets.
-
-        Args:
-            bt_monsoon_data: A BtMonsoonData object to write to a text
-                file.
-            file_path: The full path of the file to save to, including the file
-                name.
-        """
-        if not bt_monsoon_data:
-            self.log.error("Attempting to write empty Monsoon data to "
-                           "file, abort")
-            return
-
-        utils.create_dir(os.path.dirname(file_path))
-        try:
-            with open(file_path, 'w') as f:
-                f.write(bt_monsoon_data._format_data_point())
-                f.write("\t\t" + bt_monsoon_data.delimiter)
-        except IOError:
-            self.log.error("Fail to write power data into file")
-
-
-class BtMonsoonDataWithPmcTimes(BtMonsoonData):
-    """A class for encapsulating power measurement data from monsoon.
-       It implements the power averaging and standard deviation for
-       mulitple cycles of the power data. Each cycle is defined by a start time
-       and an end time.  The start time and the end time are the actual time
-       triggered by Android alarm in PMC.
-
-    """
-
-    def __init__(self, bt_monsoon_data, start_times, end_times, log):
-        """Instantiates a MonsoonData object.
-
-        Args:
-            bt_monsoon_data: A list of current values in Amp (float).
-            start_times: A list of epoch timestamps (int).
-            end_times: A list of epoch timestamps (int).
-            log: log object to log info messages.
-        """
-        super(BtMonsoonDataWithPmcTimes, self).__init__(
-            bt_monsoon_data, 0, 0, log)
-        self.start_times = start_times
-        self.end_times = end_times
-
-    def _calculate_average_current_n_std_dev(self):
-        """Utility function to calculate average current and standard deviation
-           in the unit of mA.
-
-        Returns:
-            A tuple of average current and std dev as float
-        """
-        if len(self.start_times) == 0 or len(self.end_times) == 0:
-            return 0, 0
-
-        self.log.info(
-            "Start times: {} End times: {} Total Data Points: {}".format(
-                len(self.start_times),
-                len(self.end_times), len(self.data_points)))
-
-        # Index for measure and idle cycle index
-        measure_cycle_index = 0
-
-        # Measure end time of measure cycle
-        measure_end_time = self.end_times[0]
-        # Idle end time of measure cycle
-        idle_end_time = self.start_times[1]
-        # Sum of current data points for a measure cycle
-        current_sum = 0
-        # Number of current data points for a measure cycle
-        data_point_count = 0
-        average_for_a_cycle = []
-        # Total number of measure data point
-        total_measured_data_point_count = 0
-
-        # Flag to indicate whether the average is calculated for this cycle
-        # For 1 second there are multiple data points
-        # so time comparison will yield to multiple cases
-        done_average = False
-        done_all = False
-
-        for t, d in zip(self.timestamps, self.data_points):
-
-            # Ignore the data before the first start time
-            if t < self.start_times[0]:
-                continue
-
-            # When time exceeds 1 cycle of measurement update 2 end times
-            if t >= idle_end_time:
-                measure_cycle_index += 1
-                if measure_cycle_index > (len(self.start_times) - 1):
-                    break
-
-                measure_end_time = self.end_times[measure_cycle_index]
-
-                if measure_cycle_index < (len(self.start_times) - 2):
-                    idle_end_time = self.start_times[measure_cycle_index + 1]
-                else:
-                    idle_end_time = measure_end_time + self.THOUSAND
-                    done_all = True
-
-                done_average = False
-
-            # Within measure time sum the current
-            if t <= measure_end_time:
-                current_sum += d
-                data_point_count += 1
-            elif not done_average:
-                # Calculate the average current for this cycle
-                if data_point_count > 0:
-                    average_for_a_cycle.append(current_sum / data_point_count)
-                    total_measured_data_point_count += data_point_count
-
-                if done_all:
-                    break
-                current_sum = 0
-                data_point_count = 0
-                done_average = True
-
-        if not done_average and data_point_count > 0:
-            # Calculate the average current for this cycle
-            average_for_a_cycle.append(current_sum / data_point_count)
-            total_measured_data_point_count += data_point_count
-
-        self.log.info(
-            "Total Number of Cycles: {}".format(len(average_for_a_cycle)))
-
-        # Calculate the average current and convert it into mA
-        current_avg = round(
-            statistics.mean(average_for_a_cycle) * self.THOUSAND,
-            self.ACCURACY)
-        # Calculate the min and max current and convert it into mA
-        current_min = round(
-            min(average_for_a_cycle) * self.THOUSAND, self.ACCURACY)
-        current_max = round(
-            max(average_for_a_cycle) * self.THOUSAND, self.ACCURACY)
-
-        # Calculate the standard deviation and convert it into mA
-        stdev = round(
-            statistics.stdev(average_for_a_cycle) * self.THOUSAND,
-            self.ACCURACY)
-        self.log.info("Total Counted Data Points: {}".format(
-            total_measured_data_point_count))
-        self.log.info("Average Current: {} mA ".format(current_avg))
-        self.log.info("Standard Deviation: {} mA".format(stdev))
-        self.log.info("Min Current: {} mA ".format(current_min))
-        self.log.info("Max Current: {} mA".format(current_max))
-
-        return current_avg, stdev
diff --git a/acts/framework/tests/acts_import_unit_test.py b/acts/framework/tests/acts_import_unit_test.py
index 12e059f..38df80e 100755
--- a/acts/framework/tests/acts_import_unit_test.py
+++ b/acts/framework/tests/acts_import_unit_test.py
@@ -48,12 +48,6 @@
 PY_FILE_REGEX = re.compile('.+\.py$')
 
 BLACKLIST = [
-    # TODO(markdr): Remove these after BT team evaluates these tests.
-    'acts/test_utils/bt/PowerBaseTest.py',
-    'tests/google/ble/power/GattPowerTest.py',
-    'tests/google/bt/power/A2dpPowerTest.py',
-    'tests/google/ble/power/BleScanPowerTest.py',
-
     'acts/controllers/rohdeschwarz_lib/contest.py',
     'acts/controllers/native.py',
     'acts/controllers/native_android_device.py',
diff --git a/acts/tests/google/ble/power/BleScanPowerTest.py b/acts/tests/google/ble/power/BleScanPowerTest.py
deleted file mode 100644
index af81dab..0000000
--- a/acts/tests/google/ble/power/BleScanPowerTest.py
+++ /dev/null
@@ -1,297 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2016 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.
-"""
-This test script exercises power test scenarios for different scan modes.
-This test script was designed with this setup in mind:
-Shield box one: Android Device and Monsoon tool box
-"""
-
-import json
-import os
-import sys
-
-from acts.test_decorators import test_tracker_info
-from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
-from acts.test_utils.bt.bt_constants import ble_scan_settings_modes
-from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check
-from acts.test_utils.bt.bt_test_utils import disable_bluetooth
-from acts.test_utils.bt.bt_test_utils import generate_ble_scan_objects
-from acts.test_utils.bt.PowerBaseTest import PowerBaseTest
-
-
-class BleScanPowerTest(PowerBaseTest):
-    # Repetitions for scan and idle
-    REPETITIONS_40 = 5
-    REPETITIONS_360 = 40
-
-    # Power measurement start time in seconds
-    SCAN_START_TIME = 60
-    # BLE scanning time in seconds
-    SCAN_TIME_60 = 60
-    SCAN_TIME_5 = 5
-    # BLE no scanning time in seconds
-    IDLE_TIME_30 = 30
-    IDLE_TIME_5 = 5
-
-    PMC_BASE_CMD = ("am broadcast -a com.android.pmc.BLESCAN --es ScanMode ")
-    # Log file name
-    LOG_FILE = "BLEPOWER.log"
-
-    def setup_class(self):
-        super(BleScanPowerTest, self).setup_class()
-        # Get power test device serial number
-        power_test_device_serial = self.user_params["PowerTestDevice"]
-        # If there are multiple devices in the shield box turn off
-        # all of them except the one for the power testing
-        if len(self.android_devices) > 1:
-            for ad in self.android_devices:
-                if ad.serial != power_test_device_serial[0]:
-                    self.ad.log.info("Disable BT for %s != %s", ad.serial,
-                                     power_test_device_serial[0])
-                    disable_bluetooth(ad.droid)
-
-    def _measure_power_for_scan_n_log_data(self, scan_mode, scan_time,
-                                           idle_time, repetitions, test_case):
-        """utility function for power test with BLE scan.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it start the second alarm to stop scan
-        5. Repeat the scan/idle cycle for the number of repetitions
-        6. Save the power usage data into log file
-
-        Args:
-            scan_mode: Scan mode
-            scan_time: Time duration for scanning
-            idle_time: Time duration for idle after scanning
-            repetitions:  The number of cycles of scanning/idle
-
-        Returns:
-            True if the average current is within the allowed tolerance;
-            False otherwise.
-        """
-
-        if not self.disable_location_scanning():
-            return False
-
-        first_part_msg = "%s%s --es StartTime %d --es ScanTime %d" % (
-            self.PMC_BASE_CMD, scan_mode, self.SCAN_START_TIME, scan_time)
-        msg = "%s --es NoScanTime %d --es Repetitions %d" % (first_part_msg,
-                                                             idle_time,
-                                                             repetitions)
-
-        self.ad.log.info("Send broadcast message: %s", msg)
-        self.ad.adb.shell(msg)
-
-        # Check if PMC is ready
-        if not self.check_pmc_status(self.LOG_FILE, "READY",
-                                     "PMC is not ready"):
-            return
-
-        # Start the power measurement
-        sample_time = (scan_time + idle_time) * repetitions
-        result = self.mon.measure_power(self.POWER_SAMPLING_RATE, sample_time,
-                               self.current_test_name, self.SCAN_START_TIME)
-
-        self.ad.log.info("Monsoon start_time: {}".format(result.timestamps[0]))
-
-        start_times = []
-        end_times = []
-        json_data = self.check_pmc_timestamps(self.LOG_FILE)
-        for timestamp in json_data:
-            start_times.append(timestamp["StartTime"])
-            end_times.append(timestamp["EndTime"])
-
-        self.ad.log.info("Number of test cycles: {}".format(len(start_times)))
-
-        (current_avg, stdev) = self.save_logs_for_power_test(
-            result, start_times, end_times, False)
-
-        # perform watermark comparison numbers
-        self.log.info("==> CURRENT AVG from PMC Monsoon app: %s" % current_avg)
-        self.log.info(
-            "==> WATERMARK from config file: %s" % self.user_params[test_case])
-        return self.check_test_pass(current_avg, self.user_params[test_case])
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='1e8c793f-897d-4160-8ebf-fd1addcd9c71')
-    def test_power_for_scan_w_low_latency(self):
-        """Test power usage when scan with low latency.
-
-        Tests power usage when the device scans with low latency mode
-        for 60 seconds and then idle for 30 seconds, repeat for 60 minutes
-        where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it start the second alarm to stop scan
-        5. Repeat the cycle for 60 minutes
-        6. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['low_latency'], self.SCAN_TIME_60,
-            self.IDLE_TIME_30, self.REPETITIONS_40, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='83e37081-9f00-4b5f-ba1c-92136047fa83')
-    def test_power_for_scan_w_balanced(self):
-        """Test power usage when scan with balanced mode.
-
-        Tests power usage when the device scans with balanced mode
-        for 60 seconds and then idle for 30 seconds, repeat for 60 minutes
-        where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it start the second alarm to stop scan
-        5. Repeat the cycle for 60 minutes
-        6. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['balanced'], self.SCAN_TIME_60,
-            self.IDLE_TIME_30, self.REPETITIONS_40, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='cbf16414-3468-4f60-8a62-2a88556d7a87')
-    def test_power_for_scan_w_low_power(self):
-        """Test power usage when scan with low power.
-
-        Tests power usage when the device scans with low power mode
-        for 60 seconds and then idle for 30 seconds, repeat for 60 minutes
-        where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it start the second alarm to stop scan
-        5. Repeat the cycle for 60 minutes
-        6. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['low_power'], self.SCAN_TIME_60,
-            self.IDLE_TIME_30, self.REPETITIONS_40, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='0b1eaedb-4385-48ba-a175-7db79360aed8')
-    def test_power_for_intervaled_scans_w_balanced(self):
-        """Test power usage when intervaled scans with balanced mode
-
-        Tests power usage when the device perform multiple intervaled scans with
-        balanced mode for 5 seconds each where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it starts the second alarm to stop scan
-        5. After second alarm triggered it starts the third alarm to start scan
-        6. Repeat the alarms until 360 scans are done
-        7. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['balanced'], self.SCAN_TIME_5,
-            self.IDLE_TIME_5, self.REPETITIONS_360, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='90e6b341-9b11-4740-8ec1-dc605db93ec9')
-    def test_power_for_intervaled_scans_w_low_latency(self):
-        """Test power usage when intervaled scans with low latency mode
-
-        Tests power usage when the device perform multiple intervaled scans with
-        low latency mode for 5 seconds each where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it starts the second alarm to stop scan
-        5. After second alarm triggered it starts the third alarm to start scan
-        6. Repeat the alarms until 360 scans are done
-        7. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['low_latency'], self.SCAN_TIME_5,
-            self.IDLE_TIME_5, self.REPETITIONS_360, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='cbf16414-3468-4f60-8a62-2a88556d7a87')
-    def test_power_for_intervaled_scans_w_low_power(self):
-        """Test power usage when intervaled scans with low power mode
-
-        Tests power usage when the device perform multiple intervaled scans with
-        low power mode for 5 seconds each where there are no advertisements.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC start first alarm to start scan
-        4. After first alarm triggered it starts the second alarm to stop scan
-        5. After second alarm triggered it starts the third alarm to start scan
-        6. Repeat the alarms until 360 scans are done
-        7. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, Scanning, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_scan_n_log_data(
-            ble_scan_settings_modes['low_power'], self.SCAN_TIME_5,
-            self.IDLE_TIME_5, self.REPETITIONS_360, current_test_case)
diff --git a/acts/tests/google/ble/power/GattPowerTest.py b/acts/tests/google/ble/power/GattPowerTest.py
deleted file mode 100644
index 2817d74..0000000
--- a/acts/tests/google/ble/power/GattPowerTest.py
+++ /dev/null
@@ -1,202 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2016 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.
-"""
-This test script exercises power test scenarios for GATT writing.
-This test script was designed with this setup in mind:
-Shield box one: Two Android Devices and Monsoon tool box
-"""
-
-import json
-import os
-import sys
-
-from acts.test_decorators import test_tracker_info
-from acts.test_utils.bt.BleEnum import ScanSettingsScanMode
-from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
-from acts.test_utils.bt.PowerBaseTest import PowerBaseTest
-from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check
-from acts.test_utils.bt.bt_test_utils import generate_ble_scan_objects
-from acts.utils import get_current_human_time
-from acts.utils import sync_device_time
-
-
-class GattPowerTest(PowerBaseTest):
-    """Class for Gatt Power Test"""
-    # Time to start GATT write
-    START_TIME = 30
-    # Repetitions
-    REPETITIONS_40 = 7
-    REPETITIONS_1 = 1
-    # Time for GATT writing
-    WRITE_TIME_60 = 60
-    WRITE_TIME_3600 = 600
-    # Time for idle
-    IDLE_TIME_30 = 30
-    IDLE_TIME_0 = 0
-    # Base commands for PMC
-    PMC_GATT_CMD = ("am broadcast -a com.android.pmc.GATT ")
-    GATT_SERVER_MSG = "%s--es GattServer 1" % (PMC_GATT_CMD)
-
-    def setup_class(self):
-        super(GattPowerTest, self).setup_class()
-
-        self.cen_ad = self.android_devices[0]
-        self.per_ad = self.android_devices[1]
-
-        if not bluetooth_enabled_check(self.per_ad):
-            self.log.error("Failed to turn on Bluetooth on peripheral")
-
-        # Start PMC app for peripheral here
-        # since base class has started PMC for central device
-        self.per_ad.adb.shell(PowerBaseTest.START_PMC_CMD)
-        self.per_ad.adb.shell(self.PMC_VERBOSE_CMD)
-
-    def _measure_power_for_gatt_n_log_data(self, write_time, idle_time,
-                                           repetitions, test_case):
-        """Utility function for power test with GATT write.
-
-        Steps:
-        1. Prepare adb shell command for GATT server
-        2. Send the adb shell command to PMC to startup GATT Server
-        3. Prepare adb shell command for GATT Client
-        4. Send the adb shell command to PMC to startup GATT Client
-        5. PMC will start first alarm on GATT Client to start
-           GATT write continuousely for "write_time" seconds
-        6. After finishing writing for write_time it will stop for
-           for "idle_time" seconds
-        7  Repeat the write/idle cycle for "repetitions" times
-        8. Save the power usage data into log file
-
-        Args:
-            write_time: time(sec) duration for writing GATT characteristic
-            idle_time: time(sec) of idle (not write)
-            repetitions: number of repetitions of writing cycles
-
-        Returns:
-            True if the average current is within the allowed tolerance;
-            False otherwise.
-        """
-
-        if not self.disable_location_scanning():
-            return False
-
-        # Verify Bluetooth is enabled on the companion phone.
-        if not bluetooth_enabled_check(self.android_devices[1]):
-            self.log.error("FAILED to enable Bluetooth on companion phone")
-            return False
-
-        # Send message to Gatt Server
-        self.per_ad.log.info("Send broadcast message to GATT Server: %s",
-                             self.GATT_SERVER_MSG)
-        self.per_ad.adb.shell(self.GATT_SERVER_MSG)
-
-        # Send message to Gatt Client
-        first_part_msg = "%s--es StartTime %d --es WriteTime %d" % (
-            self.PMC_GATT_CMD, self.START_TIME, write_time)
-        clientmsg = "%s --es IdleTime %d --es Repetitions %d" % (
-            first_part_msg, idle_time, repetitions)
-        self.cen_ad.log.info("Send broadcast message to GATT Client: %s",
-                             clientmsg)
-        self.cen_ad.adb.shell(clientmsg)
-
-        sample_time = (write_time + idle_time) * repetitions
-        # Start the power measurement
-        result = self.mon.measure_power(self.POWER_SAMPLING_RATE, sample_time,
-                               self.current_test_name, self.START_TIME)
-
-        # Calculate average and save power data into a file
-        (current_avg, stdev) = self.save_logs_for_power_test(
-            result, write_time, idle_time)
-        # Take bug report for peripheral device
-        current_time = get_current_human_time()
-        self.per_ad.take_bug_report(self.current_test_name, current_time)
-
-        # perform watermark comparison numbers
-        self.log.info("==> CURRENT AVG from PMC Monsoon app: %s" % current_avg)
-        self.log.info(
-            "==> WATERMARK from config file: %s" % self.user_params[test_case])
-        return self.check_test_pass(current_avg, self.user_params[test_case])
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='f14cc28b-54f2-4a87-9fa9-68f39bf96701')
-    def test_power_for_60_sec_n_30_sec_idle_gatt_write(self):
-        """Test power usage when do 60 sec GATT write & 30 sec idle
-
-        Tests power usage when the test device do 60 sec GATT write
-        and 30 sec idle with max MTU bytes after being connected.
-        After each write GATT server will send a response
-        back to GATT client so GATT client can do another write.
-
-        Steps:
-        1. Prepare adb shell command for GATT server
-        2. Send the adb shell command to PMC to startup GATT Server
-        3. Prepare adb shell command for GATT Client
-        4. Send the adb shell command to PMC to startup GATT Client
-        5. PMC will start first alarm on GATT Client
-        6. Start power measurement
-        7. Alarm will be triggered to start GATT write for 60 second
-        8. Then it will be idle for 30 seconds
-        9. Reconnect after idle time
-        10. Repeat the cycles for 60 minutes
-        11. End power measurement
-        12. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, GATT, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_gatt_n_log_data(
-            self.WRITE_TIME_60, self.IDLE_TIME_30, self.REPETITIONS_40,
-            current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='41ca217e-161b-4899-a5b7-2d59d8dc7973')
-    def test_power_for_60_min_non_stop_gatt_write(self):
-        """Test power usage when do a single GATT write.
-
-        Tests power usage when the test device do 60 minutes of GATT write with
-        max MTU bytes after being connected. After each write GATT server will
-        send a response back to GATT client so GATT client can do another write.
-
-        Steps:
-        1. Prepare adb shell command for GATT server
-        2. Send the adb shell command to PMC to startup GATT Server
-        3. Prepare adb shell command for GATT Client
-        4. Send the adb shell command to PMC to startup GATT Client
-        5. PMC will start first alarm on GATT Client to start GATT write
-        6. Start power measurement
-        7. GATT server gets the write request after GATT Client sends a write
-        8. GATT server sends a response back to GATT Client
-        9. After GATT Client receive the response from GATT Server
-           it will check if time reaches 60 minutes.
-           if not it will write another characteristic
-           otherwise it will stop writing
-        10. Stop power measurement
-        11. Save the power usage data into log file
-
-        Expected Result:
-        power consumption results
-
-        TAGS: LE, GATT, Power
-        Priority: 3
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._measure_power_for_gatt_n_log_data(
-            self.WRITE_TIME_3600, self.IDLE_TIME_0, self.REPETITIONS_1,
-            current_test_case)
diff --git a/acts/tests/google/bt/power/A2dpPowerTest.py b/acts/tests/google/bt/power/A2dpPowerTest.py
deleted file mode 100644
index 561c503..0000000
--- a/acts/tests/google/bt/power/A2dpPowerTest.py
+++ /dev/null
@@ -1,1437 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2017 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.
-"""
-This test script exercises power test scenarios for A2DP streaming with
-   5 codec types, 4 sample rate values, 3 bits per sample values,
-   2 music file types and 3 LDAC playback quality values.
-
-This test script was designed with this setup in mind:
-Shield box one: Android Device, headset and Monsoon tool box
-"""
-
-import json
-import os
-import time
-import sys
-
-from acts import logger
-from acts.controllers import monsoon
-from acts.keys import Config
-from acts.test_decorators import test_tracker_info
-from acts.test_utils.bt.bt_constants import ble_scan_settings_modes
-from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
-from acts.test_utils.bt.PowerBaseTest import PowerBaseTest
-from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check
-from acts.test_utils.bt.bt_test_utils import disable_bluetooth
-from acts.test_utils.bt.bt_test_utils import reset_bluetooth
-from acts.controllers.relay_lib.sony_xb2_speaker import SonyXB2Speaker
-
-
-def push_file_to_device(ad, file_path, device_path, config_path):
-    """Utility functions to push a file to android device
-
-    Args:
-        ad: Device for file push
-        file_path: File path for the file to be pushed to the device
-        device_path: File path on the device as destination
-        config_path: File path to the config file.  This is only used when
-                     a relative path is passed via the ACTS config.
-
-    Returns:
-        True if successful, False if unsuccessful.
-    """
-
-    if not os.path.isfile(file_path):
-        file_path = os.path.join(config_path, file_path)
-        if not os.path.isfile(file_path):
-            return False
-    ad.adb.push("{} {}".format(file_path, device_path))
-    return True
-
-
-class A2dpPowerTest(PowerBaseTest):
-    # Time for measuring the power when playing music in seconds
-    MEASURE_TIME = 400
-    # Delay time in seconds between starting playing and measuring power
-    DELAY_MEASURE_TIME = 300
-    # Extra time to stop Music in PMC after power measurement is stopped
-    DELAY_STOP_TIME = 10
-    # Log file name
-    LOG_FILE = "A2DPPOWER.log"
-    # Wait time in seconds to check if Bluetooth device is connected
-    WAIT_TIME = 10
-    # Base command for PMC
-    PMC_BASE_CMD = ("am broadcast -a com.android.pmc.A2DP")
-    # Codec Types
-    CODEC_SBC = 0
-    CODEC_AAC = 1
-    CODEC_APTX = 2
-    CODEC_APTX_HD = 3
-    CODEC_LDAC = 4
-
-    # Music sample rates
-    SAMPLE_RATE_44100 = 0x1 << 0
-    SAMPLE_RATE_48000 = 0x1 << 1
-    SAMPLE_RATE_88200 = 0x1 << 2
-    SAMPLE_RATE_96000 = 0x1 << 3
-
-    # Bits per sample
-    BITS_PER_SAMPLE_16 = 0x1 << 0
-    BITS_PER_SAMPLE_24 = 0x1 << 1
-    BITS_PER_SAMPLE_32 = 0x1 << 2
-
-    # LDAC playback quality:
-    # For High Quality
-    LDACBT_EQMID_HQ = 1000
-    # For Standard Quality
-    LDACBT_EQMID_SQ = 1001
-    # For Mobile Use Quality
-    LDACBT_EQMID_MQ = 1002
-    # LDAC playback quality constant for the codecs other than LDAC
-    LDACBT_NONE = 0
-
-    def _pair_by_config(self):
-        bt_device_address = self.user_params["bt_device_address"]
-        # Push the bt_config.conf file to Android device
-        # if it is specified in config file
-        # so it can pair and connect automatically.
-        # Because of bug 34933072 AK XB10 and Sony XB2 may not be able to
-        # reconnect after flashing a new build and pushing bt_config
-        # so just manually pair/connect before running the tests
-        bt_conf_path_dut = "/data/misc/bluedroid/bt_config.conf"
-        bt_config_path = None
-        try:
-            bt_config_path = self.user_params["bt_config"]
-        except KeyError:
-            self.log.info("No bt_config is specified in config file")
-
-        if bt_config_path != None:
-            self.log.info(
-                "Push bt_config file so it will connect automatically")
-            if not push_file_to_device(
-                    self.ad, bt_config_path, bt_conf_path_dut,
-                    self.user_params[Config.key_config_path.value]):
-                self.log.error(
-                    "Unable to push file {} to DUT.".format(bt_config_path))
-
-            self.log.info("Reboot")
-            self.ad.reboot()
-
-        if not bluetooth_enabled_check(self.ad):
-            self.log.error("Failed to enable Bluetooth on DUT")
-            return False
-
-        # Verify Bluetooth device is connected
-        self.log.info("Waiting up to {} seconds for device to reconnect.".
-                      format(self.WAIT_TIME))
-        start_time = time.time()
-        result = False
-        while time.time() < start_time + self.WAIT_TIME:
-            connected_devices = self.ad.droid.bluetoothGetConnectedDevices()
-            if len(connected_devices) > 0:
-                result = True
-                break
-
-            try:
-                self.ad.droid.bluetoothConnectBonded(
-                    self.user_params["bt_device_address"])
-            except Exception as err:
-                self.log.error(
-                    "Failed to connect bonded device. Err: {}".format(err))
-
-        if result is False:
-            self.log.error("No headset is connected")
-            return False
-        return True
-
-    def _discover_and_pair(self):
-        self.ad.droid.bluetoothStartDiscovery()
-        time.sleep(5)
-        self.ad.droid.bluetoothCancelDiscovery()
-        for device in self.ad.droid.bluetoothGetDiscoveredDevices():
-            if device['address'] == self.a2dp_speaker.mac_address:
-                self.ad.droid.bluetoothDiscoverAndBond(
-                    self.a2dp_speaker.mac_address)
-                end_time = time.time() + 20
-                self.log.info("Verifying devices are bonded")
-                while (time.time() < end_time):
-                    bonded_devices = self.ad.droid.bluetoothGetBondedDevices()
-                    for d in bonded_devices:
-                        if d['address'] == self.a2dp_speaker.mac_address:
-                            self.log.info("Successfully bonded to device.")
-                            self.log.info(
-                                "Bonded devices:\n{}".format(bonded_devices))
-                            return True
-        return False
-
-    def setup_class(self):
-        self.ad = self.android_devices[0]
-        self.ad.droid.bluetoothFactoryReset()
-        # Factory reset requires a short delay to take effect
-        time.sleep(3)
-
-        self.ad.log.info("Making sure BT phone is enabled here during setup")
-        if not bluetooth_enabled_check(self.ad):
-            self.log.error("Failed to turn Bluetooth on DUT")
-        # Give a breathing time of short delay to take effect
-        time.sleep(3)
-
-        reset_bluetooth([self.ad])
-
-        # Determine if we have a relay-based device
-        self.a2dp_speaker = None
-        if self.relay_devices[0]:
-            self.a2dp_speaker = self.relay_devices[0]
-            self.a2dp_speaker.setup()
-            # The device may be on, enter pairing mode.
-            self.a2dp_speaker.enter_pairing_mode()
-            if self._discover_and_pair() is False:
-                # The device is probably off, turn it on
-                self.a2dp_speaker.power_on()
-                time.sleep(0.25)
-                self.a2dp_speaker.enter_pairing_mode()
-                if self._discover_and_pair() is False:
-                    self.log.info("Unable to pair to relay based device.")
-                    return False
-            if len(self.ad.droid.bluetoothGetConnectedDevices()) == 0:
-                self.log.info("Not connected to relay based device.")
-                return False
-        else:
-            # No relay-based device used config
-            if self._pair_by_config() is False:
-                return False
-
-        # Add music files to the Android device
-        music_path_dut = "/sdcard/Music/"
-        self.cd_quality_music_file = self.user_params["cd_quality_music_file"][
-            0]
-        self.log.info(
-            "Push CD quality music file {}".format(self.cd_quality_music_file))
-        if not push_file_to_device(
-                self.ad, self.cd_quality_music_file, music_path_dut,
-                self.user_params[Config.key_config_path.value]):
-            self.log.error("Unable to push file {} to DUT.".format(
-                self.cd_quality_music_file))
-
-        self.hi_res_music_file = self.user_params["hi_res_music_file"][0]
-        self.log.info(
-            "Push Hi Res quality music file {}".format(self.hi_res_music_file))
-        if not push_file_to_device(
-                self.ad, self.hi_res_music_file, music_path_dut,
-                self.user_params[Config.key_config_path.value]):
-            self.log.error(
-                "Unable to find file {}.".format(self.hi_res_music_file))
-
-        # Then do other power testing setup in the base class
-        # including start PMC etc
-        super(A2dpPowerTest, self).setup_class()
-        return True
-
-    def teardown_class(self):
-        if self.a2dp_speaker is not None:
-            self.a2dp_speaker.power_off()
-            self.a2dp_speaker.clean_up()
-
-    def _main_power_test_function_for_codec(self,
-                                            codec_type,
-                                            sample_rate,
-                                            bits_per_sample,
-                                            music_file,
-                                            test_case,
-                                            ldac_playback_quality=LDACBT_NONE,
-                                            bt_on_not_play=False,
-                                            bt_off_mute=False):
-        """Main util function for power test of A2dp with different codec.
-
-        Steps:
-        1. Prepare adb shell command
-        2. Send the adb shell command to PMC
-        3. PMC will create Media Player and set the codec info
-        4. PMC start first alarm to start music
-        5. After first alarm triggered it start the second alarm to stop music
-        6. Save the power usage data into log file
-
-        Args:
-            codec_type: Codec Type - SBC, ACC, AptX, AptX-HD or LDAC
-            sample_rate: Sample Rate - 44.1, 48.0, 88.2, 96.0 Khz
-            bits_per_sample: Bits per Sample - 16, 24, 32 bits
-            music_file: a music file with CD quality (44.1KHz/16bits) or
-                        Hi Res quality (96KHz/24bits)
-            ldac_playback_quality: LDACBT_EQMID_HQ, LDACBT_EQMID_SQ,
-                                   LDACBT_EQMID_MQ
-            bt_on_not_play: for baseline when MediaPlayer isn't play
-                            but Bluetooth is on
-            bt_off_mute: for baseline case when Bluetooth is off and
-                            on board speakers muted
-
-        Returns:
-            True or False value per check_test_pass result
-        """
-        if bt_on_not_play == True:
-            msg = "%s --es BT_ON_NotPlay %d" % (self.PMC_BASE_CMD, 1)
-        else:
-            # Get the base name of music file
-            music_name = os.path.basename(music_file)
-            self.music_url = "file:///sdcard/Music/{}".format(music_name)
-            play_time = (self.MEASURE_TIME + self.DELAY_MEASURE_TIME +
-                         self.DELAY_STOP_TIME)
-            play_msg = "%s --es MusicURL %s --es PlayTime %d" % (
-                self.PMC_BASE_CMD, self.music_url, play_time)
-
-            if bt_off_mute == True:
-                msg = "%s --es BT_OFF_Mute %d" % (play_msg, 1)
-            else:
-                codec1_msg = "%s --es CodecType %d --es SampleRate %d" % (
-                    play_msg, codec_type, sample_rate)
-                codec_msg = "%s --es BitsPerSample %d" % (codec1_msg,
-                                                          bits_per_sample)
-                if codec_type == self.CODEC_LDAC:
-                    msg = "%s --es LdacPlaybackQuality %d" % (
-                        codec_msg, ldac_playback_quality)
-                else:
-                    msg = codec_msg
-
-        self.ad.log.info("Send broadcast message: %s", msg)
-        self.ad.adb.shell(msg)
-        # Check if PMC is ready
-        status_msg = "READY"
-        if bt_on_not_play == True:
-            status_msg = "SUCCEED"
-        if not self.check_pmc_status(self.LOG_FILE, status_msg,
-                                     "PMC is not ready"):
-            return
-
-        # Start the power measurement
-        result = self.mon.measure_power(
-            self.POWER_SAMPLING_RATE, self.MEASURE_TIME,
-            self.current_test_name, self.DELAY_MEASURE_TIME)
-
-        # Sleep to wait for PMC to finish
-        time.sleep(self.DELAY_STOP_TIME)
-        # Check if PMC was successful
-        self.check_pmc_status(self.LOG_FILE, "SUCCEED",
-                              "PMC was not successful")
-
-        (current_avg, stdev) = self.save_logs_for_power_test(
-            result, self.MEASURE_TIME, 0)
-
-        # perform watermark comparison numbers
-        self.log.info("==> CURRENT AVG from PMC Monsoon app: %s" % current_avg)
-        self.log.info(
-            "==> WATERMARK from config file: %s" % self.user_params[test_case])
-        return self.check_test_pass(current_avg, self.user_params[test_case])
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='6dc78cf4-7cae-4b03-8a31-0d23f41d1baa')
-    def test_power_baseline_not_play_music(self):
-        """Test power usage baseline without playing music.
-
-        Test power usage baseline without playing music.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-           except telling PMC not to play music
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_SBC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_NONE,
-            bt_on_not_play=True)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='d96080e3-1944-48b8-9655-4a77664a463b')
-    def test_power_baseline_play_music_but_disable_bluetooth(self):
-        """Test power usage baseline of playing music but Bluetooth is off.
-
-        Test power usage baseline of playing music but Bluetooth is off
-           speaker volume is set to 0.
-
-        Steps:
-        1. Disable Bluetooth
-        2. The same steps described in _main_power_test_function_for_codec()
-        3. Enable Bluetooth
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        self.ad.log.info("Disable BT")
-        if not disable_bluetooth(self.ad.droid):
-            self.log.error("Failed to disable Bluetooth on DUT")
-            return False
-
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_SBC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_NONE,
-            bt_on_not_play=False,
-            bt_off_mute=True)
-
-        self.ad.log.info("Enable BT")
-        if not bluetooth_enabled_check(self.ad):
-            self.log.error("Failed to turn Bluetooth on DUT")
-
-        # Because of bug 34933072 Bluetooth device may not be able to reconnect
-        #  after running this test case
-        # We need manually to turn on Bluetooth devices to get it reconnect
-        # for the next test case
-        # The workaround is to run this test case in the end of test suite
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='f62238cf-35df-4e42-a160-16944f76fb86')
-    def test_power_for_sbc_with_cd_quality_music(self):
-        """Test power usage for SBC codec with CD quality music file.
-
-        Test power usage for SBC codec with CD quality music file.
-        SBC only supports 44.1 Khz and 16 bits
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_SBC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='d9421c37-c2db-4dc5-841b-f837c0b2ea48')
-    def test_power_for_sbc_with_hi_res_music(self):
-        """Test power usage for SBC codec with Hi Resolution music file.
-
-        Test power usage for SBC codec with Hi Resolution music file.
-        SBC only supports 44.1 Khz and 16 bits
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_SBC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='f746c038-9a00-43d0-b6b1-b9a36fae5a5a')
-    def test_power_for_aac_44100_16_with_cd_quality_music(self):
-        """Test power usage for AAC codec with CD quality music file.
-
-        Test power usage for AAC codec using 44.1KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_AAC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='510448e1-f4fb-4048-adad-67f8f16f96c4')
-    def test_power_for_aac_44100_16_with_hi_res_music(self):
-        """Test power usage for AAC codec with Hi Resolution music file.
-
-        Test power usage for AAC codec using 44.1KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_AAC, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='9df971d1-91b6-4fad-86ff-aa91d14aa895')
-    def test_power_for_aac_48000_16_with_cd_quality_music(self):
-        """Test power usage for AAC codec with CD quality music file.
-
-        Test power usage for AAC codec using 48KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_AAC, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='b020518e-027b-4716-8abb-cd6d83551869')
-    def test_power_for_aac_48000_16_with_hi_res_music(self):
-        """Test power usage for AAC codec with Hi Resolution music file.
-
-        Test power usage for AAC codec using 48KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_AAC, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='2006dffb-b47b-4986-b11d-de151d5f4794')
-    def test_power_for_aptx_44100_16_with_cd_quality_music(self):
-        """Test power usage for APTX codec with CD quality music file.
-
-        Test power usage for APTX codec using 44.1KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='8844356b-7756-4da6-89fe-96161e715cab')
-    def test_power_for_aptx_44100_16_with_hi_res_music(self):
-        """Test power usage for APTX codec with Hi Resolution music file.
-
-        Test power usage for APTX codec using 44.1KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX, self.SAMPLE_RATE_44100, self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='d037ae2e-c5e8-4f84-9908-88335803a3d9')
-    def test_power_for_aptx_48000_16_with_cd_quality_music(self):
-        """Test power usage for APTX codec with CD quality music file.
-
-        Test power usage for APTX codec using 48KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='4741b8cc-b038-4b38-8326-6a98de3f5ac6')
-    def test_power_for_aptx_48000_16_with_hi_res_music(self):
-        """Test power usage for APTX codec with Hi Resolution music file.
-
-        Test power usage for APTX codec using 48KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX, self.SAMPLE_RATE_48000, self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='8dff8f63-bbdb-4a2d-afca-ff1aabf7b5f2')
-    def test_power_for_aptx_hd_44100_24_with_cd_quality_music(self):
-        """Test power usage for APTX-HD codec with CD quality music file.
-
-        Test power usage for APTX-HD codec using 44.1KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX_HD, self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_24, self.cd_quality_music_file,
-            current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='ab364fdd-04dd-42b7-af0d-fe1d7d7b809b')
-    def test_power_for_aptx_hd_44100_24_with_hi_res_music(self):
-        """Test power usage for APTX-HD codec with Hi Resolution music file.
-
-        Test power usage for APTX-HD codec using 44.1KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX_HD, self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_24, self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='dd838989-9440-4833-91f6-6fca6e219796')
-    def test_power_for_aptx_hd_48000_24_with_cd_quality_music(self):
-        """Test power usage for APTX-HD codec with CD quality music file.
-
-        Test power usage for APTX-HD codec using 48KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX_HD, self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_24, self.cd_quality_music_file,
-            current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='814122eb-7068-470b-b04c-d64883258b0c')
-    def test_power_for_aptx_hd_48000_24_with_hi_res_music(self):
-        """Test power usage for APTX-HD codec with Hi Resolution music file.
-
-        Test power usage for APTX-HD codec using 48KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_APTX_HD, self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_24, self.hi_res_music_file, current_test_case)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='682c055f-4883-4559-828a-67956e110475')
-    def test_power_for_ldac_44100_16_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 44.1KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='21a2478c-9b66-49ae-a8ec-d2393142ed6c')
-    def test_power_for_ldac_44100_16_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 44.1KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='f081cb13-ec02-4814-ba00-3ed33630e7c0')
-    def test_power_for_ldac_48000_16_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 48KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='1c6b3a1b-59b8-479f-8247-e8cbbef6d82f')
-    def test_power_for_ldac_48000_16_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 48KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='e6806e10-0f1e-4c44-8f70-66e0267ebf95')
-    def test_power_for_ldac_88200_16_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 88.2KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='2458880d-c662-4313-9c3a-b14ad04dddfa')
-    def test_power_for_ldac_88200_16_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 88.2KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='e492f173-8a5b-4a92-b3de-c792e8db32fb')
-    def test_power_for_ldac_96000_16_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 96KHz/16bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_16,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='65f78a14-5a1f-443e-9a23-8ae8a206bd6f')
-    def test_power_for_ldac_96000_16_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 96KHz/16bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_16,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='3f026ae2-e34e-4a0f-aac2-1684d22a3796')
-    def test_power_for_ldac_44100_24_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 44.1KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_24,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='6d94bd0c-039e-47a7-8fc1-b87abcf9b27d')
-    def test_power_for_ldac_44100_24_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 44.1KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='2d5cbad5-5293-434d-b996-850ef32792a0')
-    def test_power_for_ldac_48000_24_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 48KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_24,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='fab004d1-c67e-4b9b-af33-e4469ce9f44a')
-    def test_power_for_ldac_48000_24_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 48KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='9527f997-61c6-4e88-90f9-6791cbe00883')
-    def test_power_for_ldac_88200_24_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 88.2KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_24,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='4a14a499-8b62-43d9-923e-f0c46e15121e')
-    def test_power_for_ldac_88200_24_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 88.2KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='d6254318-7a9a-4c19-800b-03686642e846')
-    def test_power_for_ldac_96000_24_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 96KHz/24bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_24,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='1eb26676-19ec-43af-ab20-bfb7b055114f')
-    def test_power_for_ldac_96000_24_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 96KHz/24bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='efb75158-ff90-4a95-8bd0-0189d719e647')
-    def test_power_for_ldac_44100_32_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 44.1KHz/32bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_32,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='7d5ee1a0-b903-4cf4-8bcc-8db653f04e3b')
-    def test_power_for_ldac_44100_32_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 44.1KHz/32bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_44100,
-            self.BITS_PER_SAMPLE_32,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='2981e30a-9f5a-4d35-9387-96dd2ab3421a')
-    def test_power_for_ldac_48000_32_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 48KHz/32bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_32,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='297f0ab3-be6b-4367-9750-48f3ba12bb4b')
-    def test_power_for_ldac_48000_32_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 48KHz/32bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_48000,
-            self.BITS_PER_SAMPLE_32,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='71a23350-03bf-4690-a692-eb944f7d4782')
-    def test_power_for_ldac_88200_32_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 88.2KHz/32bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_32,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='7452e2dd-cbdd-4f50-a482-99d038ba0ee0')
-    def test_power_for_ldac_88200_32_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 88.2KHz/32bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_88200,
-            self.BITS_PER_SAMPLE_32,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='042493c1-00d9-46d8-b2e9-844c9ac849f8')
-    def test_power_for_ldac_96000_32_with_cd_quality_music(self):
-        """Test power usage for LDAC codec with CD quality music file.
-
-        Test power usage for LDAC codec using 96KHz/32bits with
-             CD quality music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_32,
-            self.cd_quality_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='7d90b5ee-c32b-4ef8-b27f-587f3550aed9')
-    def test_power_for_ldac_96000_32_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Hi Resolution music file.
-
-        Test power usage for LDAC codec using 96KHz/32bits with
-             Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_32,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_HQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='d3da605f-acd4-49a6-ae0f-d1ef216ac5b4')
-    def test_power_for_ldac_96000_24_sq_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Standard Quality(SQ)
-           for Hi Resolution music file.
-
-        Test power usage for LDAC codec using 96KHz/24bits with
-        Standard Quality(SQ) for Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_SQ)
-
-    @BluetoothBaseTest.bt_test_wrap
-    @test_tracker_info(uuid='5d6494a3-ab00-48f3-9e68-50600708c176')
-    def test_power_for_ldac_96000_24_mq_with_hi_res_music(self):
-        """Test power usage for LDAC codec with Mobile Quality(SQ)
-           for Hi Resolution music file.
-
-        Test power usage for LDAC codec using 96KHz/24bits with
-        Mobile Quality(SQ) for Hi Resolution music file.
-
-        Steps:
-        The same steps described in _main_power_test_function_for_codec()
-
-        Expected Result:
-        Power consumption results
-
-        TAGS: Bluetooth, A2DP, Power, Codec
-        Priority: 3
-
-        """
-        current_test_case = func_name = sys._getframe().f_code.co_name
-        return self._main_power_test_function_for_codec(
-            self.CODEC_LDAC,
-            self.SAMPLE_RATE_96000,
-            self.BITS_PER_SAMPLE_24,
-            self.hi_res_music_file,
-            current_test_case,
-            ldac_playback_quality=self.LDACBT_EQMID_MQ)