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

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

Snap for 6374630 from a4f3869e to sc-release

Change-Id: Idadf0fe89d426163c782d838e4b9a0e66cacedf7
parents 132b9eb5 a4f3869e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ java_defaults {
    libs: ["unsupportedappusage"],
    static_libs: [
        "androidx.annotation_annotation",
        "netd_aidl_interface-unstable-java",
        "netd_aidl_interface-V3-java",
        "netlink-client",
        "networkstack-client",
        "datastallprotosnano",
+28 −5
Original line number Diff line number Diff line
@@ -231,7 +231,11 @@ public class ProvisioningConfiguration {
     * InformationElements fields of ScanResult.
     */
    public static class ScanResultInfo {
        @NonNull
        private final String mSsid;
        @NonNull
        private final String mBssid;
        @NonNull
        private final List<InformationElement> mInformationElements;

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

            public InformationElement(int id, @NonNull ByteBuffer payload) {
@@ -257,6 +262,7 @@ public class ProvisioningConfiguration {
           /**
            * Get the specific content of the information element.
            */
            @NonNull
            public ByteBuffer getPayload() {
                return ByteBuffer.wrap(mPayload).asReadOnlyBuffer();
            }
@@ -293,6 +299,7 @@ public class ProvisioningConfiguration {
             * Create an instance of {@link InformationElement} based on the contents of the
             * specified {@link InformationElementParcelable}.
             */
            @Nullable
            public static InformationElement fromStableParcelable(InformationElementParcelable p) {
                if (p == null) return null;
                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;
            mBssid = bssid;
            mInformationElements =
                    Collections.unmodifiableList(new ArrayList<>(informationElements));
        }
@@ -309,13 +320,23 @@ public class ProvisioningConfiguration {
        /**
         * Get the scanned network name.
         */
        @NonNull
        public String getSsid() {
            return mSsid;
        }

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

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

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

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

        private static byte[] convertToByteArray(final ByteBuffer buffer) {
            if (buffer == null) return null;
        private static byte[] convertToByteArray(@NonNull final ByteBuffer buffer) {
            final byte[] bytes = new byte[buffer.limit()];
            final ByteBuffer copy = buffer.asReadOnlyBuffer();
            try {
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ aidl_interface {
    local_include_dir: "src",
    include_dirs: [
        "frameworks/base/core/java", // For framework parcelables.
        "frameworks/native/aidl/binder/android/os", // For PersistableBundle.aidl
        "frameworks/native/aidl/binder", // For PersistableBundle.aidl
        "frameworks/base/wifi/aidl-export", // For wifi parcelables.
    ],
    srcs: [
+1 −0
Original line number Diff line number Diff line
@@ -18,5 +18,6 @@
package android.net;
parcelable ScanResultInfoParcelable {
  String ssid;
  String bssid;
  android.net.InformationElementParcelable[] informationElements;
}
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.net;
import android.net.CaptivePortalData;
import android.net.INetworkMonitor;
import android.net.PrivateDnsConfigParcel;
import android.os.PersistableBundle;

/** @hide */
oneway interface INetworkMonitorCallbacks {
Loading