Add SystemApi for captive portal metrics
The metrics go through NetworkMonitor in the NetworkStack so that they can be upgraded to new metrics in the future. Test: flashed, captive portal login works, metrics shown in events log Bug: 112869080 Merged-In: I4bccfbd87bae5b2d65e45c7a5918aa45ab5d76e8 Change-Id: Ib5e2126788f8d56a00a56d7efcd33c5f9a37a6de
This commit is contained in:
@@ -117,4 +117,17 @@ public class CaptivePortal implements Parcelable {
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a captive portal login event.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public void logEvent(int eventId, String packageName) {
|
||||
try {
|
||||
ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ package android.net;
|
||||
*/
|
||||
oneway interface ICaptivePortal {
|
||||
void appResponse(int response);
|
||||
void logEvent(int eventId, String packageName);
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ oneway interface INetworkMonitorCallbacks {
|
||||
void notifyPrivateDnsConfigResolved(in PrivateDnsConfigParcel config);
|
||||
void showProvisioningNotification(String action);
|
||||
void hideProvisioningNotification();
|
||||
void logCaptivePortalLoginEvent(int eventId, String packageName);
|
||||
}
|
||||
Reference in New Issue
Block a user