diff options
| -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 0a5b66863023..6de887ba4ceb 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(); |