From 1e84d67493a9666e1e9b83edf492de5893118fc6 Mon Sep 17 00:00:00 2001 From: Philip Cuadra Date: Tue, 20 Aug 2019 13:50:51 -0700 Subject: [PATCH] Bind voice interactor as top-app when it is being used When voice interactor is being used, it should run as the top app to handle processing as quickly as possible. This is similar to what IME does when IME is shown. Bug 139756725 Test: invoke assistant, confirm :interactor becomes top-app and then goes back to foreground after use. Change-Id: Id13b47dcb4de6658eede13a650e6ef631f649f4f --- .../voiceinteraction/VoiceInteractionSessionConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java index f16dec6fb670b..0ff92739f8b66 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java @@ -194,7 +194,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection, if (!mFullyBound) { mFullyBound = mContext.bindServiceAsUser(mBindIntent, mFullConnection, Context.BIND_AUTO_CREATE | Context.BIND_TREAT_LIKE_ACTIVITY - | Context.BIND_FOREGROUND_SERVICE + | Context.BIND_SCHEDULE_LIKE_TOP_APP | Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS, new UserHandle(mUser)); }