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

Commit 8ef360f3 authored by Sandeep Siddhartha's avatar Sandeep Siddhartha
Browse files

Notify VIS of shutdown before switching implementations

This lets the implementation cleanup before it's destroyed.

Bug: 16629417
Change-Id: Ia717d461677e9ca8fa66f02c030aacad1597692d
parent 5d231e13
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -96,13 +96,6 @@ class VoiceInteractionManagerServiceImpl {

        @Override
        public void onServiceDisconnected(ComponentName name) {
            try {
                if (mService != null) {
                    mService.shutdown();
                }
            } catch (RemoteException e) {
                Slog.w(TAG, "RemoteException in shutdown", e);
            }
            mService = null;
        }
    };
@@ -307,6 +300,14 @@ class VoiceInteractionManagerServiceImpl {
    }

    void shutdownLocked() {
        try {
            if (mService != null) {
                mService.shutdown();
            }
        } catch (RemoteException e) {
            Slog.w(TAG, "RemoteException in shutdown", e);
        }

        if (mBound) {
            mContext.unbindService(mConnection);
            mBound = false;