diff options
author | James Cook <jamescook@google.com> | 2015-05-26 16:16:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-26 16:16:35 +0000 |
commit | 327c364113c18c9d5a05df0c912b65788461da41 (patch) | |
tree | 3f44278f4563cfc90de1b2a2ce24a2e94bdecbe8 | |
parent | f981ea95f2e951a558f73fb941cf006423e52627 (diff) | |
parent | 496767c142fbf8b412237f9ffc2f9af411a3d077 (diff) | |
download | frameworks_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.java | 6 |
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(); |