Remove unused event tags of IpConnectivityEvent
Bug: 28204408 Change-Id: I8de95add30cdf5c35c8129ee1b95d2d648b3316d
This commit is contained in:
@@ -26056,7 +26056,7 @@ package android.net.http {
|
||||
|
||||
package android.net.metrics {
|
||||
|
||||
public final class DefaultNetworkEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class DefaultNetworkEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logEvent(int, int[], int, boolean, boolean);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
@@ -26068,7 +26068,7 @@ package android.net.metrics {
|
||||
field public final int[] transportTypes;
|
||||
}
|
||||
|
||||
public final class DhcpClientEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class DhcpClientEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logStateEvent(java.lang.String, java.lang.String);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
@@ -26077,7 +26077,7 @@ package android.net.metrics {
|
||||
field public final java.lang.String msg;
|
||||
}
|
||||
|
||||
public final class DhcpErrorEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class DhcpErrorEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static int errorCodeWithOption(int, int);
|
||||
method public static void logParseError(java.lang.String, int);
|
||||
@@ -26107,7 +26107,7 @@ package android.net.metrics {
|
||||
field public final java.lang.String ifName;
|
||||
}
|
||||
|
||||
public final class DnsEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class DnsEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logEvent(int, byte[], byte[], int[]);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
@@ -26118,35 +26118,7 @@ package android.net.metrics {
|
||||
field public final byte[] returnCodes;
|
||||
}
|
||||
|
||||
public abstract class IpConnectivityEvent {
|
||||
ctor public IpConnectivityEvent();
|
||||
method public static void logEvent(int, T);
|
||||
field public static final int IPCE_CONSRV_BASE = 3072; // 0xc00
|
||||
field public static final int IPCE_CONSRV_DEFAULT_NET_CHANGE = 3072; // 0xc00
|
||||
field public static final int IPCE_DHCP_BASE = 1024; // 0x400
|
||||
field public static final int IPCE_DHCP_PARSE_ERROR = 1025; // 0x401
|
||||
field public static final int IPCE_DHCP_RECV_ERROR = 1024; // 0x400
|
||||
field public static final int IPCE_DHCP_STATE_CHANGE = 1026; // 0x402
|
||||
field public static final int IPCE_DNS_BASE = 5120; // 0x1400
|
||||
field public static final int IPCE_DNS_LOOKUPS = 5120; // 0x1400
|
||||
field public static final int IPCE_IPMGR_BASE = 4096; // 0x1000
|
||||
field public static final int IPCE_IPMGR_COMPLETE_LIFECYCLE = 4098; // 0x1002
|
||||
field public static final int IPCE_IPMGR_PROVISIONING_FAIL = 4097; // 0x1001
|
||||
field public static final int IPCE_IPMGR_PROVISIONING_OK = 4096; // 0x1000
|
||||
field public static final int IPCE_IPRM_BASE = 0; // 0x0
|
||||
field public static final int IPCE_IPRM_NUD_FAILED = 2; // 0x2
|
||||
field public static final int IPCE_IPRM_PROBE_FAILURE = 1; // 0x1
|
||||
field public static final int IPCE_IPRM_PROBE_STARTED = 0; // 0x0
|
||||
field public static final int IPCE_IPRM_PROVISIONING_LOST = 3; // 0x3
|
||||
field public static final int IPCE_NETMON_BASE = 2048; // 0x800
|
||||
field public static final int IPCE_NETMON_CAPPORT_FOUND = 2052; // 0x804
|
||||
field public static final int IPCE_NETMON_CHECK_RESULT = 2049; // 0x801
|
||||
field public static final int IPCE_NETMON_PORTAL_PROBE = 2051; // 0x803
|
||||
field public static final int IPCE_NETMON_STATE_CHANGE = 2048; // 0x800
|
||||
field public static final int IPCE_NETMON_VALIDATED = 2050; // 0x802
|
||||
}
|
||||
|
||||
public final class IpManagerEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class IpManagerEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logEvent(int, java.lang.String, long);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
@@ -26159,7 +26131,7 @@ package android.net.metrics {
|
||||
field public final java.lang.String ifName;
|
||||
}
|
||||
|
||||
public final class IpReachabilityEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class IpReachabilityEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logNudFailed(java.lang.String);
|
||||
method public static void logProbeEvent(java.lang.String, int);
|
||||
@@ -26173,7 +26145,7 @@ package android.net.metrics {
|
||||
field public final java.lang.String ifName;
|
||||
}
|
||||
|
||||
public final class NetworkEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class NetworkEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logCaptivePortalFound(int, long);
|
||||
method public static void logEvent(int, int);
|
||||
@@ -26192,7 +26164,7 @@ package android.net.metrics {
|
||||
field public final int netId;
|
||||
}
|
||||
|
||||
public final class ValidationProbeEvent extends android.net.metrics.IpConnectivityEvent implements android.os.Parcelable {
|
||||
public final class ValidationProbeEvent implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public static void logEvent(int, long, int, int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
|
||||
@@ -85,8 +85,6 @@ public final class DefaultNetworkEvent extends IpConnectivityEvent implements Pa
|
||||
|
||||
public static void logEvent(
|
||||
int netId, int[] transports, int prevNetId, boolean hadIPv4, boolean hadIPv6) {
|
||||
final DefaultNetworkEvent ev =
|
||||
new DefaultNetworkEvent(netId, transports, prevNetId, hadIPv4, hadIPv6);
|
||||
logEvent(IPCE_CONSRV_DEFAULT_NET_CHANGE, ev);
|
||||
logEvent(new DefaultNetworkEvent(netId, transports, prevNetId, hadIPv4, hadIPv6));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -64,6 +64,6 @@ public final class DhcpClientEvent extends IpConnectivityEvent implements Parcel
|
||||
};
|
||||
|
||||
public static void logStateEvent(String ifName, String state) {
|
||||
logEvent(IPCE_DHCP_STATE_CHANGE, new DhcpClientEvent(ifName, state));
|
||||
logEvent(new DhcpClientEvent(ifName, state));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -92,11 +92,11 @@ public final class DhcpErrorEvent extends IpConnectivityEvent implements Parcela
|
||||
};
|
||||
|
||||
public static void logParseError(String ifName, int errorCode) {
|
||||
logEvent(IPCE_DHCP_PARSE_ERROR, new DhcpErrorEvent(ifName, errorCode));
|
||||
logEvent(new DhcpErrorEvent(ifName, errorCode));
|
||||
}
|
||||
|
||||
public static void logReceiveError(String ifName) {
|
||||
logEvent(IPCE_DHCP_RECV_ERROR, new DhcpErrorEvent(ifName, RECEIVE_ERROR));
|
||||
logEvent(new DhcpErrorEvent(ifName, RECEIVE_ERROR));
|
||||
}
|
||||
|
||||
public static int errorCodeWithOption(int errorCode, int option) {
|
||||
|
||||
@@ -82,6 +82,6 @@ final public class DnsEvent extends IpConnectivityEvent implements Parcelable {
|
||||
|
||||
public static void logEvent(
|
||||
int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
|
||||
logEvent(IPCE_DNS_LOOKUPS, new DnsEvent(netId, eventTypes, returnCodes, latenciesMs));
|
||||
logEvent(new DnsEvent(netId, eventTypes, returnCodes, latenciesMs));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package android.net.metrics;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.net.ConnectivityMetricsLogger;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -24,50 +23,13 @@ import android.os.Parcelable;
|
||||
/**
|
||||
* {@hide}
|
||||
*/
|
||||
@SystemApi
|
||||
public abstract class IpConnectivityEvent {
|
||||
// IPRM = IpReachabilityMonitor
|
||||
// DHCP = DhcpClient
|
||||
// NETMON = NetworkMonitorEvent
|
||||
// CONSRV = ConnectivityServiceEvent
|
||||
// IPMGR = IpManager
|
||||
// DNS = DnsEvent
|
||||
public static final int IPCE_IPRM_BASE = 0 * 1024;
|
||||
public static final int IPCE_DHCP_BASE = 1 * 1024;
|
||||
public static final int IPCE_NETMON_BASE = 2 * 1024;
|
||||
public static final int IPCE_CONSRV_BASE = 3 * 1024;
|
||||
public static final int IPCE_IPMGR_BASE = 4 * 1024;
|
||||
public static final int IPCE_DNS_BASE = 5 * 1024;
|
||||
private static final int COMPONENT_TAG = ConnectivityMetricsLogger.COMPONENT_TAG_CONNECTIVITY;
|
||||
|
||||
public static final int IPCE_IPRM_PROBE_STARTED = IPCE_IPRM_BASE + 0;
|
||||
public static final int IPCE_IPRM_PROBE_FAILURE = IPCE_IPRM_BASE + 1;
|
||||
public static final int IPCE_IPRM_NUD_FAILED = IPCE_IPRM_BASE + 2;
|
||||
public static final int IPCE_IPRM_PROVISIONING_LOST = IPCE_IPRM_BASE + 3;
|
||||
private static final ConnectivityMetricsLogger sMetricsLogger = new ConnectivityMetricsLogger();
|
||||
|
||||
public static final int IPCE_DHCP_RECV_ERROR = IPCE_DHCP_BASE + 0;
|
||||
public static final int IPCE_DHCP_PARSE_ERROR = IPCE_DHCP_BASE + 1;
|
||||
public static final int IPCE_DHCP_STATE_CHANGE = IPCE_DHCP_BASE + 2;
|
||||
|
||||
public static final int IPCE_NETMON_STATE_CHANGE = IPCE_NETMON_BASE + 0;
|
||||
public static final int IPCE_NETMON_CHECK_RESULT = IPCE_NETMON_BASE + 1;
|
||||
public static final int IPCE_NETMON_VALIDATED = IPCE_NETMON_BASE + 2;
|
||||
public static final int IPCE_NETMON_PORTAL_PROBE = IPCE_NETMON_BASE + 3;
|
||||
public static final int IPCE_NETMON_CAPPORT_FOUND = IPCE_NETMON_BASE + 4;
|
||||
|
||||
public static final int IPCE_CONSRV_DEFAULT_NET_CHANGE = IPCE_CONSRV_BASE + 0;
|
||||
|
||||
public static final int IPCE_IPMGR_PROVISIONING_OK = IPCE_IPMGR_BASE + 0;
|
||||
public static final int IPCE_IPMGR_PROVISIONING_FAIL = IPCE_IPMGR_BASE + 1;
|
||||
public static final int IPCE_IPMGR_COMPLETE_LIFECYCLE = IPCE_IPMGR_BASE + 2;
|
||||
|
||||
public static final int IPCE_DNS_LOOKUPS = IPCE_DNS_BASE + 0;
|
||||
|
||||
private static ConnectivityMetricsLogger mMetricsLogger = new ConnectivityMetricsLogger();
|
||||
|
||||
public static <T extends IpConnectivityEvent & Parcelable> void logEvent(int tag, T event) {
|
||||
final long timestamp = System.currentTimeMillis();
|
||||
final int componentTag = ConnectivityMetricsLogger.COMPONENT_TAG_CONNECTIVITY;
|
||||
public static <T extends IpConnectivityEvent & Parcelable> void logEvent(T event) {
|
||||
// TODO: consider using different component for DNS event.
|
||||
mMetricsLogger.logEvent(timestamp, componentTag, tag, event);
|
||||
sMetricsLogger.logEvent(System.currentTimeMillis(), COMPONENT_TAG, 0, event);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ public final class IpManagerEvent extends IpConnectivityEvent implements Parcela
|
||||
};
|
||||
|
||||
public static void logEvent(int eventType, String ifName, long durationMs) {
|
||||
logEvent(IPCE_IPMGR_BASE, new IpManagerEvent(ifName, eventType, durationMs));
|
||||
logEvent(new IpManagerEvent(ifName, eventType, durationMs));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,17 +72,15 @@ public final class IpReachabilityEvent extends IpConnectivityEvent implements Pa
|
||||
};
|
||||
|
||||
public static void logProbeEvent(String ifName, int nlErrorCode) {
|
||||
final int tag = (nlErrorCode == 0) ? IPCE_IPRM_PROBE_STARTED : IPCE_IPRM_PROBE_FAILURE;
|
||||
final int eventType = PROBE | (nlErrorCode & 0xFF);
|
||||
logEvent(tag, new IpReachabilityEvent(ifName, eventType));
|
||||
logEvent(new IpReachabilityEvent(ifName, PROBE | (nlErrorCode & 0xFF)));
|
||||
}
|
||||
|
||||
public static void logNudFailed(String ifName) {
|
||||
logEvent(IPCE_IPRM_NUD_FAILED, new IpReachabilityEvent(ifName, NUD_FAILED));
|
||||
logEvent(new IpReachabilityEvent(ifName, NUD_FAILED));
|
||||
}
|
||||
|
||||
public static void logProvisioningLost(String ifName) {
|
||||
logEvent(IPCE_IPRM_PROVISIONING_LOST, new IpReachabilityEvent(ifName, PROVISIONING_LOST));
|
||||
logEvent(new IpReachabilityEvent(ifName, PROVISIONING_LOST));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,16 +75,15 @@ public final class NetworkEvent extends IpConnectivityEvent implements Parcelabl
|
||||
};
|
||||
|
||||
public static void logEvent(int netId, int eventType) {
|
||||
logEvent(IPCE_NETMON_STATE_CHANGE, new NetworkEvent(netId, eventType, 0));
|
||||
logEvent(new NetworkEvent(netId, eventType, 0));
|
||||
}
|
||||
|
||||
public static void logValidated(int netId, long durationMs) {
|
||||
logEvent(IPCE_NETMON_VALIDATED, new NetworkEvent(netId, NETWORK_VALIDATED, durationMs));
|
||||
logEvent(new NetworkEvent(netId, NETWORK_VALIDATED, durationMs));
|
||||
}
|
||||
|
||||
public static void logCaptivePortalFound(int netId, long durationMs) {
|
||||
final NetworkEvent ev = new NetworkEvent(netId, NETWORK_CAPTIVE_PORTAL_FOUND, durationMs);
|
||||
logEvent(IPCE_NETMON_CAPPORT_FOUND, ev);
|
||||
logEvent(new NetworkEvent(netId, NETWORK_CAPTIVE_PORTAL_FOUND, durationMs));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,8 +74,7 @@ public final class ValidationProbeEvent extends IpConnectivityEvent implements P
|
||||
};
|
||||
|
||||
public static void logEvent(int netId, long durationMs, int probeType, int returnCode) {
|
||||
logEvent(IPCE_NETMON_PORTAL_PROBE,
|
||||
new ValidationProbeEvent(netId, durationMs, probeType, returnCode));
|
||||
logEvent(new ValidationProbeEvent(netId, durationMs, probeType, returnCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user