Loading src/java/com/android/internal/telephony/CallManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,9 @@ public class CallManager { // default phone as the first phone registered, which is PhoneBase obj private Phone mDefaultPhone; // save a cached copy of Ims Phone private Phone mImsPhone; private boolean mSpeedUpAudioForMtCall = false; protected CmHandler mHandler; Loading Loading @@ -189,6 +192,7 @@ public class CallManager { mBackgroundCalls = new ArrayList<Call>(); mForegroundCalls = new ArrayList<Call>(); mDefaultPhone = null; mImsPhone = null; initHandler(); } Loading Loading @@ -346,6 +350,10 @@ public class CallManager { public boolean registerPhone(Phone phone) { Phone basePhone = getPhoneBase(phone); if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { mImsPhone = phone; } if (basePhone != null && !mPhones.contains(basePhone)) { if (DBG) { Loading Loading @@ -402,6 +410,14 @@ public class CallManager { return mDefaultPhone; } /** * return the IMS phone or null if not available */ public Phone getImsPhone() { return mImsPhone; } /** * @return the phone associated with the foreground call */ Loading src/java/com/android/internal/telephony/PhoneProxy.java +5 −2 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ public class PhoneProxy extends Handler implements Phone { String outgoingPhoneName = "Unknown"; Phone oldPhone = mActivePhone; CallManager cm = CallManager.getInstance(); if (oldPhone != null) { outgoingPhoneName = ((PhoneBase) oldPhone).getPhoneName(); Loading @@ -254,7 +255,8 @@ public class PhoneProxy extends Handler implements Phone { + (ServiceState.isGsm(newVoiceRadioTech) ? "GSM" : "CDMA")); if (oldPhone != null) { CallManager.getInstance().unregisterPhone(oldPhone); cm.unregisterPhone(oldPhone); cm.unregisterPhone(cm.getImsPhone()); logd("Disposing old phone.."); oldPhone.dispose(); } Loading @@ -273,7 +275,8 @@ public class PhoneProxy extends Handler implements Phone { } if(mActivePhone != null) { CallManager.getInstance().registerPhone(mActivePhone); cm.registerPhone(mActivePhone); cm.registerPhone(cm.getImsPhone()); } oldPhone = null; Loading Loading
src/java/com/android/internal/telephony/CallManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,9 @@ public class CallManager { // default phone as the first phone registered, which is PhoneBase obj private Phone mDefaultPhone; // save a cached copy of Ims Phone private Phone mImsPhone; private boolean mSpeedUpAudioForMtCall = false; protected CmHandler mHandler; Loading Loading @@ -189,6 +192,7 @@ public class CallManager { mBackgroundCalls = new ArrayList<Call>(); mForegroundCalls = new ArrayList<Call>(); mDefaultPhone = null; mImsPhone = null; initHandler(); } Loading Loading @@ -346,6 +350,10 @@ public class CallManager { public boolean registerPhone(Phone phone) { Phone basePhone = getPhoneBase(phone); if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { mImsPhone = phone; } if (basePhone != null && !mPhones.contains(basePhone)) { if (DBG) { Loading Loading @@ -402,6 +410,14 @@ public class CallManager { return mDefaultPhone; } /** * return the IMS phone or null if not available */ public Phone getImsPhone() { return mImsPhone; } /** * @return the phone associated with the foreground call */ Loading
src/java/com/android/internal/telephony/PhoneProxy.java +5 −2 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ public class PhoneProxy extends Handler implements Phone { String outgoingPhoneName = "Unknown"; Phone oldPhone = mActivePhone; CallManager cm = CallManager.getInstance(); if (oldPhone != null) { outgoingPhoneName = ((PhoneBase) oldPhone).getPhoneName(); Loading @@ -254,7 +255,8 @@ public class PhoneProxy extends Handler implements Phone { + (ServiceState.isGsm(newVoiceRadioTech) ? "GSM" : "CDMA")); if (oldPhone != null) { CallManager.getInstance().unregisterPhone(oldPhone); cm.unregisterPhone(oldPhone); cm.unregisterPhone(cm.getImsPhone()); logd("Disposing old phone.."); oldPhone.dispose(); } Loading @@ -273,7 +275,8 @@ public class PhoneProxy extends Handler implements Phone { } if(mActivePhone != null) { CallManager.getInstance().registerPhone(mActivePhone); cm.registerPhone(mActivePhone); cm.registerPhone(cm.getImsPhone()); } oldPhone = null; Loading