diff options
author | Sandeep Siddhartha <sansid@google.com> | 2014-07-29 14:41:50 -0700 |
---|---|---|
committer | Sandeep Siddhartha <sansid@google.com> | 2014-07-30 11:43:41 -0700 |
commit | 1ed12ddb8c46193cc4d790b9c7d6a5d61afb3311 (patch) | |
tree | 98c42d193596c9c24dc94b8c1df391081160a7d3 /services/voiceinteraction | |
parent | 38e2d104d80e092af7d997db025b2a9b47150470 (diff) | |
download | frameworks_base-1ed12ddb8c46193cc4d790b9c7d6a5d61afb3311.zip frameworks_base-1ed12ddb8c46193cc4d790b9c7d6a5d61afb3311.tar.gz frameworks_base-1ed12ddb8c46193cc4d790b9c7d6a5d61afb3311.tar.bz2 |
Make startRecognition async
- This is needed for telephony and audio integration which should happen via async callbacks
that'll end up starting/stopping recognition.
e.g. if a startRecognition happens when in a phone call - the onDetectionStarted will get called once the phone
call ends.
For now the transient stoppages due to internal reasons will not be propagated back to the client.
Bug: 16514535
Bug: 16515468
Change-Id: I1b2b8edd28f5c5e67c453f66c23e1a67a626114e
Diffstat (limited to 'services/voiceinteraction')
-rw-r--r-- | services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java index fe1b92a..15ec629 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java @@ -129,7 +129,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { if (oldListener != null && oldListener.asBinder() != listener.asBinder()) { Slog.w(TAG, "Canceling previous recognition"); try { - oldListener.onDetectionStopped(); + oldListener.onError(STATUS_ERROR); } catch (RemoteException e) { Slog.w(TAG, "RemoteException in onDetectionStopped"); } @@ -235,7 +235,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { try { synchronized (this) { for (int i = 0; i < mActiveListeners.size(); i++) { - mActiveListeners.valueAt(i).onDetectionStopped(); + mActiveListeners.valueAt(i).onError(STATUS_ERROR); } } } catch (RemoteException e) { @@ -279,7 +279,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener { synchronized (this) { try { for (int i = 0; i < mActiveListeners.size(); i++) { - mActiveListeners.valueAt(i).onDetectionStopped(); + mActiveListeners.valueAt(i).onError(SoundTrigger.STATUS_DEAD_OBJECT); } } catch (RemoteException e) { Slog.w(TAG, "RemoteException in onDetectionStopped"); |