Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01e0027b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[audio] Bind TTS with FOREGROUND_SERVICE" into main

parents f8c28f29 0de318e3
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,10 @@


package com.android.server.texttospeech;
package com.android.server.texttospeech;


import static android.content.Context.BIND_AUTO_CREATE;
import static android.content.Context.BIND_FOREGROUND_SERVICE;
import static android.content.Context.BIND_SCHEDULE_LIKE_TOP_APP;

import static com.android.internal.infra.AbstractRemoteService.PERMANENT_BOUND_TIMEOUT_MS;
import static com.android.internal.infra.AbstractRemoteService.PERMANENT_BOUND_TIMEOUT_MS;


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