summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-06-25 13:51:47 -0700
committerHai Shalom <haishalom@google.com>2020-06-26 10:21:49 -0700
commitf42caa9a7b9c6961af5b6bc75ab88c074ee6e4cc (patch)
tree356232ddfa64874c6df678f23dae6965a23e28ed /service
parent6f1aafe2d4b979cf64ab7a5150a021f977cfed37 (diff)
[Passpoint] Add metrics to indicate OSU provisioned profile
Added a new boolean flag that indicates if the profile that is currently used for a connection was provisioned by an OSU server. Updated-PDD: TRUE Bug: 156117292 Test: atest WifiMetricsTest Test: dumpsys wifi Change-Id: Ia555f9791b15be06f4bc0765315ab34d261bcf07
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiMetrics.java7
-rw-r--r--service/proto/src/metrics.proto3
2 files changed, 9 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java
index 72c52bdd2..a7544e031 100644
--- a/service/java/com/android/server/wifi/WifiMetrics.java
+++ b/service/java/com/android/server/wifi/WifiMetrics.java
@@ -44,6 +44,7 @@ import android.os.Message;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Base64;
import android.util.Log;
@@ -1111,6 +1112,7 @@ public class WifiMetrics {
}
sb.append(", numConsecutiveConnectionFailure="
+ mConnectionEvent.numConsecutiveConnectionFailure);
+ sb.append(", isOsuProvisioned=" + mConnectionEvent.isOsuProvisioned);
}
return sb.toString();
}
@@ -1460,9 +1462,12 @@ public class WifiMetrics {
mBssidBlocklistMonitor.getNumBlockedBssidsForSsid(config.SSID);
mCurrentConnectionEvent.mConnectionEvent.networkType =
WifiMetricsProto.ConnectionEvent.TYPE_UNKNOWN;
+ mCurrentConnectionEvent.mConnectionEvent.isOsuProvisioned = false;
if (config.isPasspoint()) {
mCurrentConnectionEvent.mConnectionEvent.networkType =
WifiMetricsProto.ConnectionEvent.TYPE_PASSPOINT;
+ mCurrentConnectionEvent.mConnectionEvent.isOsuProvisioned =
+ !TextUtils.isEmpty(config.updateIdentifier);
} else if (WifiConfigurationUtil.isConfigForSaeNetwork(config)) {
mCurrentConnectionEvent.mConnectionEvent.networkType =
WifiMetricsProto.ConnectionEvent.TYPE_WPA3;
@@ -3097,7 +3102,7 @@ public class WifiMetrics {
for (ConnectionEvent event : mConnectionEventList) {
String eventLine = event.toString();
if (event == mCurrentConnectionEvent) {
- eventLine += "CURRENTLY OPEN EVENT";
+ eventLine += " CURRENTLY OPEN EVENT";
}
pw.println(eventLine);
}
diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto
index e7c0ec89a..9cb9244b9 100644
--- a/service/proto/src/metrics.proto
+++ b/service/proto/src/metrics.proto
@@ -1109,6 +1109,9 @@ message ConnectionEvent {
// middle won't break the streak count. The count is cleared after
// a network disconnection event.
optional int32 num_consecutive_connection_failure = 19 [default = -1];
+
+ // Indicates if the profile used for the connection was provisioned by Passpoint OSU server
+ optional bool is_osu_provisioned = 20;
}
// Number of occurrences of a specific RSSI poll rssi value