Fixed bad serialization code in ScanResult.

Bug: 26964162
Change-Id: Ie9ad65936ab5173533773e5a711bcb81799acfb5
This commit is contained in:
Jan Nordqvist
2016-02-03 14:26:21 -08:00
parent fd600b1113
commit 7a504417f2

View File

@@ -569,6 +569,9 @@ public class ScanResult implements Parcelable {
dest.writeString(anqpLines.get(i));
}
}
else {
dest.writeInt(0);
}
if (anqpElements != null) {
dest.writeInt(anqpElements.length);
for (AnqpInformationElement element : anqpElements) {
@@ -647,7 +650,7 @@ public class ScanResult implements Parcelable {
int len = in.readInt();
byte[] payload = new byte[len];
in.readByteArray(payload);
sr.anqpElements[n] =
sr.anqpElements[i] =
new AnqpInformationElement(vendorId, elementId, payload);
}
}