Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how the OnInitListener is invoked in ShadowTextToSpeech #6146

Merged
merged 1 commit into from Jan 16, 2021

Conversation

copybara-service[bot]
Copy link

Fix how the OnInitListener is invoked in ShadowTextToSpeech

Previously, in ShadowTextToSpeech, the OnInitListener callback was always
called inline with the ERROR code. Instead, default to calling it
asynchronously with the SUCCESS code, which is what happens in real Android.

In the case that tests want to check the error condition, add a new API
ShadowTextToSpeech.setOnInitStatus(int) which can be used to set the status
code used in the callback.

Previously, in ShadowTextToSpeech, the OnInitListener callback was always
called inline with the ERROR code. Instead, default to calling it
asynchronously with the SUCCESS code, which is what happens in real Android.

In the case that tests want to check the error condition, add a new API
ShadowTextToSpeech.setOnInitStatus(int) which can be used to set the status
code used in the callback.

PiperOrigin-RevId: 350776217
@hoisie hoisie merged commit ba1331d into master Jan 16, 2021
@hoisie hoisie deleted the piper_350776217 branch January 16, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant