OSDN Git Service

Add getCdmaPrlVersion().
authorYouhan Wang <youhanw@google.com>
Tue, 19 Jul 2016 01:34:43 +0000 (18:34 -0700)
committerYouhan Wang <youhanw@google.com>
Tue, 19 Jul 2016 17:21:15 +0000 (10:21 -0700)
Bug:27612001
Change-Id: Icce9e99d360e30268d41bc063eeefc7484627df6

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

index df81d7f..a3dc343 100644 (file)
@@ -5424,6 +5424,39 @@ public class TelephonyManager {
     }
 
     /**
+     * Return the Preferred Roaming List Version
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @return PRLVersion or null if error.
+     * @hide
+     */
+    public String getCdmaPrlVersion() {
+        return getCdmaPrlVersion(getDefaultSubscription());
+    }
+
+    /**
+     * Return the Preferred Roaming List Version
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @param subId the subscription ID that this request applies to.
+     * @return PRLVersion or null if error.
+     * @hide
+     */
+    public String getCdmaPrlVersion(int subId) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getCdmaPrlVersion(subId);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#getCdmaPrlVersion", e);
+        }
+        return null;
+    }
+
+    /**
      * Get snapshot of Telephony histograms
      * @return List of Telephony histograms
      * Requires Permission:
index 167e1a7..7e7071e 100644 (file)
@@ -1107,6 +1107,16 @@ interface ITelephony {
     String getEsn(int subId);
 
     /**
+    * Return the Preferred Roaming List Version
+    *
+    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+    * @param subId the subscription ID that this request applies to.
+    * @return PRLVersion or null if error.
+    * @hide
+    */
+    String getCdmaPrlVersion(int subId);
+
+    /**
      * Get snapshot of Telephony histograms
      * @return List of Telephony histograms
      * Requires Permission: