am 5dbab866: Don’t run on devices with no audio output.
* commit '5dbab866a09481e27976b144a23f189e68b1fb16':
Don’t run on devices with no audio output.
diff --git a/tests/tests/media/src/android/media/cts/VisualizerTest.java b/tests/tests/media/src/android/media/cts/VisualizerTest.java
index ea7a13f..3c639a0 100644
--- a/tests/tests/media/src/android/media/cts/VisualizerTest.java
+++ b/tests/tests/media/src/android/media/cts/VisualizerTest.java
@@ -228,6 +228,9 @@
//Test case 3.0: test setting NONE measurement mode
public void test3_0MeasurementModeNone() throws Exception {
+ if (!hasAudioOutput()) {
+ return;
+ }
try {
getVisualizer(0);
mVisualizer.setEnabled(true);
@@ -257,6 +260,9 @@
//Test case 4.0: test setting peak / RMS measurement mode
public void test4_0MeasurementModePeakRms() throws Exception {
+ if (!hasAudioOutput()) {
+ return;
+ }
try {
getVisualizer(0);
mVisualizer.setEnabled(true);
@@ -282,6 +288,9 @@
//Test case 4.1: test measurement of peak / RMS
public void test4_1MeasurePeakRms() throws Exception {
+ if (!hasAudioOutput()) {
+ return;
+ }
AudioEffect vc = null;
try {
// this test will play a 1kHz sine wave with peaks at -40dB
@@ -352,6 +361,9 @@
//Test case 4.2: test measurement of peak / RMS in Long MP3
public void test4_2MeasurePeakRmsLongMP3() throws Exception {
+ if (!hasAudioOutput()) {
+ return;
+ }
AudioEffect vc = null;
try {
// this test will play a 1kHz sine wave with peaks at -40dB