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

Commit fd50dc77 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6412626 from 43c07847 to sc-release

Change-Id: I6987fc24fa848ee0e12edf3530a7bc5b8563342e
parents d1bb989c 43c07847
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ import java.util.Objects;

/** @hide */
public class Layer2Information {
    private final String mL2Key;
    private final String mGroupHint;
    private final MacAddress mBssid;
    public final String mL2Key;
    public final String mGroupHint;
    public final MacAddress mBssid;

    /**
     * Create a Layer2Information with the specified configuration.
@@ -60,7 +60,7 @@ public class Layer2Information {
     * Create an instance of {@link Layer2Information} based on the contents of the specified
     * {@link Layer2InformationParcelable}.
     */
    public Layer2Information fromStableParcelable(Layer2InformationParcelable p) {
    public static Layer2Information fromStableParcelable(Layer2InformationParcelable p) {
        if (p == null) return null;
        return new Layer2Information(p.l2Key, p.groupHint, p.bssid);
    }
+15 −1
Original line number Diff line number Diff line
@@ -218,6 +218,14 @@ public class ProvisioningConfiguration {
            return this;
        }

        /**
         * Specify the L2 information(bssid, l2key and groupHint) that the IpClient should use.
         */
        public Builder withLayer2Information(Layer2Information layer2Info) {
            mConfig.mLayer2Info = layer2Info;
            return this;
        }

        /**
         * Build the configuration using previously specified parameters.
         */
@@ -421,6 +429,7 @@ public class ProvisioningConfiguration {
    public Network mNetwork = null;
    public String mDisplayName = null;
    public ScanResultInfo mScanResultInfo;
    public Layer2Information mLayer2Info;

    public ProvisioningConfiguration() {} // used by Builder

@@ -441,6 +450,7 @@ public class ProvisioningConfiguration {
        mNetwork = other.mNetwork;
        mDisplayName = other.mDisplayName;
        mScanResultInfo = other.mScanResultInfo;
        mLayer2Info = other.mLayer2Info;
    }

    /**
@@ -464,6 +474,7 @@ public class ProvisioningConfiguration {
        p.network = mNetwork;
        p.displayName = mDisplayName;
        p.scanResultInfo = mScanResultInfo == null ? null : mScanResultInfo.toStableParcelable();
        p.layer2Info = mLayer2Info == null ? null : mLayer2Info.toStableParcelable();
        return p;
    }

@@ -490,6 +501,7 @@ public class ProvisioningConfiguration {
        config.mNetwork = p.network;
        config.mDisplayName = p.displayName;
        config.mScanResultInfo = ScanResultInfo.fromStableParcelable(p.scanResultInfo);
        config.mLayer2Info = Layer2Information.fromStableParcelable(p.layer2Info);
        return config;
    }

@@ -510,6 +522,7 @@ public class ProvisioningConfiguration {
                .add("mNetwork: " + mNetwork)
                .add("mDisplayName: " + mDisplayName)
                .add("mScanResultInfo: " + mScanResultInfo)
                .add("mLayer2Info: " + mLayer2Info)
                .toString();
    }

@@ -530,7 +543,8 @@ public class ProvisioningConfiguration {
                && mIPv6AddrGenMode == other.mIPv6AddrGenMode
                && Objects.equals(mNetwork, other.mNetwork)
                && Objects.equals(mDisplayName, other.mDisplayName)
                && Objects.equals(mScanResultInfo, other.mScanResultInfo);
                && Objects.equals(mScanResultInfo, other.mScanResultInfo)
                && Objects.equals(mLayer2Info, other.mLayer2Info);
    }

    public boolean isValid() {
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ public class NetlinkConstants {
    /* see <linux_src>/include/uapi/linux/sock_diag.h */
    public static final short SOCK_DIAG_BY_FAMILY = 20;

    // Netlink groups.
    public static final int RTNLGRP_ND_USEROPT = 20;
    public static final int RTMGRP_ND_USEROPT = 1 << (RTNLGRP_ND_USEROPT - 1);

    public static String stringForNlMsgType(short nlm_type) {
        switch (nlm_type) {
            case NLMSG_NOOP: return "NLMSG_NOOP";
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class StructNdOptPref64 extends NdOption {
     */
    public final int lifetime;
    /** The NAT64 prefix. */
    public final IpPrefix prefix;
    @NonNull public final IpPrefix prefix;

    static int plcToPrefixLength(int plc) {
        switch (plc) {
+1 −0
Original line number Diff line number Diff line
@@ -31,4 +31,5 @@ parcelable ProvisioningConfigurationParcelable {
  String displayName;
  boolean enablePreconnection;
  android.net.ScanResultInfoParcelable scanResultInfo;
  android.net.Layer2InformationParcelable layer2Info;
}
Loading