summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2017-01-17 16:23:13 -0800
committerNingyuan Wang <nywang@google.com>2017-01-17 16:23:48 -0800
commite2baeea02ca0cb4535282fff9da89cbe5d0044e5 (patch)
treee342be6d2e577ee19eb05cecedfd289ab6230b93 /service
parente4c4861e078e2e0fb2a6551859f4c44ee2634f2c (diff)
Remove extra writing of array length in NativeScanResult
Bug: 34359597 Test: compile Change-Id: I83009b33035f5c50d0adb321e840ad30894bfaf0
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/wificond/NativeScanResult.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/service/java/com/android/server/wifi/wificond/NativeScanResult.java b/service/java/com/android/server/wifi/wificond/NativeScanResult.java
index 8384cb081..d41237a85 100644
--- a/service/java/com/android/server/wifi/wificond/NativeScanResult.java
+++ b/service/java/com/android/server/wifi/wificond/NativeScanResult.java
@@ -62,11 +62,8 @@ public class NativeScanResult implements Parcelable {
/** implement Parcelable interface */
@Override
public void writeToParcel(Parcel out, int flags) {
- out.writeInt(ssid.length);
out.writeByteArray(ssid);
- out.writeInt(bssid.length);
out.writeByteArray(bssid);
- out.writeInt(infoElement.length);
out.writeByteArray(infoElement);
out.writeInt(frequency);
out.writeInt(signalMbm);
@@ -87,12 +84,9 @@ public class NativeScanResult implements Parcelable {
@Override
public NativeScanResult createFromParcel(Parcel in) {
NativeScanResult result = new NativeScanResult();
- result.ssid = new byte[in.readInt()];
- in.readByteArray(result.ssid);
- result.bssid = new byte[in.readInt()];
- in.readByteArray(result.bssid);
- result.infoElement = new byte[in.readInt()];
- in.readByteArray(result.infoElement);
+ result.ssid = in.createByteArray();
+ result.bssid = in.createByteArray();
+ result.infoElement = in.createByteArray();
result.frequency = in.readInt();
result.signalMbm = in.readInt();
result.tsf = in.readLong();