Loading telephony/java/com/android/internal/telephony/LGEQualcommUiccRIL.java +72 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import java.util.ArrayList; */ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterface { protected String mAid; protected boolean mUSIM; private String mLastDataIface; boolean RILJ_LOGV = true; boolean RILJ_LOGD = true; Loading Loading @@ -159,6 +160,19 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf setupDataCall(String radioTechnology, String profile, String apn, String user, String password, String authType, String ipVersion, Message result) { RILRequest rrSPT = RILRequest.obtain( 121, null); //121 - RIL_REQUEST_VSS_SET_PDN_TABLE rrSPT.mp.writeInt(1); // pdnId rrSPT.mp.writeInt(apn.length()); // apnLength rrSPT.mp.writeString(apn); // apn rrSPT.mp.writeInt(0); // ipType rrSPT.mp.writeInt(0); // inactivityTime rrSPT.mp.writeInt(1); // enable send(rrSPT); RILRequest rr = RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result); Loading Loading @@ -189,6 +203,9 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf RILRequest rr = RILRequest.obtain(RIL_REQUEST_SIM_IO, result); if (mUSIM) path = path.replaceAll("7F20$","7FFF"); rr.mp.writeInt(command); rr.mp.writeInt(fileid); rr.mp.writeString(path); Loading Loading @@ -304,10 +321,13 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf if (numApplications > 0) { IccCardApplication application = status.getApplication(appIndex); mAid = application.aid; mUSIM = application.app_type == IccCardApplication.AppType.APPTYPE_USIM; if (TextUtils.isEmpty(mAid)) mAid = ""; Log.d(LOG_TAG, "mAid " + mAid); } return status; } Loading Loading @@ -365,4 +385,56 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf return dataCall; } @Override public void getNeighboringCids(Message response) { if (!getRadioState().isOn()) return; RILRequest rr = RILRequest.obtain( RILConstants.RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, response); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } @Override public void setPreferredNetworkType(int networkType , Message response) { /** * For USIMs, we want the preference to go to LTE, unless "2G-only" * is requested */ if (mUSIM && networkType != RILConstants.NETWORK_MODE_GSM_ONLY) { networkType = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA; } super.setPreferredNetworkType(networkType, response); } @Override protected Object responseSignalStrength(Parcel p) { int numInts = 12; int response[]; boolean oldRil = needsOldRilFeature("signalstrength"); boolean noLte = false; /* TODO: Add SignalStrength class to match RIL_SignalStrength */ response = new int[numInts]; for (int i = 0 ; i < numInts ; i++) { if ((oldRil || noLte) && i > 6 && i < 12) { response[i] = -1; } else { response[i] = p.readInt(); } if (i == 7 && response[i] == 99) { response[i] = -1; noLte = true; } } return response; } } Loading
telephony/java/com/android/internal/telephony/LGEQualcommUiccRIL.java +72 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import java.util.ArrayList; */ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterface { protected String mAid; protected boolean mUSIM; private String mLastDataIface; boolean RILJ_LOGV = true; boolean RILJ_LOGD = true; Loading Loading @@ -159,6 +160,19 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf setupDataCall(String radioTechnology, String profile, String apn, String user, String password, String authType, String ipVersion, Message result) { RILRequest rrSPT = RILRequest.obtain( 121, null); //121 - RIL_REQUEST_VSS_SET_PDN_TABLE rrSPT.mp.writeInt(1); // pdnId rrSPT.mp.writeInt(apn.length()); // apnLength rrSPT.mp.writeString(apn); // apn rrSPT.mp.writeInt(0); // ipType rrSPT.mp.writeInt(0); // inactivityTime rrSPT.mp.writeInt(1); // enable send(rrSPT); RILRequest rr = RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result); Loading Loading @@ -189,6 +203,9 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf RILRequest rr = RILRequest.obtain(RIL_REQUEST_SIM_IO, result); if (mUSIM) path = path.replaceAll("7F20$","7FFF"); rr.mp.writeInt(command); rr.mp.writeInt(fileid); rr.mp.writeString(path); Loading Loading @@ -304,10 +321,13 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf if (numApplications > 0) { IccCardApplication application = status.getApplication(appIndex); mAid = application.aid; mUSIM = application.app_type == IccCardApplication.AppType.APPTYPE_USIM; if (TextUtils.isEmpty(mAid)) mAid = ""; Log.d(LOG_TAG, "mAid " + mAid); } return status; } Loading Loading @@ -365,4 +385,56 @@ public class LGEQualcommUiccRIL extends LGEQualcommRIL implements CommandsInterf return dataCall; } @Override public void getNeighboringCids(Message response) { if (!getRadioState().isOn()) return; RILRequest rr = RILRequest.obtain( RILConstants.RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, response); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); send(rr); } @Override public void setPreferredNetworkType(int networkType , Message response) { /** * For USIMs, we want the preference to go to LTE, unless "2G-only" * is requested */ if (mUSIM && networkType != RILConstants.NETWORK_MODE_GSM_ONLY) { networkType = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA; } super.setPreferredNetworkType(networkType, response); } @Override protected Object responseSignalStrength(Parcel p) { int numInts = 12; int response[]; boolean oldRil = needsOldRilFeature("signalstrength"); boolean noLte = false; /* TODO: Add SignalStrength class to match RIL_SignalStrength */ response = new int[numInts]; for (int i = 0 ; i < numInts ; i++) { if ((oldRil || noLte) && i > 6 && i < 12) { response[i] = -1; } else { response[i] = p.readInt(); } if (i == 7 && response[i] == 99) { response[i] = -1; noLte = true; } } return response; } }