diff options
author | Selim Cinek <cinek@google.com> | 2015-05-11 16:28:42 -0700 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2015-05-12 00:41:15 +0000 |
commit | b05f5739bb62870f3d23d02c10fbbbaacbee93d4 (patch) | |
tree | 4050c53b58d489279f115e91bbeca3336a9ee5d8 /packages/SystemUI/src | |
parent | 737bff3476a3af8f930d29fccce16d033fbc3efa (diff) | |
download | frameworks_base-b05f5739bb62870f3d23d02c10fbbbaacbee93d4.zip frameworks_base-b05f5739bb62870f3d23d02c10fbbbaacbee93d4.tar.gz frameworks_base-b05f5739bb62870f3d23d02c10fbbbaacbee93d4.tar.bz2 |
Fixed a crash with the voice interaction service
Bug: 20925281
Change-Id: I136014ebc12c3afcb154722a8fec44b1d5f003e9
(cherry picked from commit 64904d39f8062b026c2d4c09c9a5a26532e60bb6)
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/assist/AssistManager.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java index d1f8963..08659e9 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java @@ -204,7 +204,8 @@ public class AssistManager { private boolean getVoiceInteractorSupportsAssistGesture() { try { - return mVoiceInteractionManagerService.activeServiceSupportsAssist(); + return mVoiceInteractionManagerService != null + && mVoiceInteractionManagerService.activeServiceSupportsAssist(); } catch (RemoteException e) { Log.w(TAG, "Failed to call activeServiceSupportsAssistGesture", e); return false; @@ -213,7 +214,8 @@ public class AssistManager { public boolean canVoiceAssistBeLaunchedFromKeyguard() { try { - return mVoiceInteractionManagerService.activeServiceSupportsLaunchFromKeyguard(); + return mVoiceInteractionManagerService != null + && mVoiceInteractionManagerService.activeServiceSupportsLaunchFromKeyguard(); } catch (RemoteException e) { Log.w(TAG, "Failed to call activeServiceSupportsLaunchFromKeyguard", e); return false; @@ -231,7 +233,8 @@ public class AssistManager { private boolean isVoiceSessionRunning() { try { - return mVoiceInteractionManagerService.isSessionRunning(); + return mVoiceInteractionManagerService != null + && mVoiceInteractionManagerService.isSessionRunning(); } catch (RemoteException e) { Log.w(TAG, "Failed to call isSessionRunning", e); return false; |