Loading core/java/android/speech/tts/AudioPlaybackHandler.java +6 −8 Original line number Diff line number Diff line Loading @@ -94,14 +94,12 @@ class AudioPlaybackHandler { // // (Even if it did, all it would result in is a warning message). mQueue.add(new ListEntry(SYNTHESIS_DONE, token, HIGH_PRIORITY)); } else { if (token != null) { if (token.getType() == MessageParams.TYPE_AUDIO) { } else if (token.getType() == MessageParams.TYPE_AUDIO) { ((AudioMessageParams) token).getPlayer().stop(); // No cleanup required for audio messages. } else if (token.getType() == MessageParams.TYPE_SILENCE) { ((SilenceMessageParams) token).getConditionVariable().open(); } } // No cleanup required for silence messages. } } Loading core/java/android/speech/tts/TextToSpeech.java +8 −0 Original line number Diff line number Diff line Loading @@ -581,6 +581,14 @@ public class TextToSpeech { service.setCallback(getPackageName(), null); service.stop(getPackageName()); mServiceConnection.disconnect(); // Context#unbindService does not result in a call to // ServiceConnection#onServiceDisconnected. As a result, the // service ends up being destroyed (if there are no other open // connections to it) but the process lives on and the // ServiceConnection continues to refer to the destroyed service. // // This leads to tons of log spam about SynthThread being dead. mServiceConnection = null; mCurrentEngine = null; return null; } Loading core/java/android/speech/tts/TextToSpeechService.java +0 −4 Original line number Diff line number Diff line Loading @@ -767,10 +767,6 @@ public abstract class TextToSpeechService extends Service { mCallbacks.setCallback(packageName, cb); } private boolean isDefault(String lang, String country, String variant) { return Locale.getDefault().equals(new Locale(lang, country, variant)); } private String intern(String in) { // The input parameter will be non null. return in.intern(); Loading Loading
core/java/android/speech/tts/AudioPlaybackHandler.java +6 −8 Original line number Diff line number Diff line Loading @@ -94,14 +94,12 @@ class AudioPlaybackHandler { // // (Even if it did, all it would result in is a warning message). mQueue.add(new ListEntry(SYNTHESIS_DONE, token, HIGH_PRIORITY)); } else { if (token != null) { if (token.getType() == MessageParams.TYPE_AUDIO) { } else if (token.getType() == MessageParams.TYPE_AUDIO) { ((AudioMessageParams) token).getPlayer().stop(); // No cleanup required for audio messages. } else if (token.getType() == MessageParams.TYPE_SILENCE) { ((SilenceMessageParams) token).getConditionVariable().open(); } } // No cleanup required for silence messages. } } Loading
core/java/android/speech/tts/TextToSpeech.java +8 −0 Original line number Diff line number Diff line Loading @@ -581,6 +581,14 @@ public class TextToSpeech { service.setCallback(getPackageName(), null); service.stop(getPackageName()); mServiceConnection.disconnect(); // Context#unbindService does not result in a call to // ServiceConnection#onServiceDisconnected. As a result, the // service ends up being destroyed (if there are no other open // connections to it) but the process lives on and the // ServiceConnection continues to refer to the destroyed service. // // This leads to tons of log spam about SynthThread being dead. mServiceConnection = null; mCurrentEngine = null; return null; } Loading
core/java/android/speech/tts/TextToSpeechService.java +0 −4 Original line number Diff line number Diff line Loading @@ -767,10 +767,6 @@ public abstract class TextToSpeechService extends Service { mCallbacks.setCallback(packageName, cb); } private boolean isDefault(String lang, String country, String variant) { return Locale.getDefault().equals(new Locale(lang, country, variant)); } private String intern(String in) { // The input parameter will be non null. return in.intern(); Loading