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

Commit e6786249 authored by Jan Nordqvist's avatar Jan Nordqvist Committed by android-build-merger
Browse files

Fixed bad serialization code in ScanResult.

am: 7a504417

* commit '7a504417':
  Fixed bad serialization code in ScanResult.
parents b5649ecd 7a504417
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -569,6 +569,9 @@ public class ScanResult implements Parcelable {
                dest.writeString(anqpLines.get(i));
                dest.writeString(anqpLines.get(i));
            }
            }
        }
        }
        else {
            dest.writeInt(0);
        }
        if (anqpElements != null) {
        if (anqpElements != null) {
            dest.writeInt(anqpElements.length);
            dest.writeInt(anqpElements.length);
            for (AnqpInformationElement element : anqpElements) {
            for (AnqpInformationElement element : anqpElements) {
@@ -647,7 +650,7 @@ public class ScanResult implements Parcelable {
                        int len = in.readInt();
                        int len = in.readInt();
                        byte[] payload = new byte[len];
                        byte[] payload = new byte[len];
                        in.readByteArray(payload);
                        in.readByteArray(payload);
                        sr.anqpElements[n] =
                        sr.anqpElements[i] =
                                new AnqpInformationElement(vendorId, elementId, payload);
                                new AnqpInformationElement(vendorId, elementId, payload);
                    }
                    }
                }
                }