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

Commit 77546ebf authored by Nathan Harold's avatar Nathan Harold
Browse files

Redirect getNeighboringCellInfo to CellInfo

Call getAllCellInfo instead of getNeighboringCellInfo
internally, to stop using the NeighboringCell HAL.
This will allow us to consolidate these API calls to
the modem into a single path, and enable us to remove
support for NeighboringCellInfo in a future release.

Bug: 62490173
Test: manually tested with SL4A using both P and P+
    target SDKs.

Change-Id: Ic8d2f65401785e7435601c0f4d3e432b07d218be
parent 1319e5b0
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1409,14 +1409,6 @@ public interface CommandsInterface {
     */
    void getPreferredNetworkType(Message response);

    /**
     * Query neighboring cell ids
     *
     * @param response s callback message to cell ids
     * @param workSource calling WorkSource
     */
    default void getNeighboringCids(Message response, WorkSource workSource){}

    /**
     * Request to enable/disable network state change notifications when
     * location information (lac and/or cid) has changed.
+0 −22
Original line number Diff line number Diff line
@@ -1928,28 +1928,6 @@ public class GsmCdmaPhone extends Phone {
        mCi.stopNetworkScan(response);
    }

    @Override
    public void getNeighboringCids(Message response, WorkSource workSource) {
        if (isPhoneTypeGsm()) {
            mCi.getNeighboringCids(response, workSource);
        } else {
            /*
             * This is currently not implemented.  At least as of June
             * 2009, there is no neighbor cell information available for
             * CDMA because some party is resisting making this
             * information readily available.  Consequently, calling this
             * function can have no useful effect.  This situation may
             * (and hopefully will) change in the future.
             */
            if (response != null) {
                CommandException ce = new CommandException(
                        CommandException.Error.REQUEST_NOT_SUPPORTED);
                AsyncResult.forMessage(response).exception = ce;
                response.sendToTarget();
            }
        }
    }

    @Override
    public void setTTYMode(int ttyMode, Message onComplete) {
        // Send out the TTY Mode change over RIL as well
+0 −14
Original line number Diff line number Diff line
@@ -725,20 +725,6 @@ public interface PhoneInternalInterface {
     */
    void stopNetworkScan(Message response);

    /**
     * Query neighboring cell IDs.  <code>response</code> is dispatched when
     * this is complete.  <code>response.obj</code> will be an AsyncResult,
     * and <code>response.obj.exception</code> will be non-null on failure.
     * On success, <code>AsyncResult.result</code> will be a <code>String[]</code>
     * containing the neighboring cell IDs.  Index 0 will contain the count
     * of available cell IDs.  Cell IDs are in hexadecimal format.
     *
     * @param response callback message that is dispatched when the query
     * completes.
     * @param workSource calling WorkSource
     */
    default void getNeighboringCids(Message response, WorkSource workSource){}

    /**
     * Mutes or unmutes the microphone for the active call. The microphone
     * is automatically unmuted if a call is answered, dialed, or resumed
+0 −18
Original line number Diff line number Diff line
@@ -2294,24 +2294,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    @Override
    public void getNeighboringCids(Message result, WorkSource workSource) {
        workSource = getDeafultWorkSourceIfInvalid(workSource);
        IRadio radioProxy = getRadioProxy(result);
        if (radioProxy != null) {
            RILRequest rr = obtainRequest(RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, result,
                    workSource);

            if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

            try {
                radioProxy.getNeighboringCids(rr.mSerial);
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "getNeighboringCids", e);
            }
        }
    }

    @Override
    public void setLocationUpdates(boolean enable, Message result) {
        IRadio radioProxy = getRadioProxy(result);
+0 −11
Original line number Diff line number Diff line
@@ -1193,17 +1193,6 @@ public class SimulatedCommands extends BaseCommands
        resultSuccess(result, ret);
    }

    @Override
    public void getNeighboringCids(Message result, WorkSource workSource) {
        int ret[] = new int[7];

        ret[0] = 6;
        for (int i = 1; i<7; i++) {
            ret[i] = i;
        }
        resultSuccess(result, ret);
    }

    @Override
    public void setLocationUpdates(boolean enable, Message response) {
        SimulatedCommandsVerifier.getInstance().setLocationUpdates(enable, response);
Loading