Merge change 6307 into donut
* changes: Fixes a compatibility issue with users that have the old TTS installed already.
This commit is contained in:
@@ -207,7 +207,7 @@ public class TextToSpeech {
|
||||
}
|
||||
};
|
||||
|
||||
Intent intent = new Intent("android.intent.action.USE_TTS");
|
||||
Intent intent = new Intent("android.intent.action.START_TTS_SERVICE");
|
||||
intent.addCategory("android.intent.category.TTS");
|
||||
mContext.bindService(intent, mServiceConnection,
|
||||
Context.BIND_AUTO_CREATE);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:name=".TtsService"
|
||||
android:label="TTS Service">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.USE_TTS"/>
|
||||
<action android:name="android.intent.action.START_TTS_SERVICE"/>
|
||||
<category android:name="android.intent.category.TTS"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
@@ -102,7 +102,7 @@ public class TtsService extends Service implements OnCompletionListener {
|
||||
private static final int MAX_SPEECH_ITEM_CHAR_LENGTH = 4000;
|
||||
private static final int MAX_FILENAME_LENGTH = 250;
|
||||
|
||||
private static final String ACTION = "android.intent.action.USE_TTS";
|
||||
private static final String ACTION = "android.intent.action.START_TTS_SERVICE";
|
||||
private static final String CATEGORY = "android.intent.category.TTS";
|
||||
private static final String PKGNAME = "android.tts";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user