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

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

Snap for 6374421 from 4ab4a888 to rvc-d1-release

Change-Id: I0abf3581ac4c7657fcf2d7428521fb5dce450df1
parents 826cdc54 4ab4a888
Loading
Loading
Loading
Loading
+28 −5
Original line number Original line Diff line number Diff line
@@ -231,7 +231,11 @@ public class ProvisioningConfiguration {
     * InformationElements fields of ScanResult.
     * InformationElements fields of ScanResult.
     */
     */
    public static class ScanResultInfo {
    public static class ScanResultInfo {
        @NonNull
        private final String mSsid;
        private final String mSsid;
        @NonNull
        private final String mBssid;
        @NonNull
        private final List<InformationElement> mInformationElements;
        private final List<InformationElement> mInformationElements;


       /**
       /**
@@ -240,6 +244,7 @@ public class ProvisioningConfiguration {
        */
        */
        public static class InformationElement {
        public static class InformationElement {
            private final int mId;
            private final int mId;
            @NonNull
            private final byte[] mPayload;
            private final byte[] mPayload;


            public InformationElement(int id, @NonNull ByteBuffer payload) {
            public InformationElement(int id, @NonNull ByteBuffer payload) {
@@ -257,6 +262,7 @@ public class ProvisioningConfiguration {
           /**
           /**
            * Get the specific content of the information element.
            * Get the specific content of the information element.
            */
            */
            @NonNull
            public ByteBuffer getPayload() {
            public ByteBuffer getPayload() {
                return ByteBuffer.wrap(mPayload).asReadOnlyBuffer();
                return ByteBuffer.wrap(mPayload).asReadOnlyBuffer();
            }
            }
@@ -293,6 +299,7 @@ public class ProvisioningConfiguration {
             * Create an instance of {@link InformationElement} based on the contents of the
             * Create an instance of {@link InformationElement} based on the contents of the
             * specified {@link InformationElementParcelable}.
             * specified {@link InformationElementParcelable}.
             */
             */
            @Nullable
            public static InformationElement fromStableParcelable(InformationElementParcelable p) {
            public static InformationElement fromStableParcelable(InformationElementParcelable p) {
                if (p == null) return null;
                if (p == null) return null;
                return new InformationElement(p.id,
                return new InformationElement(p.id,
@@ -300,8 +307,12 @@ public class ProvisioningConfiguration {
            }
            }
        }
        }


        public ScanResultInfo(String ssid, @NonNull List<InformationElement> informationElements) {
        public ScanResultInfo(@NonNull String ssid, @NonNull String bssid,
                @NonNull List<InformationElement> informationElements) {
            Objects.requireNonNull(ssid, "ssid must not be null.");
            Objects.requireNonNull(bssid, "bssid must not be null.");
            mSsid = ssid;
            mSsid = ssid;
            mBssid = bssid;
            mInformationElements =
            mInformationElements =
                    Collections.unmodifiableList(new ArrayList<>(informationElements));
                    Collections.unmodifiableList(new ArrayList<>(informationElements));
        }
        }
@@ -309,13 +320,23 @@ public class ProvisioningConfiguration {
        /**
        /**
         * Get the scanned network name.
         * Get the scanned network name.
         */
         */
        @NonNull
        public String getSsid() {
        public String getSsid() {
            return mSsid;
            return mSsid;
        }
        }


        /**
         * Get the address of the access point.
         */
        @NonNull
        public String getBssid() {
            return mBssid;
        }

        /**
        /**
         * Get all information elements found in the beacon.
         * Get all information elements found in the beacon.
         */
         */
        @NonNull
        public List<InformationElement> getInformationElements() {
        public List<InformationElement> getInformationElements() {
            return mInformationElements;
            return mInformationElements;
        }
        }
@@ -324,6 +345,7 @@ public class ProvisioningConfiguration {
        public String toString() {
        public String toString() {
            StringBuffer str = new StringBuffer();
            StringBuffer str = new StringBuffer();
            str.append("SSID: ").append(mSsid);
            str.append("SSID: ").append(mSsid);
            str.append(", BSSID: ").append(mBssid);
            str.append(", Information Elements: {");
            str.append(", Information Elements: {");
            for (InformationElement ie : mInformationElements) {
            for (InformationElement ie : mInformationElements) {
                str.append("[").append(ie.toString()).append("]");
                str.append("[").append(ie.toString()).append("]");
@@ -338,12 +360,13 @@ public class ProvisioningConfiguration {
            if (!(o instanceof ScanResultInfo)) return false;
            if (!(o instanceof ScanResultInfo)) return false;
            ScanResultInfo other = (ScanResultInfo) o;
            ScanResultInfo other = (ScanResultInfo) o;
            return Objects.equals(mSsid, other.mSsid)
            return Objects.equals(mSsid, other.mSsid)
                    && Objects.equals(mBssid, other.mBssid)
                    && mInformationElements.equals(other.mInformationElements);
                    && mInformationElements.equals(other.mInformationElements);
        }
        }


        @Override
        @Override
        public int hashCode() {
        public int hashCode() {
            return Objects.hash(mSsid, mInformationElements);
            return Objects.hash(mSsid, mBssid, mInformationElements);
        }
        }


        /**
        /**
@@ -352,6 +375,7 @@ public class ProvisioningConfiguration {
        public ScanResultInfoParcelable toStableParcelable() {
        public ScanResultInfoParcelable toStableParcelable() {
            final ScanResultInfoParcelable p = new ScanResultInfoParcelable();
            final ScanResultInfoParcelable p = new ScanResultInfoParcelable();
            p.ssid = mSsid;
            p.ssid = mSsid;
            p.bssid = mBssid;
            p.informationElements = toParcelableArray(mInformationElements,
            p.informationElements = toParcelableArray(mInformationElements,
                    InformationElement::toStableParcelable, InformationElementParcelable.class);
                    InformationElement::toStableParcelable, InformationElementParcelable.class);
            return p;
            return p;
@@ -366,11 +390,10 @@ public class ProvisioningConfiguration {
            final List<InformationElement> ies = new ArrayList<InformationElement>();
            final List<InformationElement> ies = new ArrayList<InformationElement>();
            ies.addAll(fromParcelableArray(p.informationElements,
            ies.addAll(fromParcelableArray(p.informationElements,
                    InformationElement::fromStableParcelable));
                    InformationElement::fromStableParcelable));
            return new ScanResultInfo(p.ssid, ies);
            return new ScanResultInfo(p.ssid, p.bssid, ies);
        }
        }


        private static byte[] convertToByteArray(final ByteBuffer buffer) {
        private static byte[] convertToByteArray(@NonNull final ByteBuffer buffer) {
            if (buffer == null) return null;
            final byte[] bytes = new byte[buffer.limit()];
            final byte[] bytes = new byte[buffer.limit()];
            final ByteBuffer copy = buffer.asReadOnlyBuffer();
            final ByteBuffer copy = buffer.asReadOnlyBuffer();
            try {
            try {
+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ aidl_interface {
        "src/android/net/TcpKeepalivePacketDataParcelable.aidl",
        "src/android/net/TcpKeepalivePacketDataParcelable.aidl",
        "src/android/net/dhcp/DhcpLeaseParcelable.aidl",
        "src/android/net/dhcp/DhcpLeaseParcelable.aidl",
        "src/android/net/dhcp/DhcpServingParamsParcel.aidl",
        "src/android/net/dhcp/DhcpServingParamsParcel.aidl",
        "src/android/net/dhcp/IDhcpLeaseCallbacks.aidl",
        "src/android/net/dhcp/IDhcpEventCallbacks.aidl",
        "src/android/net/dhcp/IDhcpServer.aidl",
        "src/android/net/dhcp/IDhcpServer.aidl",
        "src/android/net/dhcp/IDhcpServerCallbacks.aidl",
        "src/android/net/dhcp/IDhcpServerCallbacks.aidl",
        "src/android/net/ip/IIpClient.aidl",
        "src/android/net/ip/IIpClient.aidl",
+1 −0
Original line number Original line Diff line number Diff line
@@ -18,5 +18,6 @@
package android.net;
package android.net;
parcelable ScanResultInfoParcelable {
parcelable ScanResultInfoParcelable {
  String ssid;
  String ssid;
  String bssid;
  android.net.InformationElementParcelable[] informationElements;
  android.net.InformationElementParcelable[] informationElements;
}
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
// later when a module using the interface is updated, e.g., Mainline modules.


package android.net.dhcp;
package android.net.dhcp;
interface IDhcpLeaseCallbacks {
interface IDhcpEventCallbacks {
  oneway void onLeasesChanged(in List<android.net.dhcp.DhcpLeaseParcelable> newLeases);
  oneway void onLeasesChanged(in List<android.net.dhcp.DhcpLeaseParcelable> newLeases);
  oneway void onNewPrefixRequest(in android.net.IpPrefix currentPrefix);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -19,7 +19,7 @@ package android.net.dhcp;
/* @hide */
/* @hide */
interface IDhcpServer {
interface IDhcpServer {
  oneway void start(in android.net.INetworkStackStatusCallback cb) = 0;
  oneway void start(in android.net.INetworkStackStatusCallback cb) = 0;
  oneway void startWithCallbacks(in android.net.INetworkStackStatusCallback statusCb, in android.net.dhcp.IDhcpLeaseCallbacks leaseCb) = 3;
  oneway void startWithCallbacks(in android.net.INetworkStackStatusCallback statusCb, in android.net.dhcp.IDhcpEventCallbacks eventCb) = 3;
  oneway void updateParams(in android.net.dhcp.DhcpServingParamsParcel params, in android.net.INetworkStackStatusCallback cb) = 1;
  oneway void updateParams(in android.net.dhcp.DhcpServingParamsParcel params, in android.net.INetworkStackStatusCallback cb) = 1;
  oneway void stop(in android.net.INetworkStackStatusCallback cb) = 2;
  oneway void stop(in android.net.INetworkStackStatusCallback cb) = 2;
  const int STATUS_UNKNOWN = 0;
  const int STATUS_UNKNOWN = 0;
Loading