Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75b433f7 authored by Eric Laurent's avatar Eric Laurent
Browse files

SoundTrigger: fix KeyphraseRecognitionEvent parceling

Always include the Audioformat in the parcel if not
null.

Bug: 17489186.
Change-Id: I8bea031942b55078e5637959d5bf70961d134733
parent d6adcef9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -873,7 +873,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();
@@ -899,7 +899,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());