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

Commit 94354e82 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Add FW support for CellInfo RIL commands." into jb-mr2-dev

parents 80768659 5fb811ff
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@ public abstract class BaseCommands implements CommandsInterface {
    protected RegistrantList mExitEmergencyCallbackModeRegistrants = new RegistrantList();
    protected RegistrantList mExitEmergencyCallbackModeRegistrants = new RegistrantList();
    protected RegistrantList mRilConnectedRegistrants = new RegistrantList();
    protected RegistrantList mRilConnectedRegistrants = new RegistrantList();
    protected RegistrantList mIccRefreshRegistrants = new RegistrantList();
    protected RegistrantList mIccRefreshRegistrants = new RegistrantList();
    protected RegistrantList mRilCellInfoListRegistrants = new RegistrantList();


    protected Registrant mGsmSmsRegistrant;
    protected Registrant mGsmSmsRegistrant;
    protected Registrant mCdmaSmsRegistrant;
    protected Registrant mCdmaSmsRegistrant;
@@ -706,6 +707,19 @@ public abstract class BaseCommands implements CommandsInterface {
        return TelephonyManager.getLteOnCdmaModeStatic();
        return TelephonyManager.getLteOnCdmaModeStatic();
    }
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public void registerForCellInfoList(Handler h, int what, Object obj) {
        Registrant r = new Registrant (h, what, obj);
        mRilCellInfoListRegistrants.add(r);
    }
    @Override
    public void unregisterForCellInfoList(Handler h) {
        mRilCellInfoListRegistrants.remove(h);
    }

    @Override
    @Override
    public void testingEmergencyCall() {}
    public void testingEmergencyCall() {}


+42 −2
Original line number Original line Diff line number Diff line
@@ -109,8 +109,6 @@ public interface CommandsInterface {
    //***** Methods
    //***** Methods
    RadioState getRadioState();
    RadioState getRadioState();


    void getVoiceRadioTechnology(Message result);

    /**
    /**
     * Fires on any RadioState transition
     * Fires on any RadioState transition
     * Always fires immediately as well
     * Always fires immediately as well
@@ -1572,6 +1570,48 @@ public interface CommandsInterface {
     */
     */
    public void requestIsimAuthentication(String nonce, Message response);
    public void requestIsimAuthentication(String nonce, Message response);


    /**
     * Get the current Voice Radio Technology.
     *
     * AsyncResult.result is an int array with the first value
     * being one of the ServiceState.RIL_RADIO_TECHNOLOGY_xxx values.
     *
     * @param result is sent back to handler and result.obj is a AsyncResult
     */
    void getVoiceRadioTechnology(Message result);

    /**
     * Return the current set of CellInfo records
     *
     * AsyncResult.result is a of Collection<CellInfo>
     *
     * @param result is sent back to handler and result.obj is a AsyncResult
     */
    void getCellInfoList(Message result);

    /**
     * Sets the minimum time in milli-seconds between when RIL_UNSOL_CELL_INFO_LIST
     * should be invoked.
     *
     * The default, 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 
     * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
     * A RIL_UNSOL_CELL_INFO_LIST.
     *
     * 

     * @param rateInMillis is sent back to handler and result.obj is a AsyncResult
     * @param response.obj is AsyncResult ar when sent to associated handler
     *                        ar.exception carries exception on failure or null on success
     *                        otherwise the error.
     */
    void setCellInfoListRate(int rateInMillis, Message response);

    /**
     * Fires when RIL_UNSOL_CELL_INFO_LIST is received from the RIL.
     */
    void registerForCellInfoList(Handler h, int what, Object obj);
    void unregisterForCellInfoList(Handler h);

    /**
    /**
     * Notifiy that we are testing an emergency call
     * Notifiy that we are testing an emergency call
     */
     */
+12 −0
Original line number Original line Diff line number Diff line
@@ -185,6 +185,18 @@ public interface Phone {
     */
     */
    public List<CellInfo> getAllCellInfo();
    public List<CellInfo> getAllCellInfo();


    /**
     * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
     * PhoneStateListener.onCellInfoChanged} will be invoked.
     *
     * The default, 0, means invoke onCellInfoChanged when any of the reported
     * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
     * A onCellInfoChanged.
     *
     * @param rateInMillis the rate
     */
    public void setCellInfoListRate(int rateInMillis);

    /**
    /**
     * Get the current for the default apn DataState. No change notification
     * Get the current for the default apn DataState. No change notification
     * exists at this interface -- use
     * exists at this interface -- use
+8 −0
Original line number Original line Diff line number Diff line
@@ -791,6 +791,14 @@ public abstract class PhoneBase extends Handler implements Phone {
        return getServiceStateTracker().getAllCellInfo();
        return getServiceStateTracker().getAllCellInfo();
    }
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public void setCellInfoListRate(int rateInMillis) {
        mCi.setCellInfoListRate(rateInMillis, null);
    }

    @Override
    @Override
    public boolean getMessageWaitingIndicator() {
    public boolean getMessageWaitingIndicator() {
        IccRecords r = mIccRecords.get();
        IccRecords r = mIccRecords.get();
+8 −0
Original line number Original line Diff line number Diff line
@@ -272,6 +272,14 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.getAllCellInfo();
        return mActivePhone.getAllCellInfo();
    }
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public void setCellInfoListRate(int rateInMillis) {
        mActivePhone.setCellInfoListRate(rateInMillis);
    }

    @Override
    @Override
    public PhoneConstants.DataState getDataConnectionState() {
    public PhoneConstants.DataState getDataConnectionState() {
        return mActivePhone.getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
        return mActivePhone.getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
Loading