Loading src/java/com/android/internal/telephony/BaseCommands.java +4 −9 Original line number Diff line number Diff line Loading @@ -102,8 +102,8 @@ public abstract class BaseCommands implements CommandsInterface { protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone. protected int mPhoneType; // RIL Version protected int mRilVersion = -1; // RIL connected protected boolean mRilConnected = false; public BaseCommands(Context context) { mContext = context; // May be null (if so we won't log statistics) Loading Loading @@ -736,8 +736,8 @@ public abstract class BaseCommands implements CommandsInterface { public void registerForRilConnected(Handler h, int what, Object obj) { Registrant r = new Registrant (h, what, obj); mRilConnectedRegistrants.add(r); if (mRilVersion != -1) { r.notifyRegistrant(new AsyncResult(null, new Integer(mRilVersion), null)); if (mRilConnected) { r.notifyRegistrant(new AsyncResult(null, null, null)); } } Loading Loading @@ -836,11 +836,6 @@ public abstract class BaseCommands implements CommandsInterface { @Override public void testingEmergencyCall() {} @Override public int getRilVersion() { return mRilVersion; } public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message response) { } Loading src/java/com/android/internal/telephony/CommandsInterface.java +0 −5 Original line number Diff line number Diff line Loading @@ -1886,11 +1886,6 @@ public interface CommandsInterface { */ void getHardwareConfig (Message result); /** * @return version of the ril. */ int getRilVersion(); /** * Sets user selected subscription at Modem. * Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +20 −51 Original line number Diff line number Diff line Loading @@ -180,7 +180,6 @@ public class GsmCdmaPhone extends Phone { private boolean mResetModemOnRadioTechnologyChange = false; private int mRilVersion; private boolean mBroadcastEmergencyCallStateChanges = false; // Constructors Loading Loading @@ -255,7 +254,6 @@ public class GsmCdmaPhone extends Phone { mResetModemOnRadioTechnologyChange = SystemProperties.getBoolean( TelephonyProperties.PROPERTY_RESET_ON_RADIO_TECH_CHANGE, false); mCi.registerForRilConnected(this, EVENT_RIL_CONNECTED, null); mCi.registerForVoiceRadioTechChanged(this, EVENT_VOICE_RADIO_TECH_CHANGED, null); mContext.registerReceiver(mBroadcastReceiver, new IntentFilter( CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)); Loading Loading @@ -2060,16 +2058,6 @@ public class GsmCdmaPhone extends Phone { handleRadioOn(); break; case EVENT_RIL_CONNECTED: ar = (AsyncResult) msg.obj; if (ar.exception == null && ar.result != null) { mRilVersion = (Integer) ar.result; } else { logd("Unexpected exception on EVENT_RIL_CONNECTED"); mRilVersion = -1; } break; case EVENT_VOICE_RADIO_TECH_CHANGED: case EVENT_REQUEST_VOICE_RADIO_TECH_DONE: String what = (msg.what == EVENT_VOICE_RADIO_TECH_CHANGED) ? Loading Loading @@ -3054,24 +3042,6 @@ public class GsmCdmaPhone extends Phone { } } if(mRilVersion == 6 && getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) { /* * On v6 RIL, when LTE_ON_CDMA is TRUE, always create CDMALTEPhone * irrespective of the voice radio tech reported. */ if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { logd("phoneObjectUpdater: LTE ON CDMA property is set. Use CDMA Phone" + " newVoiceRadioTech=" + newVoiceRadioTech + " mActivePhone=" + getPhoneName()); return; } else { logd("phoneObjectUpdater: LTE ON CDMA property is set. Switch to CDMALTEPhone" + " newVoiceRadioTech=" + newVoiceRadioTech + " mActivePhone=" + getPhoneName()); newVoiceRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT; } } else { // If the device is shutting down, then there is no need to switch to the new phone // which might send unnecessary attach request to the modem. if (isShuttingDown()) { Loading @@ -3094,7 +3064,6 @@ public class GsmCdmaPhone extends Phone { " doesn't match either CDMA or GSM - error! No phone change"); return; } } if (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) { // We need some voice phone object to be active always, so never Loading src/java/com/android/internal/telephony/Phone.java +0 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private static final int EVENT_CHECK_FOR_NETWORK_AUTOMATIC = 38; protected static final int EVENT_VOICE_RADIO_TECH_CHANGED = 39; protected static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE = 40; protected static final int EVENT_RIL_CONNECTED = 41; protected static final int EVENT_UPDATE_PHONE_OBJECT = 42; protected static final int EVENT_CARRIER_CONFIG_CHANGED = 43; // Carrier's CDMA prefer mode setting Loading src/java/com/android/internal/telephony/RIL.java +5 −8 Original line number Diff line number Diff line Loading @@ -736,9 +736,6 @@ public final class RIL extends BaseCommands implements CommandsInterface { }} catch (Throwable tr) { Rlog.e(RILJ_LOG_TAG,"Uncaught exception", tr); } /* We're disconnected so we don't know the ril version */ notifyRegistrantsRilConnectionChanged(-1); } } Loading Loading @@ -783,6 +780,9 @@ public final class RIL extends BaseCommands implements CommandsInterface { private void resetProxyAndRequestList() { mRadioProxy = null; mOemHookProxy = null; setRadioState(RadioState.RADIO_UNAVAILABLE); RILRequest.resetSerial(); // Clear request list on close clearRequestList(RADIO_NOT_AVAILABLE, false); Loading Loading @@ -4494,14 +4494,11 @@ public final class RIL extends BaseCommands implements CommandsInterface { /** * Notify all registrants that the ril has connected or disconnected. * * @param rilVer is the version of the ril or -1 if disconnected. */ void notifyRegistrantsRilConnectionChanged(int rilVer) { mRilVersion = rilVer; void notifyRegistrantsRilConnected() { if (mRilConnectedRegistrants != null) { mRilConnectedRegistrants.notifyRegistrants( new AsyncResult(null, new Integer(rilVer), null)); new AsyncResult(null, null, null)); } } Loading Loading
src/java/com/android/internal/telephony/BaseCommands.java +4 −9 Original line number Diff line number Diff line Loading @@ -102,8 +102,8 @@ public abstract class BaseCommands implements CommandsInterface { protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone. protected int mPhoneType; // RIL Version protected int mRilVersion = -1; // RIL connected protected boolean mRilConnected = false; public BaseCommands(Context context) { mContext = context; // May be null (if so we won't log statistics) Loading Loading @@ -736,8 +736,8 @@ public abstract class BaseCommands implements CommandsInterface { public void registerForRilConnected(Handler h, int what, Object obj) { Registrant r = new Registrant (h, what, obj); mRilConnectedRegistrants.add(r); if (mRilVersion != -1) { r.notifyRegistrant(new AsyncResult(null, new Integer(mRilVersion), null)); if (mRilConnected) { r.notifyRegistrant(new AsyncResult(null, null, null)); } } Loading Loading @@ -836,11 +836,6 @@ public abstract class BaseCommands implements CommandsInterface { @Override public void testingEmergencyCall() {} @Override public int getRilVersion() { return mRilVersion; } public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message response) { } Loading
src/java/com/android/internal/telephony/CommandsInterface.java +0 −5 Original line number Diff line number Diff line Loading @@ -1886,11 +1886,6 @@ public interface CommandsInterface { */ void getHardwareConfig (Message result); /** * @return version of the ril. */ int getRilVersion(); /** * Sets user selected subscription at Modem. * Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +20 −51 Original line number Diff line number Diff line Loading @@ -180,7 +180,6 @@ public class GsmCdmaPhone extends Phone { private boolean mResetModemOnRadioTechnologyChange = false; private int mRilVersion; private boolean mBroadcastEmergencyCallStateChanges = false; // Constructors Loading Loading @@ -255,7 +254,6 @@ public class GsmCdmaPhone extends Phone { mResetModemOnRadioTechnologyChange = SystemProperties.getBoolean( TelephonyProperties.PROPERTY_RESET_ON_RADIO_TECH_CHANGE, false); mCi.registerForRilConnected(this, EVENT_RIL_CONNECTED, null); mCi.registerForVoiceRadioTechChanged(this, EVENT_VOICE_RADIO_TECH_CHANGED, null); mContext.registerReceiver(mBroadcastReceiver, new IntentFilter( CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)); Loading Loading @@ -2060,16 +2058,6 @@ public class GsmCdmaPhone extends Phone { handleRadioOn(); break; case EVENT_RIL_CONNECTED: ar = (AsyncResult) msg.obj; if (ar.exception == null && ar.result != null) { mRilVersion = (Integer) ar.result; } else { logd("Unexpected exception on EVENT_RIL_CONNECTED"); mRilVersion = -1; } break; case EVENT_VOICE_RADIO_TECH_CHANGED: case EVENT_REQUEST_VOICE_RADIO_TECH_DONE: String what = (msg.what == EVENT_VOICE_RADIO_TECH_CHANGED) ? Loading Loading @@ -3054,24 +3042,6 @@ public class GsmCdmaPhone extends Phone { } } if(mRilVersion == 6 && getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) { /* * On v6 RIL, when LTE_ON_CDMA is TRUE, always create CDMALTEPhone * irrespective of the voice radio tech reported. */ if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { logd("phoneObjectUpdater: LTE ON CDMA property is set. Use CDMA Phone" + " newVoiceRadioTech=" + newVoiceRadioTech + " mActivePhone=" + getPhoneName()); return; } else { logd("phoneObjectUpdater: LTE ON CDMA property is set. Switch to CDMALTEPhone" + " newVoiceRadioTech=" + newVoiceRadioTech + " mActivePhone=" + getPhoneName()); newVoiceRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT; } } else { // If the device is shutting down, then there is no need to switch to the new phone // which might send unnecessary attach request to the modem. if (isShuttingDown()) { Loading @@ -3094,7 +3064,6 @@ public class GsmCdmaPhone extends Phone { " doesn't match either CDMA or GSM - error! No phone change"); return; } } if (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) { // We need some voice phone object to be active always, so never Loading
src/java/com/android/internal/telephony/Phone.java +0 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private static final int EVENT_CHECK_FOR_NETWORK_AUTOMATIC = 38; protected static final int EVENT_VOICE_RADIO_TECH_CHANGED = 39; protected static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE = 40; protected static final int EVENT_RIL_CONNECTED = 41; protected static final int EVENT_UPDATE_PHONE_OBJECT = 42; protected static final int EVENT_CARRIER_CONFIG_CHANGED = 43; // Carrier's CDMA prefer mode setting Loading
src/java/com/android/internal/telephony/RIL.java +5 −8 Original line number Diff line number Diff line Loading @@ -736,9 +736,6 @@ public final class RIL extends BaseCommands implements CommandsInterface { }} catch (Throwable tr) { Rlog.e(RILJ_LOG_TAG,"Uncaught exception", tr); } /* We're disconnected so we don't know the ril version */ notifyRegistrantsRilConnectionChanged(-1); } } Loading Loading @@ -783,6 +780,9 @@ public final class RIL extends BaseCommands implements CommandsInterface { private void resetProxyAndRequestList() { mRadioProxy = null; mOemHookProxy = null; setRadioState(RadioState.RADIO_UNAVAILABLE); RILRequest.resetSerial(); // Clear request list on close clearRequestList(RADIO_NOT_AVAILABLE, false); Loading Loading @@ -4494,14 +4494,11 @@ public final class RIL extends BaseCommands implements CommandsInterface { /** * Notify all registrants that the ril has connected or disconnected. * * @param rilVer is the version of the ril or -1 if disconnected. */ void notifyRegistrantsRilConnectionChanged(int rilVer) { mRilVersion = rilVer; void notifyRegistrantsRilConnected() { if (mRilConnectedRegistrants != null) { mRilConnectedRegistrants.notifyRegistrants( new AsyncResult(null, new Integer(rilVer), null)); new AsyncResult(null, null, null)); } } Loading