Skip to content

Commit 6a1dca3

Browse files
cco3android code review
authored andcommitted
Merge "Telephony: Register/Unregister Phones with CallManager"
2 parents 4b27125 + cbca385 commit 6a1dca3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

telephony/java/com/android/internal/telephony/PhoneProxy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import com.android.internal.telephony.gsm.UsimServiceTable;
3636
import com.android.internal.telephony.ims.IsimRecords;
3737
import com.android.internal.telephony.test.SimulatedRadioControl;
38+
import com.android.internal.telephony.CallManager;
3839

3940
import java.util.List;
4041

@@ -87,6 +88,7 @@ public void handleMessage(Message msg) {
8788

8889
if(mOutgoingPhone.equals("GSM")) {
8990
logd("Make a new CDMAPhone and destroy the old GSMPhone.");
91+
CallManager.getInstance().unregisterPhone(mActivePhone);
9092

9193
((GSMPhone)mActivePhone).dispose();
9294
Phone oldPhone = mActivePhone;
@@ -99,9 +101,11 @@ public void handleMessage(Message msg) {
99101

100102
mActivePhone = PhoneFactory.getCdmaPhone();
101103
((GSMPhone)oldPhone).removeReferences();
104+
CallManager.getInstance().registerPhone(mActivePhone);
102105
oldPhone = null;
103106
} else {
104107
logd("Make a new GSMPhone and destroy the old CDMAPhone.");
108+
CallManager.getInstance().unregisterPhone(mActivePhone);
105109

106110
((CDMAPhone)mActivePhone).dispose();
107111
//mActivePhone = null;
@@ -115,6 +119,7 @@ public void handleMessage(Message msg) {
115119

116120
mActivePhone = PhoneFactory.getGsmPhone();
117121
((CDMAPhone)oldPhone).removeReferences();
122+
CallManager.getInstance().registerPhone(mActivePhone);
118123
oldPhone = null;
119124
}
120125

0 commit comments

Comments
 (0)