Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99e19f05 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Fixes fatal linter errors in android.net.metrics am: 627b4249 am:...

Merge "Fixes fatal linter errors in android.net.metrics am: 627b4249 am: 4acf772e" into nyc-mr1-dev-plus-aosp
parents efe62464 22c78267
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -22,25 +22,27 @@ import android.os.Parcelable;
/**
 * {@hide}
 */
public class CaptivePortalCheckResultEvent extends IpConnectivityEvent implements Parcelable {
    public static final String TAG = "CaptivePortalCheckResultEvent";
public final class CaptivePortalCheckResultEvent extends IpConnectivityEvent implements Parcelable {
    public final int netId;
    public final int result;

    private int mNetId;
    private int mResult;

    public CaptivePortalCheckResultEvent(int netId, int result) {
        mNetId = netId;
        mResult = result;
    private CaptivePortalCheckResultEvent(int netId, int result) {
        this.netId = netId;
        this.result = result;
    }

    public CaptivePortalCheckResultEvent(Parcel in) {
        mNetId = in.readInt();
        mResult = in.readInt();
    private CaptivePortalCheckResultEvent(Parcel in) {
        this.netId = in.readInt();
        this.result = in.readInt();
    }

    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(mNetId);
        out.writeInt(mResult);
        out.writeInt(netId);
        out.writeInt(result);
    }

    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<CaptivePortalCheckResultEvent> CREATOR
@@ -55,7 +57,6 @@ public class CaptivePortalCheckResultEvent extends IpConnectivityEvent implement
        };

    public static void logEvent(int netId, int result) {
        IpConnectivityEvent.logEvent(IpConnectivityEvent.IPCE_NETMON_CHECK_RESULT,
                new CaptivePortalCheckResultEvent(netId, result));
        logEvent(IPCE_NETMON_CHECK_RESULT, new CaptivePortalCheckResultEvent(netId, result));
    }
};
+13 −11
Original line number Diff line number Diff line
@@ -22,24 +22,27 @@ import android.os.Parcelable;
/**
 * {@hide}
 */
public class CaptivePortalStateChangeEvent extends IpConnectivityEvent implements Parcelable {
    public static final String TAG = "CaptivePortalStateChangeEvent";

public final class CaptivePortalStateChangeEvent extends IpConnectivityEvent implements Parcelable {
    public static final int NETWORK_MONITOR_CONNECTED    = 0;
    public static final int NETWORK_MONITOR_DISCONNECTED = 1;
    public static final int NETWORK_MONITOR_VALIDATED    = 2;
    private int mState;

    public final int state;

    public CaptivePortalStateChangeEvent(int state) {
        mState = state;
        this.state = state;
    }

    public CaptivePortalStateChangeEvent(Parcel in) {
        mState = in.readInt();
        state = in.readInt();
    }

    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(mState);
        out.writeInt(state);
    }

    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<CaptivePortalStateChangeEvent> CREATOR
@@ -54,7 +57,6 @@ public class CaptivePortalStateChangeEvent extends IpConnectivityEvent implement
    };

    public static void logEvent(int state) {
        IpConnectivityEvent.logEvent(IpConnectivityEvent.IPCE_NETMON_STATE_CHANGE,
                new CaptivePortalStateChangeEvent(state));
        logEvent(IPCE_NETMON_STATE_CHANGE, new CaptivePortalStateChangeEvent(state));
    }
};
+29 −26
Original line number Diff line number Diff line
@@ -22,43 +22,46 @@ import android.os.Parcelable;
/**
 * {@hide}
 */
public class ConnectivityServiceChangeEvent extends IpConnectivityEvent implements Parcelable {
    public static final String TAG = "ConnectivityServiceChangeEvent";

public final class ConnectivityServiceChangeEvent extends IpConnectivityEvent
        implements Parcelable {
    // The ID of the network that has become the new default or NETID_UNSET if none.
    private final int mNetId;
    public final int netId;
    // The list of transport types of the new default network, for example TRANSPORT_WIFI, as
    // defined in NetworkCapabilities.java.
    private final int[] mTransportTypes;
    public final int[] transportTypes;
    // The ID of the network that was the default before or NETID_UNSET if none.
    private final int mPrevNetId;
    public final int prevNetId;
    // Whether the previous network had IPv4/IPv6 connectivity.
    private final boolean mPrevIPv4;
    private final boolean mPrevIPv6;
    public final boolean prevIPv4;
    public final boolean prevIPv6;

    public ConnectivityServiceChangeEvent(int netId, int[] transportTypes,
    private ConnectivityServiceChangeEvent(int netId, int[] transportTypes,
                int prevNetId, boolean prevIPv4, boolean prevIPv6) {
        mNetId = netId;
        mTransportTypes = transportTypes;
        mPrevNetId = prevNetId;
        mPrevIPv4 = prevIPv4;
        mPrevIPv6 = prevIPv6;
        this.netId = netId;
        this.transportTypes = transportTypes;
        this.prevNetId = prevNetId;
        this.prevIPv4 = prevIPv4;
        this.prevIPv6 = prevIPv6;
    }

    public ConnectivityServiceChangeEvent(Parcel in) {
        mNetId = in.readInt();
        mTransportTypes = in.createIntArray();
        mPrevNetId = in.readInt();
        mPrevIPv4 = (in.readByte() > 0);
        mPrevIPv6 = (in.readByte() > 0);
    private ConnectivityServiceChangeEvent(Parcel in) {
        this.netId = in.readInt();
        this.transportTypes = in.createIntArray();
        this.prevNetId = in.readInt();
        this.prevIPv4 = (in.readByte() > 0);
        this.prevIPv6 = (in.readByte() > 0);
    }

    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(mNetId);
        out.writeIntArray(mTransportTypes);
        out.writeInt(mPrevNetId);
        out.writeByte(mPrevIPv4 ? (byte) 1 : (byte) 0);
        out.writeByte(mPrevIPv6 ? (byte) 1 : (byte) 0);
        out.writeInt(netId);
        out.writeIntArray(transportTypes);
        out.writeInt(prevNetId);
        out.writeByte(prevIPv4 ? (byte) 1 : (byte) 0);
        out.writeByte(prevIPv6 ? (byte) 1 : (byte) 0);
    }

    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<ConnectivityServiceChangeEvent> CREATOR
@@ -74,7 +77,7 @@ public class ConnectivityServiceChangeEvent extends IpConnectivityEvent implemen

    public static void logEvent(int netId, int[] transportTypes,
            int prevNetId, boolean prevIPv4, boolean prevIPv6) {
        IpConnectivityEvent.logEvent(IpConnectivityEvent.IPCE_CONSRV_DEFAULT_NET_CHANGE,
        logEvent(IPCE_CONSRV_DEFAULT_NET_CHANGE,
                new ConnectivityServiceChangeEvent(
                        netId, transportTypes, prevNetId, prevIPv4, prevIPv6));
    }
+16 −14
Original line number Diff line number Diff line
@@ -22,25 +22,27 @@ import android.os.Parcelable;
/**
 * {@hide}
 */
public class DhcpClientEvent extends IpConnectivityEvent implements Parcelable {
    public static final String TAG = "DhcpClientEvent";
public final class DhcpClientEvent extends IpConnectivityEvent implements Parcelable {
    public final String ifName;
    public final String msg;

    private String mIfName;
    private String mMsg;

    public DhcpClientEvent(String ifName, String msg) {
        mIfName = ifName;
        mMsg = msg;
    private DhcpClientEvent(String ifName, String msg) {
        this.ifName = ifName;
        this.msg = msg;
    }

    public DhcpClientEvent(Parcel in) {
        mIfName = in.readString();
        mMsg = in.readString();
    private DhcpClientEvent(Parcel in) {
        this.ifName = in.readString();
        this.msg = in.readString();
    }

    public void writeToParcel(Parcel out, int flags) {
        out.writeString(mIfName);
        out.writeString(mMsg);
        out.writeString(ifName);
        out.writeString(msg);
    }

    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<DhcpClientEvent> CREATOR
@@ -55,6 +57,6 @@ public class DhcpClientEvent extends IpConnectivityEvent implements Parcelable {
    };

    public static void logStateEvent(String ifName, String state) {
        logEvent(IpConnectivityEvent.IPCE_DHCP_STATE_CHANGE, new DhcpClientEvent(ifName, state));
        logEvent(IPCE_DHCP_STATE_CHANGE, new DhcpClientEvent(ifName, state));
    }
};
+6 −4
Original line number Diff line number Diff line
@@ -22,9 +22,7 @@ import android.os.Parcelable;
/**
 * {@hide} Event class used to record error events when parsing DHCP response packets.
 */
public class DhcpErrorEvent extends IpConnectivityEvent implements Parcelable {
    public static final String TAG = "DhcpErrorEvent";

public final class DhcpErrorEvent extends IpConnectivityEvent implements Parcelable {
    public static final int L2_ERROR   = 1;
    public static final int L3_ERROR   = 2;
    public static final int L4_ERROR   = 3;
@@ -73,6 +71,10 @@ public class DhcpErrorEvent extends IpConnectivityEvent implements Parcelable {
        out.writeInt(errorCode);
    }

    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<DhcpErrorEvent> CREATOR
        = new Parcelable.Creator<DhcpErrorEvent>() {
        public DhcpErrorEvent createFromParcel(Parcel in) {
@@ -85,7 +87,7 @@ public class DhcpErrorEvent extends IpConnectivityEvent implements Parcelable {
    };

    public static void logParseError(String ifName, int errorCode) {
        IpConnectivityEvent.logEvent(IPCE_DHCP_PARSE_ERROR, new DhcpErrorEvent(ifName, errorCode));
        logEvent(IPCE_DHCP_PARSE_ERROR, new DhcpErrorEvent(ifName, errorCode));
    }

    public static void logReceiveError(String ifName) {
Loading