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

Commit 496767c1 authored by James Cook's avatar James Cook
Browse files

Cancel voice assist session on user switch

Ensure any active voice interaction session is canceled when the
voice interaction service is shutdown. This ensures that the UI window
is closed when a user switches accounts.

Bug: 20501283
Change-Id: I9f3dae5afc4048482f6bedaed36dbae3c0823ebd
parent 7d85ea93
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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();