Loading src/java/com/android/internal/telephony/SamsungQualcommRIL.java +68 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt private boolean oldRilState = needsOldRilFeature("exynos4RadioState"); private boolean googleEditionSS = needsOldRilFeature("googleEditionSS"); private boolean driverCall = needsOldRilFeature("newDriverCall"); private boolean dialCode = needsOldRilFeature("newDialCode"); private boolean samsungEmergency = needsOldRilFeature("samsungEMSReq"); private boolean hasTdScdmaSignalStrength = needsOldRilFeature("TdScdmaSignalStrength"); private String[] lastKnownOfGood = {null, null, null}; public SamsungQualcommRIL(Context context, int networkMode, Loading Loading @@ -292,6 +294,7 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt if(cdmaSubscription != -1) { setCdmaSubscriptionSource(mCdmaSubscription, null); } if(mRilVersion >= 8) setCellInfoListRate(Integer.MAX_VALUE, null); notifyRegistrantsRilConnectionChanged(((int[])ret)[0]); break; Loading Loading @@ -750,4 +753,68 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt return super.responseSMS(p); } @Override public void dial(String address, int clirMode, UUSInfo uusInfo, Message result) { if (samsungEmergency && PhoneNumberUtils.isEmergencyNumber(address)) { dialEmergencyCall(address, clirMode, result); return; } if(!dialCode){ super.dial(address, clirMode, uusInfo, result); return; } RILRequest rr = RILRequest.obtain(RIL_REQUEST_DIAL, result); rr.mParcel.writeString(address); rr.mParcel.writeInt(clirMode); rr.mParcel.writeInt(0); rr.mParcel.writeInt(1); rr.mParcel.writeString(""); if (uusInfo == null) { rr.mParcel.writeInt(0); // UUS information is absent } else { rr.mParcel.writeInt(1); // UUS information is present rr.mParcel.writeInt(uusInfo.getType()); rr.mParcel.writeInt(uusInfo.getDcs()); rr.mParcel.writeByteArray(uusInfo.getUserData()); } if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } @Override public void getImsRegistrationState(Message result) { if(mRilVersion >= 8) super.getImsRegistrationState(result); else { if (result != null) { CommandException ex = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(result, null, ex); result.sendToTarget(); } } } static final int RIL_REQUEST_DIAL_EMERGENCY = 10016; public void dialEmergencyCall(String address, int clirMode, Message result) { RILRequest rr; Rlog.v(RILJ_LOG_TAG, "Emergency dial: " + address); rr = RILRequest.obtain(RIL_REQUEST_DIAL_EMERGENCY, result); rr.mParcel.writeString(address + "/"); rr.mParcel.writeInt(clirMode); rr.mParcel.writeInt(0); // UUS information is absent if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } } Loading
src/java/com/android/internal/telephony/SamsungQualcommRIL.java +68 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt private boolean oldRilState = needsOldRilFeature("exynos4RadioState"); private boolean googleEditionSS = needsOldRilFeature("googleEditionSS"); private boolean driverCall = needsOldRilFeature("newDriverCall"); private boolean dialCode = needsOldRilFeature("newDialCode"); private boolean samsungEmergency = needsOldRilFeature("samsungEMSReq"); private boolean hasTdScdmaSignalStrength = needsOldRilFeature("TdScdmaSignalStrength"); private String[] lastKnownOfGood = {null, null, null}; public SamsungQualcommRIL(Context context, int networkMode, Loading Loading @@ -292,6 +294,7 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt if(cdmaSubscription != -1) { setCdmaSubscriptionSource(mCdmaSubscription, null); } if(mRilVersion >= 8) setCellInfoListRate(Integer.MAX_VALUE, null); notifyRegistrantsRilConnectionChanged(((int[])ret)[0]); break; Loading Loading @@ -750,4 +753,68 @@ public class SamsungQualcommRIL extends QualcommMSIM42RIL implements CommandsInt return super.responseSMS(p); } @Override public void dial(String address, int clirMode, UUSInfo uusInfo, Message result) { if (samsungEmergency && PhoneNumberUtils.isEmergencyNumber(address)) { dialEmergencyCall(address, clirMode, result); return; } if(!dialCode){ super.dial(address, clirMode, uusInfo, result); return; } RILRequest rr = RILRequest.obtain(RIL_REQUEST_DIAL, result); rr.mParcel.writeString(address); rr.mParcel.writeInt(clirMode); rr.mParcel.writeInt(0); rr.mParcel.writeInt(1); rr.mParcel.writeString(""); if (uusInfo == null) { rr.mParcel.writeInt(0); // UUS information is absent } else { rr.mParcel.writeInt(1); // UUS information is present rr.mParcel.writeInt(uusInfo.getType()); rr.mParcel.writeInt(uusInfo.getDcs()); rr.mParcel.writeByteArray(uusInfo.getUserData()); } if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } @Override public void getImsRegistrationState(Message result) { if(mRilVersion >= 8) super.getImsRegistrationState(result); else { if (result != null) { CommandException ex = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(result, null, ex); result.sendToTarget(); } } } static final int RIL_REQUEST_DIAL_EMERGENCY = 10016; public void dialEmergencyCall(String address, int clirMode, Message result) { RILRequest rr; Rlog.v(RILJ_LOG_TAG, "Emergency dial: " + address); rr = RILRequest.obtain(RIL_REQUEST_DIAL_EMERGENCY, result); rr.mParcel.writeString(address + "/"); rr.mParcel.writeInt(clirMode); rr.mParcel.writeInt(0); // UUS information is absent if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } }