Stabilize SineWaveQualityTest for automation

This commit includes modularization and added features for
A2dpCodecBaseTest as well as modifications to SineWaveQualityTest to
work around the Bluetooth bug in android q

A2dpCodecBaseTest.py
- Store test recorded audio files in test result folder instead of
invocation directory
- Move pair and connect, music file push, and volume control to
setup_test method
- Add two optional user parameters, volume and "volume_up". Volume allows
the user to set the media play volume to a certain percent of max
volume. "Volume_up" allows the user to bump the volume up an additional
number of levels to surpass the media's max volume limit.
- Refactor out playing and recording audio into separate method. This
allows subclasses to avoid setting the codec if the version of SL4A
doesn't support the command (Android P does not support the set codec
command, Android Q does).

SineWaveQualityTest.py
- Do not set codec before streaming and recording audio. This allows the
test to be compatible with Android P.

Bug: None
Test: tested on 2 testbeds. Pixel2 XL and Pixel Buds and Pixel with
Jaybird X3

Change-Id: Ie7da32fdaef402624ef968b61eeaceef8887f847
2 files changed
tree: 5bec1ae487726898c80664c6f87a318ff4f4a2d7
  1. acts/
  2. tools/
  3. wts-acts/
  4. Android.mk
  5. PREUPLOAD.cfg