summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Cook <jamescook@google.com>2015-05-26 16:16:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-26 16:16:35 +0000
commit327c364113c18c9d5a05df0c912b65788461da41 (patch)
tree3f44278f4563cfc90de1b2a2ce24a2e94bdecbe8
parentf981ea95f2e951a558f73fb941cf006423e52627 (diff)
parent496767c142fbf8b412237f9ffc2f9af411a3d077 (diff)
downloadframeworks_base-327c364113c18c9d5a05df0c912b65788461da41.zip
frameworks_base-327c364113c18c9d5a05df0c912b65788461da41.tar.gz
frameworks_base-327c364113c18c9d5a05df0c912b65788461da41.tar.bz2
Merge "Cancel voice assist session on user switch" into mnc-dev
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index 0a5b668..6de887b 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -248,6 +248,12 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
}
void shutdownLocked() {
+ // If there is an active session, cancel it to allow it to clean up its window and other
+ // state.
+ if (mActiveSession != null) {
+ mActiveSession.cancel();
+ mActiveSession = null;
+ }
try {
if (mService != null) {
mService.shutdown();