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

Commit a78a08b1 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am ea75b822: am 234a5ef6: Merge "When the SIM_READY set current preferred...

am ea75b822: am 234a5ef6: Merge "When the SIM_READY set current preferred network type." into ics-mr1

* commit 'ea75b822':
  When the SIM_READY set current preferred network type.
parents 07c2c9f0 ea75b822
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -683,6 +683,13 @@ public abstract class BaseCommands implements CommandsInterface {
        mRilConnectedRegistrants.remove(h);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setCurrentPreferredNetworkType() {
    }

    //***** Protected Methods
    /**
     * Store new RadioState and send notification based on the changes
+6 −0
Original line number Diff line number Diff line
@@ -1310,6 +1310,12 @@ public interface CommandsInterface {
     */
    void queryAvailableBandMode (Message response);

    /**
     * Set the current preferred network type. This will be the last
     * networkType that was passed to setPreferredNetworkType.
     */
    void setCurrentPreferredNetworkType();

    /**
     *  Requests to set the preferred network type for searching and registering
     * (CS/PS domain, RAT, and operation mode)
+11 −0
Original line number Diff line number Diff line
@@ -1820,6 +1820,16 @@ public final class RIL extends BaseCommands implements CommandsInterface {
        send(rr);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setCurrentPreferredNetworkType() {
        if (RILJ_LOGD) riljLog("setCurrentPreferredNetworkType: " + mSetPreferredNetworkType);
        setPreferredNetworkType(mSetPreferredNetworkType, null);
    }
    private int mSetPreferredNetworkType;

    /**
     * {@inheritDoc}
     */
@@ -1830,6 +1840,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
        rr.mp.writeInt(1);
        rr.mp.writeInt(networkType);

        mSetPreferredNetworkType = networkType;
        mPreferredNetworkType = networkType;

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
+6 −0
Original line number Diff line number Diff line
@@ -257,6 +257,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            break;

        case EVENT_RUIM_READY:
            // TODO: Consider calling setCurrentPreferredNetworkType as we do in GsmSST.
            // cm.setCurrentPreferredNetworkType();

            // The RUIM is now ready i.e if it was locked it has been
            // unlocked. At this stage, the radio is already powered on.
            isSubscriptionFromRuim = true;
@@ -277,6 +280,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            break;

        case EVENT_NV_READY:
            // TODO: Consider calling setCurrentPreferredNetworkType as we do in GsmSST.
            // cm.setCurrentPreferredNetworkType();

            isSubscriptionFromRuim = false;
            // For Non-RUIM phones, the subscription information is stored in
            // Non Volatile. Here when Non-Volatile is ready, we can poll the CDMA
+3 −0
Original line number Diff line number Diff line
@@ -270,6 +270,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
                break;

            case EVENT_SIM_READY:
                // Set the network type, in case the radio does not restore it.
                cm.setCurrentPreferredNetworkType();

                // The SIM is now ready i.e if it was locked
                // it has been unlocked. At this stage, the radio is already
                // powered on.