diff options
| author | 2018-09-16 19:01:25 -0700 | |
|---|---|---|
| committer | 2018-09-20 14:33:55 -0700 | |
| commit | 873dccbd6aa476dc502046d6800a42a3c623e088 (patch) | |
| tree | e667d2e078d5503e65f2ecd9dfd6c377db0a96ff | |
| parent | 85aadab7e465391bed6a6d8b1afc24a83fc3cd2a (diff) | |
expose getIsimDomain to systemAPI
This is required for carrier apps to get Imsi domain name as part of
request URI.
Bug: 115884625
Test: telephony unit test
Change-Id: Iad405dc2b2f182039a828e4a4709d273579a8273
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index e3f52a0f2d21..a5ae645466a3 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5251,6 +5251,7 @@ package android.telephony { method public deprecated boolean getDataEnabled(); method public deprecated boolean getDataEnabled(int); method public boolean getEmergencyCallbackMode(); + method public java.lang.String getIsimDomain(); method public int getSimApplicationState(); method public int getSimCardState(); method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 723657120593..44dcebb0871e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -4138,11 +4138,16 @@ public class TelephonyManager { } /** - * Returns the IMS home network domain name that was loaded from the ISIM. - * @return the IMS domain name, or null if not present or not loaded + * Returns the IMS home network domain name that was loaded from the ISIM {@see #APPTYPE_ISIM}. + * @return the IMS domain name. Returns {@code null} if ISIM hasn't been loaded or IMS domain + * hasn't been loaded or isn't present on the ISIM. + * + * <p>Requires Permission: + * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE} * @hide */ - @UnsupportedAppUsage + @SystemApi + @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain() { try { IPhoneSubInfo info = getSubscriberInfo(); |