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

Commit 7e9295d2 authored by Ying Xu's avatar Ying Xu Committed by android-build-merger
Browse files

Merge "Check whether the bands and channels are null" am: 4e10aa21

am: 0939d5ec

Change-Id: I7539c5a3e18ead2a9ce3686dae50e418f9a8c0d4
parents aa850b8b 0939d5ec
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ public final class NetworkScanRequestTracker {
    }

    private boolean isValidScan(NetworkScanRequestInfo nsri) {
        if (nsri.mRequest.specifiers == null) {
            return false;
        }
        if (nsri.mRequest.specifiers.length > NetworkScanRequest.MAX_RADIO_ACCESS_NETWORKS) {
            return false;
        }
@@ -112,8 +115,10 @@ public final class NetworkScanRequestTracker {
                    && ras.radioAccessNetwork != EUTRAN) {
                return false;
            }
            if (ras.bands.length > NetworkScanRequest.MAX_BANDS
                    || ras.channels.length > NetworkScanRequest.MAX_CHANNELS) {
            if (ras.bands != null && ras.bands.length > NetworkScanRequest.MAX_BANDS) {
                return false;
            }
            if (ras.channels != null && ras.channels.length > NetworkScanRequest.MAX_CHANNELS) {
                return false;
            }
        }
+8 −4
Original line number Diff line number Diff line
@@ -1846,12 +1846,16 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                                    + " not supported!");
                            return;
                    }
                    if (ras.bands != null) {
                        for (int band : ras.bands) {
                            bands.add(band);
                        }
                    }
                    if (ras.channels != null) {
                        for (int channel : ras.channels) {
                            s.channels.add(channel);
                        }
                    }
                    request.specifiers.add(s);
                }