Merge "Revert "Telephony: Register/Unregister Phones with CallManager""
This commit is contained in:
@ -35,7 +35,6 @@ import com.android.internal.telephony.gsm.GSMPhone;
|
|||||||
import com.android.internal.telephony.gsm.UsimServiceTable;
|
import com.android.internal.telephony.gsm.UsimServiceTable;
|
||||||
import com.android.internal.telephony.ims.IsimRecords;
|
import com.android.internal.telephony.ims.IsimRecords;
|
||||||
import com.android.internal.telephony.test.SimulatedRadioControl;
|
import com.android.internal.telephony.test.SimulatedRadioControl;
|
||||||
import com.android.internal.telephony.CallManager;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -88,7 +87,6 @@ public class PhoneProxy extends Handler implements Phone {
|
|||||||
|
|
||||||
if(mOutgoingPhone.equals("GSM")) {
|
if(mOutgoingPhone.equals("GSM")) {
|
||||||
logd("Make a new CDMAPhone and destroy the old GSMPhone.");
|
logd("Make a new CDMAPhone and destroy the old GSMPhone.");
|
||||||
CallManager.getInstance().unregisterPhone(mActivePhone);
|
|
||||||
|
|
||||||
((GSMPhone)mActivePhone).dispose();
|
((GSMPhone)mActivePhone).dispose();
|
||||||
Phone oldPhone = mActivePhone;
|
Phone oldPhone = mActivePhone;
|
||||||
@ -101,11 +99,9 @@ public class PhoneProxy extends Handler implements Phone {
|
|||||||
|
|
||||||
mActivePhone = PhoneFactory.getCdmaPhone();
|
mActivePhone = PhoneFactory.getCdmaPhone();
|
||||||
((GSMPhone)oldPhone).removeReferences();
|
((GSMPhone)oldPhone).removeReferences();
|
||||||
CallManager.getInstance().registerPhone(mActivePhone);
|
|
||||||
oldPhone = null;
|
oldPhone = null;
|
||||||
} else {
|
} else {
|
||||||
logd("Make a new GSMPhone and destroy the old CDMAPhone.");
|
logd("Make a new GSMPhone and destroy the old CDMAPhone.");
|
||||||
CallManager.getInstance().unregisterPhone(mActivePhone);
|
|
||||||
|
|
||||||
((CDMAPhone)mActivePhone).dispose();
|
((CDMAPhone)mActivePhone).dispose();
|
||||||
//mActivePhone = null;
|
//mActivePhone = null;
|
||||||
@ -119,7 +115,6 @@ public class PhoneProxy extends Handler implements Phone {
|
|||||||
|
|
||||||
mActivePhone = PhoneFactory.getGsmPhone();
|
mActivePhone = PhoneFactory.getGsmPhone();
|
||||||
((CDMAPhone)oldPhone).removeReferences();
|
((CDMAPhone)oldPhone).removeReferences();
|
||||||
CallManager.getInstance().registerPhone(mActivePhone);
|
|
||||||
oldPhone = null;
|
oldPhone = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user