summaryrefslogtreecommitdiffstats
path: root/services/voiceinteraction
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-07-28 16:40:11 -0700
committerSandeep Siddhartha <sansid@google.com>2014-07-29 17:23:40 -0700
commit8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c (patch)
treec9a8856f89705603de49e4b8fbc118a6e5eb8153 /services/voiceinteraction
parent5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca (diff)
downloadframeworks_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.java15
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;