diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 9cff7657289cb..25b72b9972076 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3308,4 +3308,23 @@ public class TelephonyManager { } return false; } + + /** + * Returns the result and response from RIL for oem request + * + * @param oemReq the data is sent to ril. + * @param oemResp the respose data from RIL. + * @return negative value request was not handled or get error + * 0 request was handled succesfully, but no response data + * positive value success, data length of response + * @hide + */ + public int invokeOemRilRequestRaw(byte[] oemReq, byte[] oemResp) { + try { + return getITelephony().invokeOemRilRequestRaw(oemReq, oemResp); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + return -1; + } } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 435c3341b5a98..b6775eff38764 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -724,5 +724,16 @@ interface ITelephony { * @return true if the operation was executed correctly. */ boolean setOperatorBrandOverride(String iccId, String brand); + + /** + * Returns the result and response from RIL for oem request + * + * @param oemReq the data is sent to ril. + * @param oemResp the respose data from RIL. + * @return negative value request was not handled or get error + * 0 request was handled succesfully, but no response data + * positive value success, data length of response + */ + int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp); }