summaryrefslogtreecommitdiffstats
path: root/wifi/java/android
diff options
context:
space:
mode:
authorvandwalle <vandwalle@google.com>2014-08-21 14:55:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-21 14:55:12 +0000
commitbeec21522de893edad1217059d1e3700a775593f (patch)
tree36639eb601e2cdde0a608c4eb5d32e73076f1be4 /wifi/java/android
parent94f6878bbd98753aa60fd80f5a73b5f198579b04 (diff)
parent612519db40db1bad7597ab207f14c9b5b5524a93 (diff)
downloadframeworks_base-beec21522de893edad1217059d1e3700a775593f.zip
frameworks_base-beec21522de893edad1217059d1e3700a775593f.tar.gz
frameworks_base-beec21522de893edad1217059d1e3700a775593f.tar.bz2
Merge "per bssid blacklist" into lmp-dev
Diffstat (limited to 'wifi/java/android')
-rw-r--r--wifi/java/android/net/wifi/ScanResult.java29
1 files changed, 23 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index a01a6b6..f2db206 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -106,7 +106,24 @@ public class ScanResult implements Parcelable {
* Status: indicating join status
* @hide
*/
- public int status;
+ public int autoJoinStatus;
+
+ /**
+ * @hide
+ * Last time we blacklisted the ScanResult
+ */
+ public long blackListTimestamp;
+
+ /** @hide **/
+ public void setAutoJoinStatus(int status) {
+ if (status < 0) status = 0;
+ if (status == 0) {
+ blackListTimestamp = 0;
+ } else if (status > autoJoinStatus) {
+ blackListTimestamp = System.currentTimeMillis();
+ }
+ autoJoinStatus = status;
+ }
/**
* Status: indicating the scan result is not a result
@@ -244,7 +261,7 @@ public class ScanResult implements Parcelable {
distanceSdCm = source.distanceSdCm;
seen = source.seen;
passpoint = source.passpoint;
- status = source.status;
+ autoJoinStatus = source.autoJoinStatus;
untrusted = source.untrusted;
numConnection = source.numConnection;
numUsage = source.numUsage;
@@ -282,8 +299,8 @@ public class ScanResult implements Parcelable {
append("(cm)");
sb.append(", passpoint: ").append(passpoint != null ? "yes" : "no");
- if (status != 0) {
- sb.append(", status: ").append(status);
+ if (autoJoinStatus != 0) {
+ sb.append(", status: ").append(autoJoinStatus);
}
return sb.toString();
}
@@ -309,7 +326,7 @@ public class ScanResult implements Parcelable {
dest.writeInt(distanceCm);
dest.writeInt(distanceSdCm);
dest.writeLong(seen);
- dest.writeInt(status);
+ dest.writeInt(autoJoinStatus);
dest.writeInt(untrusted ? 1 : 0);
dest.writeInt(numConnection);
dest.writeInt(numUsage);
@@ -350,7 +367,7 @@ public class ScanResult implements Parcelable {
in.readInt()
);
sr.seen = in.readLong();
- sr.status = in.readInt();
+ sr.autoJoinStatus = in.readInt();
sr.untrusted = in.readInt() != 0;
sr.numConnection = in.readInt();
sr.numUsage = in.readInt();