OSDN Git Service

Add API invokeOemRilRequestRaw
authorSteven Liu <stevenliu@motorola.com>
Thu, 17 Jul 2014 15:57:01 +0000 (10:57 -0500)
committerAmit Mahajan <amitmahajan@google.com>
Thu, 24 Jul 2014 17:15:49 +0000 (10:15 -0700)
this API is used by system app, app could communicate with RIL
with it.

Change-Id: I5397c1cf2b108d9dc3a9694b1f071dc60bb5b341

Conflicts:
telephony/java/com/android/internal/telephony/ITelephony.aidl

telephony/java/android/telephony/TelephonyManager.java
telephony/java/com/android/internal/telephony/ITelephony.aidl

index 9cff765..25b72b9 100644 (file)
@@ -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;
+    }
 }
index 435c334..b6775ef 100644 (file)
@@ -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);
 }