diff options
author | Sandeep Siddhartha <sansid@google.com> | 2014-07-28 16:40:11 -0700 |
---|---|---|
committer | Sandeep Siddhartha <sansid@google.com> | 2014-07-29 17:23:40 -0700 |
commit | 8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c (patch) | |
tree | c9a8856f89705603de49e4b8fbc118a6e5eb8153 /services/voiceinteraction | |
parent | 5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca (diff) | |
download | frameworks_base-8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c.zip frameworks_base-8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c.tar.gz frameworks_base-8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c.tar.bz2 |
Notify VIS of shutdown before switching implementations
This lets the implementation cleanup before it's destroyed.
Bug: 16629417
Change-Id: Ia717d461677e9ca8fa66f02c030aacad1597692d
Diffstat (limited to 'services/voiceinteraction')
-rw-r--r-- | services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java index 94f227c..c0e536a 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java @@ -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; |