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

Commit 4e10aa21 authored by Ying Xu's avatar Ying Xu Committed by Gerrit Code Review
Browse files

Merge "Check whether the bands and channels are null"

parents 032cbc9b c771233f
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
@@ -1814,12 +1814,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);
                }