Merge "Add a hidden anqp field to ScanResult" into mm-wireless-dev
This commit is contained in:
committed by
Android Partner Code Review
commit
934b3b9c6c
@@ -18,7 +18,9 @@ package android.net.wifi;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Describes information about a detected access point. In addition
|
||||
@@ -299,6 +301,12 @@ public class ScanResult implements Parcelable {
|
||||
return freq > 4900 && freq < 5900;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* anqp lines from supplicant BSS response
|
||||
*/
|
||||
public List<String> anqpLines;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* storing the raw bytes of full result IEs
|
||||
@@ -518,6 +526,15 @@ public class ScanResult implements Parcelable {
|
||||
} else {
|
||||
dest.writeInt(0);
|
||||
}
|
||||
|
||||
if (anqpLines != null) {
|
||||
dest.writeInt(anqpLines.size());
|
||||
for (int i = 0; i < anqpLines.size(); i++) {
|
||||
dest.writeString(anqpLines.get(i));
|
||||
}
|
||||
} else {
|
||||
dest.writeInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@@ -565,6 +582,14 @@ public class ScanResult implements Parcelable {
|
||||
in.readByteArray(sr.informationElements[i].bytes);
|
||||
}
|
||||
}
|
||||
|
||||
n = in.readInt();
|
||||
if (n != 0) {
|
||||
sr.anqpLines = new ArrayList<String>();
|
||||
for (int i = 0; i < n; i++) {
|
||||
sr.anqpLines.add(in.readString());
|
||||
}
|
||||
}
|
||||
return sr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user