summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-04-02 19:17:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-02 19:17:23 +0000
commit279e22bd35a97cc2676872fbc841b5f3bb060abf (patch)
tree9ea639a78f4821e3c0cc2a169f6223ab85a768be /telephony/java
parentdbca824dc00209c603a956f45bb684e57ee3e478 (diff)
parent52a08cf683a6d183222d795862cfd135cec5694f (diff)
downloadframeworks_base-279e22bd35a97cc2676872fbc841b5f3bb060abf.zip
frameworks_base-279e22bd35a97cc2676872fbc841b5f3bb060abf.tar.gz
frameworks_base-279e22bd35a97cc2676872fbc841b5f3bb060abf.tar.bz2
Merge "make new API to retrieve group identifier level1" into jb-mr2-dev
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java18
-rw-r--r--telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl5
2 files changed, 23 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 8c47332..4aee902 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -907,6 +907,24 @@ public class TelephonyManager {
}
/**
+ * Returns the Group Identifier Level1 for a GSM phone.
+ * Return null if it is unavailable.
+ * <p>
+ * Requires Permission:
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ */
+ public String getGroupIdLevel1() {
+ try {
+ return getSubscriberInfo().getGroupIdLevel1();
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ // This could happen before phone restarts due to crashing
+ return null;
+ }
+ }
+
+ /**
* Returns the phone number string for line 1, for example, the MSISDN
* for a GSM phone. Return null if it is unavailable.
* <p>
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
index da0326c..03940dc 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -39,6 +39,11 @@ interface IPhoneSubInfo {
String getSubscriberId();
/**
+ * Retrieves the Group Identifier Level1 for GSM phones.
+ */
+ String getGroupIdLevel1();
+
+ /**
* Retrieves the serial number of the ICC, if applicable.
*/
String getIccSerialNumber();