Merge "Fix TextToSpeech system connection error handling" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-07 14:14:10 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -2427,9 +2427,8 @@ public class TextToSpeech {
@Override
public void onError(String errorInfo) {
Log.w(TAG, "System TTS connection error: " + errorInfo);
// The connection was not established successfully - handle as
// disconnection: clear the state and notify the user.
onServiceDisconnected(/* componentName= */ null);
// There is an error connecting to the engine - notify the listener.
dispatchOnInit(ERROR);
}
});

View File

@@ -174,7 +174,7 @@ final class TextToSpeechManagerPerUserService extends
try {
callbackRunnable.runOrThrow();
} catch (RemoteException ex) {
Slog.w(TAG, "Failed running callback method", ex);
Slog.i(TAG, "Failed running callback method: " + ex);
}
}