Fix bug 3511256 invalid TTS parameter cache size

The NB_CACHED_PARAMS is the number of cached parameters, not
 the size of the array for cached parameters.

Change-Id: I3d3053bbf247f3f89ae1ea07a931d33df7857a7c
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 6d7b7ce..186af70 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -414,8 +414,10 @@
 
         /**
          * {@hide}
+         * Total number of cached speech parameters.
+         * This number should be equal to (max param position/2) + 1.
          */
-        protected static final int NB_CACHED_PARAMS = 20;
+        protected static final int NB_CACHED_PARAMS = 10;
     }
 
     /**