Use Context.BIND_SCHEDULE_LIKE_TOP_APP when binding to the TextToSpeechService.

Bug: 266132000
Test: Verified TTS latency goes down.
Change-Id: Ie805f0be527336463656e6af81376b022e16a306
This commit is contained in:
Rakesh Iyer
2023-03-13 20:05:00 +00:00
parent 019c928610
commit b7d0aca920

View File

@@ -95,7 +95,7 @@ final class TextToSpeechManagerPerUserService extends
ITextToSpeechSessionCallback callback) {
super(context,
new Intent(TextToSpeech.Engine.INTENT_ACTION_TTS_SERVICE).setPackage(engine),
Context.BIND_AUTO_CREATE,
Context.BIND_AUTO_CREATE | Context.BIND_SCHEDULE_LIKE_TOP_APP,
userId,
ITextToSpeechService.Stub::asInterface);
mEngine = engine;