am 234a5ef6: Merge "When the SIM_READY set current preferred network type." into ics-mr1
* commit '234a5ef66275087aff9cfb94adc7608e9f358f11': When the SIM_READY set current preferred network type.
This commit is contained in:
@@ -683,6 +683,13 @@ public abstract class BaseCommands implements CommandsInterface {
|
|||||||
mRilConnectedRegistrants.remove(h);
|
mRilConnectedRegistrants.remove(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setCurrentPreferredNetworkType() {
|
||||||
|
}
|
||||||
|
|
||||||
//***** Protected Methods
|
//***** Protected Methods
|
||||||
/**
|
/**
|
||||||
* Store new RadioState and send notification based on the changes
|
* Store new RadioState and send notification based on the changes
|
||||||
|
|||||||
@@ -1310,6 +1310,12 @@ public interface CommandsInterface {
|
|||||||
*/
|
*/
|
||||||
void queryAvailableBandMode (Message response);
|
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
|
* Requests to set the preferred network type for searching and registering
|
||||||
* (CS/PS domain, RAT, and operation mode)
|
* (CS/PS domain, RAT, and operation mode)
|
||||||
|
|||||||
@@ -1820,6 +1820,16 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
send(rr);
|
send(rr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setCurrentPreferredNetworkType() {
|
||||||
|
if (RILJ_LOGD) riljLog("setCurrentPreferredNetworkType: " + mSetPreferredNetworkType);
|
||||||
|
setPreferredNetworkType(mSetPreferredNetworkType, null);
|
||||||
|
}
|
||||||
|
private int mSetPreferredNetworkType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@@ -1830,6 +1840,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
rr.mp.writeInt(1);
|
rr.mp.writeInt(1);
|
||||||
rr.mp.writeInt(networkType);
|
rr.mp.writeInt(networkType);
|
||||||
|
|
||||||
|
mSetPreferredNetworkType = networkType;
|
||||||
mPreferredNetworkType = networkType;
|
mPreferredNetworkType = networkType;
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
|
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
|
||||||
|
|||||||
@@ -257,6 +257,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_RUIM_READY:
|
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
|
// The RUIM is now ready i.e if it was locked it has been
|
||||||
// unlocked. At this stage, the radio is already powered on.
|
// unlocked. At this stage, the radio is already powered on.
|
||||||
isSubscriptionFromRuim = true;
|
isSubscriptionFromRuim = true;
|
||||||
@@ -277,6 +280,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_NV_READY:
|
case EVENT_NV_READY:
|
||||||
|
// TODO: Consider calling setCurrentPreferredNetworkType as we do in GsmSST.
|
||||||
|
// cm.setCurrentPreferredNetworkType();
|
||||||
|
|
||||||
isSubscriptionFromRuim = false;
|
isSubscriptionFromRuim = false;
|
||||||
// For Non-RUIM phones, the subscription information is stored in
|
// For Non-RUIM phones, the subscription information is stored in
|
||||||
// Non Volatile. Here when Non-Volatile is ready, we can poll the CDMA
|
// Non Volatile. Here when Non-Volatile is ready, we can poll the CDMA
|
||||||
|
|||||||
@@ -270,6 +270,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_SIM_READY:
|
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
|
// The SIM is now ready i.e if it was locked
|
||||||
// it has been unlocked. At this stage, the radio is already
|
// it has been unlocked. At this stage, the radio is already
|
||||||
// powered on.
|
// powered on.
|
||||||
|
|||||||
Reference in New Issue
Block a user