Initialize TtsPlatformImpl on background thread
TtsPlatformImpl#initialize() calls TextToSpeech#isLanguageAvailable for each of the installed locales. This call can result in certain calls to the platform which end up doing I/O tasks. Since this method is run on the UI thread, it causes those I/O tasks to be performed on the UI thread as well. This change fixes that issue by ensuring that that method is called on a background thread, and only the calls necessary to run on the UI thread run on it. Bug: 813669 Test: Manually verified that skipped frames are no longer reported Change-Id: If092b23eeed35b5384daa5f045c09fb8eda63281 Reviewed-on: https://chromium-review.googlesource.com/925822 Commit-Queue: Bernhard Bauer <bauerb@chromium.org> Reviewed-by:Bernhard Bauer <bauerb@chromium.org> Cr-Commit-Position: refs/heads/master@{#539844}
Showing
Please register or sign in to comment