diff options
| author | 2015-07-20 23:40:00 +0000 | |
|---|---|---|
| committer | 2015-07-20 23:40:00 +0000 | |
| commit | 027db7c90a2bfde65069dece1c1a4519e246c202 (patch) | |
| tree | 119c9396d23c852bf183c441d82cf2f325955ec2 | |
| parent | 6ae0a992c8f2a58881f20adcd1e5bc796e85aeef (diff) | |
| parent | e58ba842de4324c62b7e527f0b90fc6ee5ccba13 (diff) | |
am e58ba842: am 8924f23d: Merge "Fix SysUI crashes on svelte devices" into mnc-dev
* commit 'e58ba842de4324c62b7e527f0b90fc6ee5ccba13':
Fix SysUI crashes on svelte devices
| -rw-r--r-- | core/java/com/android/internal/app/AssistUtils.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/core/java/com/android/internal/app/AssistUtils.java b/core/java/com/android/internal/app/AssistUtils.java index ff989bd8d350..0910daf655ba 100644 --- a/core/java/com/android/internal/app/AssistUtils.java +++ b/core/java/com/android/internal/app/AssistUtils.java @@ -49,8 +49,10 @@ public class AssistUtils { public boolean showSessionForActiveService(Bundle args, int sourceFlags, IVoiceInteractionSessionShowCallback showCallback, IBinder activityToken) { try { - return mVoiceInteractionManagerService.showSessionForActiveService(args, sourceFlags, - showCallback, activityToken); + if (mVoiceInteractionManagerService != null) { + return mVoiceInteractionManagerService.showSessionForActiveService(args, + sourceFlags, showCallback, activityToken); + } } catch (RemoteException e) { Log.w(TAG, "Failed to call showSessionForActiveService", e); } @@ -59,7 +61,9 @@ public class AssistUtils { public void launchVoiceAssistFromKeyguard() { try { - mVoiceInteractionManagerService.launchVoiceAssistFromKeyguard(); + if (mVoiceInteractionManagerService != null) { + mVoiceInteractionManagerService.launchVoiceAssistFromKeyguard(); + } } catch (RemoteException e) { Log.w(TAG, "Failed to call launchVoiceAssistFromKeyguard", e); } @@ -87,7 +91,11 @@ public class AssistUtils { public ComponentName getActiveServiceComponentName() { try { - return mVoiceInteractionManagerService.getActiveServiceComponentName(); + if (mVoiceInteractionManagerService != null) { + return mVoiceInteractionManagerService.getActiveServiceComponentName(); + } else { + return null; + } } catch (RemoteException e) { Log.w(TAG, "Failed to call getActiveServiceComponentName", e); return null; @@ -106,7 +114,9 @@ public class AssistUtils { public void hideCurrentSession() { try { - mVoiceInteractionManagerService.hideCurrentSession(); + if (mVoiceInteractionManagerService != null) { + mVoiceInteractionManagerService.hideCurrentSession(); + } } catch (RemoteException e) { Log.w(TAG, "Failed to call hideCurrentSession", e); } |