Track latency of captive portal checks
When captive portal check occurs, track its latency, whether or not
we received a response, and whether or not the response was a captive
portal. Pair with information identifying the access point / base
station, and broadcast it (with a system|signature-protected
permission).
Broadcast only occurs if user has consented to
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE.
Change-Id: I6fd59954a7ee2cc7acedf064a1465882653b2173
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index a9a14ad..d106cf2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -201,6 +201,7 @@
<protected-broadcast android:name="android.net.wifi.p2p.PERSISTENT_GROUPS_CHANGED" />
<protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" />
<protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" />
+ <protected-broadcast android:name="android.net.conn.NETWORK_CONDITIONS_MEASURED" />
<protected-broadcast android:name="android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE" />
<protected-broadcast android:name="android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE" />
<protected-broadcast android:name="android.intent.action.AIRPLANE_MODE" />
@@ -2399,6 +2400,13 @@
android:description="@string/permdesc_invokeCarrierSetup"
android:protectionLevel="signature|system" />
+ <!-- Allows an application to listen for network condition observations.
+ @hide This is not a third-party API (intended for system apps). -->
+ <permission android:name="android.permission.ACCESS_NETWORK_CONDITIONS"
+ android:label="@string/permlab_accessNetworkConditions"
+ android:description="@string/permdesc_accessNetworkConditions"
+ android:protectionLevel="signature|system" />
+
<!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore -->
<uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>