Loading telephony/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java +43 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.text.TextUtils; import android.util.Log; import com.android.internal.telephony.RILConstants; import java.util.ArrayList; /** * Custom RIL to handle unique behavior of Hercules/Skyrocket/Note radio * Loading Loading @@ -105,6 +107,47 @@ public class SamsungQualcommUiccRIL extends QualcommSharedRIL implements Command } } @Override public void setNetworkSelectionModeManual(String operatorNumeric, Message response) { RILRequest rr = RILRequest.obtain(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, response); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + operatorNumeric); rr.mp.writeString(operatorNumeric); send(rr); } @Override protected Object responseOperatorInfos(Parcel p) { String strings[] = (String [])responseStrings(p); ArrayList<OperatorInfo> ret; if (strings.length % 4 != 0) { throw new RuntimeException( "RIL_REQUEST_QUERY_AVAILABLE_NETWORKS: invalid response. Got " + strings.length + " strings, expected multible of 4"); } ret = new ArrayList<OperatorInfo>(strings.length / 4); for (int i = 0 ; i < strings.length ; i += 4) { ret.add ( new OperatorInfo( strings[i+0], strings[i+1], strings[i+2], strings[i+3])); } return ret; } @Override protected Object responseIccCardStatus(Parcel p) { Loading Loading
telephony/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java +43 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.text.TextUtils; import android.util.Log; import com.android.internal.telephony.RILConstants; import java.util.ArrayList; /** * Custom RIL to handle unique behavior of Hercules/Skyrocket/Note radio * Loading Loading @@ -105,6 +107,47 @@ public class SamsungQualcommUiccRIL extends QualcommSharedRIL implements Command } } @Override public void setNetworkSelectionModeManual(String operatorNumeric, Message response) { RILRequest rr = RILRequest.obtain(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, response); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + operatorNumeric); rr.mp.writeString(operatorNumeric); send(rr); } @Override protected Object responseOperatorInfos(Parcel p) { String strings[] = (String [])responseStrings(p); ArrayList<OperatorInfo> ret; if (strings.length % 4 != 0) { throw new RuntimeException( "RIL_REQUEST_QUERY_AVAILABLE_NETWORKS: invalid response. Got " + strings.length + " strings, expected multible of 4"); } ret = new ArrayList<OperatorInfo>(strings.length / 4); for (int i = 0 ; i < strings.length ; i += 4) { ret.add ( new OperatorInfo( strings[i+0], strings[i+1], strings[i+2], strings[i+3])); } return ret; } @Override protected Object responseIccCardStatus(Parcel p) { Loading