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

Commit 84de7198 authored by yinxu's avatar yinxu
Browse files

Add the NetworkScanRequestTracker

NetworkScanRequestTracker is part of the new network scan API
implementaion, which stores all the live and pending network scans
and handles the multiplexing of multiple scans.

Test: Telephony sanity tests
Bug: 30954762
Change-Id: I2fd9825f0a5ce3a2fd341cf8d2d9480af81716bd
parent a80b6738
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.os.WorkSource;
import android.service.carrier.CarrierIdentifier;
import android.telephony.ClientRequestStats;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.NetworkScanRequest;

import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo;
import com.android.internal.telephony.dataconnection.DataProfile;
@@ -1293,7 +1294,7 @@ public interface CommandsInterface {
     *
     * ((AsyncResult)response.obj).result is a NetworkScanResult object
     */
    void startNetworkScan(Message response);
    void startNetworkScan(NetworkScanRequest nsr, Message response);

    /**
     * Stops the ongoing network scan
+3 −2
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.telecom.VideoProfile;
import android.telephony.CarrierConfigManager;
import android.telephony.CellLocation;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.NetworkScanRequest;
import android.telephony.PhoneNumberUtils;
import android.telephony.Rlog;
import android.telephony.ServiceState;
@@ -1790,8 +1791,8 @@ public class GsmCdmaPhone extends Phone {
    }

    @Override
    public void startNetworkScan(Message response) {
        mCi.startNetworkScan(response);
    public void startNetworkScan(NetworkScanRequest nsr, Message response) {
        mCi.startNetworkScan(nsr, response);
    }

    @Override
+483 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.os.WorkSource;
import android.telephony.CarrierConfigManager;
import android.telephony.CellLocation;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.PhoneStateListener;
import android.telephony.NetworkScanRequest;
import android.telephony.ServiceState;

import com.android.internal.telephony.PhoneConstants.*; // ????
@@ -654,7 +654,7 @@ public interface PhoneInternalInterface {
     * on failure.</li>
     * </ul>
     */
    void startNetworkScan(Message response);
    void startNetworkScan(NetworkScanRequest nsr, Message response);

    /**
     * Stop ongoing network scan. This method is asynchronous; .
+1 −2
Original line number Diff line number Diff line
@@ -1778,7 +1778,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
    }

    @Override
    public void startNetworkScan(Message result) {
    public void startNetworkScan(NetworkScanRequest nsr, Message result) {
        IRadio radioProxy = getRadioProxy(result);
        if (radioProxy != null) {
            android.hardware.radio.V1_1.IRadio radioProxy11 =
@@ -1790,7 +1790,6 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    result.sendToTarget();
                }
            } else {
                NetworkScanRequest nsr = (NetworkScanRequest) result.obj;
                android.hardware.radio.V1_1.NetworkScanRequest request =
                        new android.hardware.radio.V1_1.NetworkScanRequest();
                request.type = nsr.scanType;
Loading