diff options
author | Sungmin Choi <sungmin.choi@lge.com> | 2013-03-21 15:29:37 +0900 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2013-03-27 17:24:55 +0000 |
commit | 52a08cf683a6d183222d795862cfd135cec5694f (patch) | |
tree | 61cdbd5b80f3f4fda9f339ae7b3225ee02691d60 /telephony | |
parent | b7f4c7b7feec98adde79d6d691c0001943b16595 (diff) | |
download | frameworks_base-52a08cf683a6d183222d795862cfd135cec5694f.zip frameworks_base-52a08cf683a6d183222d795862cfd135cec5694f.tar.gz frameworks_base-52a08cf683a6d183222d795862cfd135cec5694f.tar.bz2 |
make new API to retrieve group identifier level1
For mvno, user can add or edit mvno data field. To pre-provide
the mvno data of the edited apn when the user selects one of
the mvno types, need to support IMSI, SPN, and GID1 data.
To support GID1, make API to retrieve group identifier level1.
bug:6445254
Change-Id: I1bc280054cc7cd37e78a279866cefd62872a19fb
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 18 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl | 5 |
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(); |