Remove CTS tests for completeAudioAvailable

Change-Id: I23d66d2daf52518ecc90bef067681681839ce6e2
diff --git a/tests/src/android/speech/tts/cts/StubTextToSpeechService.java b/tests/src/android/speech/tts/cts/StubTextToSpeechService.java
index 0c6ae05..5e6bb41 100644
--- a/tests/src/android/speech/tts/cts/StubTextToSpeechService.java
+++ b/tests/src/android/speech/tts/cts/StubTextToSpeechService.java
@@ -27,9 +27,6 @@
  */
 public class StubTextToSpeechService extends TextToSpeechService {
 
-    public static final String TEXT_STREAM = "stream";
-    public static final String TEXT_COMPLETE = "complete";
-
     @Override
     protected String[] onGetLanguage() {
         return new String[] { "eng", "USA", "" };
@@ -51,14 +48,6 @@
 
     @Override
     protected void onSynthesizeText(SynthesisRequest request, SynthesisCallback callback) {
-        if (TEXT_STREAM.equals(request.getText())) {
-            synthesizeStreaming(request, callback);
-        } else {
-            synthesizeComplete(request, callback);
-        }
-    }
-
-    private void synthesizeStreaming(SynthesisRequest request, SynthesisCallback callback) {
         if (callback.start(16000, AudioFormat.ENCODING_PCM_16BIT, 1) != TextToSpeech.SUCCESS) {
             return;
         }
@@ -71,12 +60,4 @@
         }
     }
 
-    private void synthesizeComplete(SynthesisRequest request, SynthesisCallback callback) {
-        byte[] data = { 0x01, 0x2 };
-        if (callback.completeAudioAvailable(16000, AudioFormat.ENCODING_PCM_16BIT, 1,
-                data, 0, data.length) != TextToSpeech.SUCCESS) {
-            return;
-        }
-    }
-
 }
diff --git a/tests/tests/speech/src/android/speech/tts/cts/TextToSpeechServiceTest.java b/tests/tests/speech/src/android/speech/tts/cts/TextToSpeechServiceTest.java
index 7babe5a..c19f6c0 100644
--- a/tests/tests/speech/src/android/speech/tts/cts/TextToSpeechServiceTest.java
+++ b/tests/tests/speech/src/android/speech/tts/cts/TextToSpeechServiceTest.java
@@ -29,6 +29,7 @@
 public class TextToSpeechServiceTest extends AndroidTestCase {
 
     private static final String UTTERANCE_ID = "utterance";
+    private static final String UTTERANCE = "text to speech cts test";
     private static final String SAMPLE_FILE_NAME = "mytts.wav";
 
     private TextToSpeechWrapper mTts;
@@ -50,13 +51,12 @@
         return mTts.getTts();
     }
 
-    public void testSynthesizeToFileStreaming() throws Exception {
+    public void testSynthesizeToFile() throws Exception {
         File sampleFile = new File(Environment.getExternalStorageDirectory(), SAMPLE_FILE_NAME);
         try {
             assertFalse(sampleFile.exists());
 
-            int result = getTts().synthesizeToFile(StubTextToSpeechService.TEXT_STREAM,
-                    createParams(), sampleFile.getPath());
+            int result = getTts().synthesizeToFile(UTTERANCE, createParams(), sampleFile.getPath());
             assertEquals("synthesizeToFile() failed", TextToSpeech.SUCCESS, result);
 
             assertTrue("synthesizeToFile() completion timeout", mTts.waitForComplete(UTTERANCE_ID));
@@ -68,34 +68,8 @@
         }
     }
 
-    public void testSynthesizeToFileComplete() throws Exception {
-        File sampleFile = new File(Environment.getExternalStorageDirectory(), SAMPLE_FILE_NAME);
-        try {
-            assertFalse(sampleFile.exists());
-
-            int result = getTts().synthesizeToFile(StubTextToSpeechService.TEXT_COMPLETE,
-                    createParams(), sampleFile.getPath());
-            assertEquals("synthesizeToFile() failed", TextToSpeech.SUCCESS, result);
-
-            assertTrue("synthesizeToFile() completion timeout", waitForUtterance());
-            assertTrue("synthesizeToFile() didn't produce a file", sampleFile.exists());
-            assertTrue("synthesizeToFile() produced a non-sound file",
-                    TextToSpeechWrapper.isSoundFile(sampleFile.getPath()));
-        } finally {
-            sampleFile.delete();
-        }
-    }
-
-    public void testSpeakStreaming() throws Exception {
-        int result = getTts().speak(StubTextToSpeechService.TEXT_STREAM, TextToSpeech.QUEUE_FLUSH,
-                createParams());
-        assertEquals("speak() failed", TextToSpeech.SUCCESS, result);
-        assertTrue("speak() completion timeout", waitForUtterance());
-    }
-
-    public void testSpeakComplete() throws Exception {
-        int result = getTts().speak(StubTextToSpeechService.TEXT_COMPLETE, TextToSpeech.QUEUE_FLUSH,
-                createParams());
+    public void testSpeak() throws Exception {
+        int result = getTts().speak(UTTERANCE, TextToSpeech.QUEUE_FLUSH, createParams());
         assertEquals("speak() failed", TextToSpeech.SUCCESS, result);
         assertTrue("speak() completion timeout", waitForUtterance());
     }