Skip to content

Commit

Permalink
telephony: DataConnection: support old RILs
Browse files Browse the repository at this point in the history
Older RILs require different technology value

Change-Id: I0249bb597e2592b7e951945bc97d144ee2b2307a
  • Loading branch information
pawitp authored and WoH committed Aug 7, 2013
1 parent 8a23092 commit 470c455
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -580,7 +580,16 @@ private void notifyDisconnectCompleted(DisconnectParams dp, boolean sendAll) {

private int getRilRadioTechnology() {
int rilRadioTechnology;
if (mApnSetting.bearer > 0) {
if (mPhone.mCi.getRilVersion() < 6) {
int phoneType = mPhone.getPhoneType();
if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
return RILConstants.SETUP_DATA_TECH_GSM;
} else if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
return RILConstants.SETUP_DATA_TECH_CDMA;
} else {
throw new RuntimeException("Unknown phoneType " + phoneType + ", should not happen");
}
} else if (mApnSetting.bearer > 0) {
rilRadioTechnology = mApnSetting.bearer + 2;
} else {
rilRadioTechnology = mPhone.getServiceState().getRilDataRadioTechnology() + 2;
Expand Down

1 comment on commit 470c455

@WoH
Copy link
Owner

@WoH WoH commented on 470c455 Aug 7, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For tommy & friends:

Please sign in to comment.