diff options
| author | 2015-01-21 01:39:03 +0000 | |
|---|---|---|
| committer | 2015-01-21 01:39:19 +0000 | |
| commit | 24c33d32cc4d9580d8bed6182d1a4c4378645172 (patch) | |
| tree | 782eff05998b51b620ee7092b8ebcd9a498de511 | |
| parent | 51ff482f02946124653af2a748374a395f9b8656 (diff) | |
| parent | dd32946def41fce839cd57c3c248dcd04b34fc04 (diff) | |
Merge "Expose CommandRequest completion status."
| -rw-r--r-- | core/java/android/app/VoiceInteractor.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/app/VoiceInteractor.java b/core/java/android/app/VoiceInteractor.java index 723cb9b2a9f9..c225d3ae84b0 100644 --- a/core/java/android/app/VoiceInteractor.java +++ b/core/java/android/app/VoiceInteractor.java @@ -108,9 +108,10 @@ public class VoiceInteractor { request = pullRequest((IVoiceInteractorRequest)args.arg1, msg.arg1 != 0); if (DEBUG) Log.d(TAG, "onCommandResult: req=" + ((IVoiceInteractorRequest)args.arg1).asBinder() + "/" + request - + " result=" + args.arg2); + + " completed=" + msg.arg1 + " result=" + args.arg2); if (request != null) { - ((CommandRequest)request).onCommandResult((Bundle) args.arg2); + ((CommandRequest)request).onCommandResult(msg.arg1 != 0, + (Bundle) args.arg2); if (msg.arg1 != 0) { request.clear(); } @@ -338,7 +339,12 @@ public class VoiceInteractor { mArgs = args; } - public void onCommandResult(Bundle result) { + /** + * Results for CommandRequest can be returned in partial chunks. + * The isCompleted is set to true iff all results have been returned, indicating the + * CommandRequest has completed. + */ + public void onCommandResult(boolean isCompleted, Bundle result) { } IVoiceInteractorRequest submit(IVoiceInteractor interactor, String packageName, |