From: Jordan Liu Date: Mon, 9 Apr 2018 23:33:17 +0000 (-0700) Subject: Update getIccAuthentication documentation X-Git-Tag: android-x86-9.0-r1~143^2~22^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dd20bc3448171c8a9126c786fa67f550f4abcea4;p=android-x86%2Fframeworks-base.git Update getIccAuthentication documentation Explain what it means if the function returns null. This is based on the spec at TS 31.102 section 7.3.1. Bug: 74392381 Test: manual Change-Id: Ic84d94589431109079a866027953ab9dbef103b8 --- diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index e15d35b5f744..a37c0236604c 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5156,7 +5156,12 @@ public class TelephonyManager { * {@link #AUTHTYPE_EAP_SIM} * @param data authentication challenge data, base64 encoded. * See 3GPP TS 31.102 7.1.2 for more details. - * @return the response of authentication, or null if not available + * @return the response of authentication. This value will be null in the following cases: + * Authentication error, incorrect MAC + * Authentication error, security context not supported + * Key freshness failure + * Authentication error, no memory space available + * Authentication error, no memory space available in EFMUK */ // TODO(b/73660190): This should probably require MODIFY_PHONE_STATE, not // READ_PRIVILEGED_PHONE_STATE. It certainly shouldn't reference the permission in Javadoc since @@ -5177,7 +5182,13 @@ public class TelephonyManager { * {@link #AUTHTYPE_EAP_SIM} * @param data authentication challenge data, base64 encoded. * See 3GPP TS 31.102 7.1.2 for more details. - * @return the response of authentication, or null if not available + * @return the response of authentication. This value will be null in the following cases only + * (see 3GPP TS 31.102 7.3.1): + * Authentication error, incorrect MAC + * Authentication error, security context not supported + * Key freshness failure + * Authentication error, no memory space available + * Authentication error, no memory space available in EFMUK * @hide */ public String getIccAuthentication(int subId, int appType, int authType, String data) {