Loading telephony/java/com/android/internal/telephony/BaseCommands.java +4 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,10 @@ public abstract class BaseCommands implements CommandsInterface { protected Registrant mRestrictedStateRegistrant; protected Registrant mGsmBroadcastSmsRegistrant; // Network Mode received from PhoneFactory protected int mNetworkMode; // Preferred network type received from PhoneFactory. // This is used when establishing a connection to the // vendor ril so it starts up in the correct mode. protected int mPreferredNetworkType; // CDMA subscription received from PhoneFactory protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by CDMAPhone or GSMPhone. Loading telephony/java/com/android/internal/telephony/RIL.java +19 −5 Original line number Diff line number Diff line Loading @@ -612,14 +612,14 @@ public final class RIL extends BaseCommands implements CommandsInterface { //***** Constructors public RIL(Context context, int networkMode, int cdmaSubscription) { public RIL(Context context, int preferredNetworkType, int cdmaSubscription) { super(context); if (RILJ_LOGD) { riljLog("RIL(context, networkMode=" + networkMode + riljLog("RIL(context, preferredNetworkType=" + preferredNetworkType + " cdmaSubscription=" + cdmaSubscription + ")"); } mCdmaSubscription = cdmaSubscription; mNetworkMode = networkMode; mPreferredNetworkType = preferredNetworkType; mPhoneType = RILConstants.NO_PHONE; PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); Loading Loading @@ -1814,6 +1814,8 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.mp.writeInt(1); rr.mp.writeInt(networkType); mPreferredNetworkType = networkType; if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " : " + networkType); Loading Loading @@ -2223,7 +2225,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { case RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM: ret = responseInts(p); break; case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: ret = responseVoid(p); break; case RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE: ret = responseVoid(p); break; case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret = responseInts(p); break; case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret = responseGetPreferredNetworkType(p); break; case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: ret = responseCellList(p); break; case RIL_REQUEST_SET_LOCATION_UPDATES: ret = responseVoid(p); break; case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE: ret = responseVoid(p); break; Loading Loading @@ -2738,7 +2740,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // Initial conditions setRadioPower(false, null); setPreferredNetworkType(mNetworkMode, null); setPreferredNetworkType(mPreferredNetworkType, null); setCdmaSubscriptionSource(mCdmaSubscription, null); notifyRegistrantsRilConnectionChanged(((int[])ret)[0]); break; Loading Loading @@ -3162,6 +3164,18 @@ public final class RIL extends BaseCommands implements CommandsInterface { return response; } private Object responseGetPreferredNetworkType(Parcel p) { int [] response = (int[]) responseInts(p); if (response.length >= 1) { // Since this is the response for getPreferredNetworkType // we'll assume that it should be the value we want the // vendor ril to take if we reestablish a connection to it. mPreferredNetworkType = response[0]; } return response; } private Object responseGmsBroadcastConfig(Parcel p) { int num; ArrayList<SmsBroadcastConfigInfo> response; Loading Loading
telephony/java/com/android/internal/telephony/BaseCommands.java +4 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,10 @@ public abstract class BaseCommands implements CommandsInterface { protected Registrant mRestrictedStateRegistrant; protected Registrant mGsmBroadcastSmsRegistrant; // Network Mode received from PhoneFactory protected int mNetworkMode; // Preferred network type received from PhoneFactory. // This is used when establishing a connection to the // vendor ril so it starts up in the correct mode. protected int mPreferredNetworkType; // CDMA subscription received from PhoneFactory protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by CDMAPhone or GSMPhone. Loading
telephony/java/com/android/internal/telephony/RIL.java +19 −5 Original line number Diff line number Diff line Loading @@ -612,14 +612,14 @@ public final class RIL extends BaseCommands implements CommandsInterface { //***** Constructors public RIL(Context context, int networkMode, int cdmaSubscription) { public RIL(Context context, int preferredNetworkType, int cdmaSubscription) { super(context); if (RILJ_LOGD) { riljLog("RIL(context, networkMode=" + networkMode + riljLog("RIL(context, preferredNetworkType=" + preferredNetworkType + " cdmaSubscription=" + cdmaSubscription + ")"); } mCdmaSubscription = cdmaSubscription; mNetworkMode = networkMode; mPreferredNetworkType = preferredNetworkType; mPhoneType = RILConstants.NO_PHONE; PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); Loading Loading @@ -1814,6 +1814,8 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.mp.writeInt(1); rr.mp.writeInt(networkType); mPreferredNetworkType = networkType; if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " : " + networkType); Loading Loading @@ -2223,7 +2225,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { case RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM: ret = responseInts(p); break; case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: ret = responseVoid(p); break; case RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE: ret = responseVoid(p); break; case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret = responseInts(p); break; case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret = responseGetPreferredNetworkType(p); break; case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: ret = responseCellList(p); break; case RIL_REQUEST_SET_LOCATION_UPDATES: ret = responseVoid(p); break; case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE: ret = responseVoid(p); break; Loading Loading @@ -2738,7 +2740,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // Initial conditions setRadioPower(false, null); setPreferredNetworkType(mNetworkMode, null); setPreferredNetworkType(mPreferredNetworkType, null); setCdmaSubscriptionSource(mCdmaSubscription, null); notifyRegistrantsRilConnectionChanged(((int[])ret)[0]); break; Loading Loading @@ -3162,6 +3164,18 @@ public final class RIL extends BaseCommands implements CommandsInterface { return response; } private Object responseGetPreferredNetworkType(Parcel p) { int [] response = (int[]) responseInts(p); if (response.length >= 1) { // Since this is the response for getPreferredNetworkType // we'll assume that it should be the value we want the // vendor ril to take if we reestablish a connection to it. mPreferredNetworkType = response[0]; } return response; } private Object responseGmsBroadcastConfig(Parcel p) { int num; ArrayList<SmsBroadcastConfigInfo> response; Loading