summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2014-10-15 14:05:26 -0700
committerxinhe <xinhe@google.com>2014-10-15 16:31:19 -0700
commit6bb21401a4e7c8d1ed4f60a5b1572ce78b5311f6 (patch)
tree59721e9baf3cd60fcaa40a5af33d62e3992d61eb /telephony
parentf23b29ad5a730c7b26d9f96c764dc4e0d96fdd16 (diff)
downloadframeworks_base-6bb21401a4e7c8d1ed4f60a5b1572ce78b5311f6.zip
frameworks_base-6bb21401a4e7c8d1ed4f60a5b1572ce78b5311f6.tar.gz
frameworks_base-6bb21401a4e7c8d1ed4f60a5b1572ce78b5311f6.tar.bz2
Sprint: MMS proxy authorization does not include NAI
Read the NAI from CSIM and pass it to MMS module Bug:17752727 Change-Id: Ib7f53bed87183bd9e67103c676218b5748be668f
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java26
-rw-r--r--telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl5
2 files changed, 31 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 7173637..d3cef4a 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -669,6 +669,32 @@ public class TelephonyManager {
}
/**
+ * Returns the NAI. Return null if NAI is not available.
+ *
+ */
+ /** {@hide}*/
+ public String getNai() {
+ return getNai(getDefaultSim());
+ }
+
+ /**
+ * Returns the NAI. Return null if NAI is not available.
+ *
+ * @param slotId of which Nai is returned
+ */
+ /** {@hide}*/
+ public String getNai(int slotId) {
+ long[] subId = SubscriptionManager.getSubId(slotId);
+ try {
+ return getSubscriberInfo().getNaiForSubscriber(subId[0]);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /**
* Returns the current location of the device.
*<p>
* If there is only one radio in the device and that radio has an LTE connection,
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
index d706203..98fd70c 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -27,6 +27,11 @@ interface IPhoneSubInfo {
*/
String getDeviceId();
+ /**
+ * Retrieves the unique Network Access ID
+ */
+ String getNaiForSubscriber(long subId);
+
/**
* Retrieves the unique device ID of a subId for the device, e.g., IMEI
* for GSM phones.