summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-09-07 19:10:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-07 19:10:07 +0000
commit8232d822aa97e78e982ed154ac618cde34baac2a (patch)
tree411b05e4021d419f430d78316d1c9a63fcec70df /core/java
parentb30c9920df9a8b5f1515e26c65c5ce1d21e5a77a (diff)
parent39fcca0a503658f91a14b4b1d35dfc4ac9fce9d9 (diff)
downloadframeworks_base-8232d822aa97e78e982ed154ac618cde34baac2a.zip
frameworks_base-8232d822aa97e78e982ed154ac618cde34baac2a.tar.gz
frameworks_base-8232d822aa97e78e982ed154ac618cde34baac2a.tar.bz2
Merge "SoundTrigger: fix capture format in recognition event" into lmp-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/hardware/soundtrigger/SoundTrigger.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index 7a49eb5..7390e2b 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -480,7 +480,7 @@ public class SoundTrigger {
int capturePreambleMs = in.readInt();
boolean triggerInData = in.readByte() == 1;
AudioFormat captureFormat = null;
- if (triggerInData) {
+ if (in.readByte() == 1) {
int sampleRate = in.readInt();
int encoding = in.readInt();
int channelMask = in.readInt();
@@ -508,7 +508,8 @@ public class SoundTrigger {
dest.writeInt(captureSession);
dest.writeInt(captureDelayMs);
dest.writeInt(capturePreambleMs);
- if (triggerInData && (captureFormat != null)) {
+ dest.writeByte((byte) (triggerInData ? 1 : 0));
+ if (captureFormat != null) {
dest.writeByte((byte)1);
dest.writeInt(captureFormat.getSampleRate());
dest.writeInt(captureFormat.getEncoding());