resolved conflicts for merge of 3ebade5d to honeycomb-plus-aosp
Change-Id: Ifd5f88f75feeb2dad1131e6a262dff3b979bdf8d
This commit is contained in:
@@ -512,10 +512,17 @@ public class TextToSpeech {
|
|||||||
|
|
||||||
Intent intent = new Intent("android.intent.action.START_TTS_SERVICE");
|
Intent intent = new Intent("android.intent.action.START_TTS_SERVICE");
|
||||||
intent.addCategory("android.intent.category.TTS");
|
intent.addCategory("android.intent.category.TTS");
|
||||||
mContext.bindService(intent, mServiceConnection,
|
boolean bound = mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
|
||||||
Context.BIND_AUTO_CREATE);
|
if (!bound) {
|
||||||
// TODO handle case where the binding works (should always work) but
|
Log.e("TextToSpeech.java", "initTts() failed to bind to service");
|
||||||
// the plugin fails
|
if (mInitListener != null) {
|
||||||
|
mInitListener.onInit(ERROR);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// initialization listener will be called inside ServiceConnection
|
||||||
|
Log.i("TextToSpeech.java", "initTts() successfully bound to service");
|
||||||
|
}
|
||||||
|
// TODO handle plugin failures
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -765,8 +772,9 @@ public class TextToSpeech {
|
|||||||
{
|
{
|
||||||
synchronized (mStartLock) {
|
synchronized (mStartLock) {
|
||||||
int result = ERROR;
|
int result = ERROR;
|
||||||
Log.i("TTS", "speak() queueMode=" + queueMode);
|
Log.i("TextToSpeech.java - speak", "speak text of length " + text.length());
|
||||||
if (!mStarted) {
|
if (!mStarted) {
|
||||||
|
Log.e("TextToSpeech.java - speak", "service isn't started");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -1264,10 +1272,13 @@ public class TextToSpeech {
|
|||||||
*/
|
*/
|
||||||
public int synthesizeToFile(String text, HashMap<String,String> params,
|
public int synthesizeToFile(String text, HashMap<String,String> params,
|
||||||
String filename) {
|
String filename) {
|
||||||
Log.i("TTS", "synthesizeToFile()");
|
Log.i("TextToSpeech.java", "synthesizeToFile()");
|
||||||
synchronized (mStartLock) {
|
synchronized (mStartLock) {
|
||||||
int result = ERROR;
|
int result = ERROR;
|
||||||
|
Log.i("TextToSpeech.java - synthesizeToFile", "synthesizeToFile text of length "
|
||||||
|
+ text.length());
|
||||||
if (!mStarted) {
|
if (!mStarted) {
|
||||||
|
Log.e("TextToSpeech.java - synthesizeToFile", "service isn't started");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user