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

Commit 5494113f authored by Soonil Nagarkar's avatar Soonil Nagarkar Committed by Android (Google) Code Review
Browse files

Merge "Add ignoreLocationSettings to WifiScanner"

parents 1f081d34 1e59a5f3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3852,6 +3852,7 @@ package android.net.wifi {
    ctor public WifiScanner.ScanSettings();
    field public int band;
    field public android.net.wifi.WifiScanner.ChannelSpec[] channels;
    field public boolean ignoreLocationSettings;
    field public int maxPeriodInMs;
    field public int maxScansToCache;
    field public int numBssidsPerScan;
+10 −0
Original line number Diff line number Diff line
@@ -253,6 +253,14 @@ public class WifiScanner {
         */
        @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
        public int type = TYPE_LOW_LATENCY;
        /**
         * This scan request may ignore location settings while receiving scans. This should only
         * be used in emergency situations.
         * {@hide}
         */
        @SystemApi
        @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
        public boolean ignoreLocationSettings;

        /** Implement the Parcelable interface {@hide} */
        public int describeContents() {
@@ -270,6 +278,7 @@ public class WifiScanner {
            dest.writeInt(stepCount);
            dest.writeInt(isPnoScan ? 1 : 0);
            dest.writeInt(type);
            dest.writeInt(ignoreLocationSettings ? 1 : 0);
            if (channels != null) {
                dest.writeInt(channels.length);
                for (int i = 0; i < channels.length; i++) {
@@ -304,6 +313,7 @@ public class WifiScanner {
                        settings.stepCount = in.readInt();
                        settings.isPnoScan = in.readInt() == 1;
                        settings.type = in.readInt();
                        settings.ignoreLocationSettings = in.readInt() == 1;
                        int num_channels = in.readInt();
                        settings.channels = new ChannelSpec[num_channels];
                        for (int i = 0; i < num_channels; i++) {