diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index d34b8c932f77d..fcfc728b2c7be 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -38,8 +38,6 @@ import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; -import com.android.telephony.Rlog; - import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -629,8 +627,16 @@ public class SubscriptionInfo implements Parcelable { } /** - * @return the card string of the SIM card which contains the subscription. The card string is - * the ICCID for UICCs or the EID for eUICCs. + * Returns the card string if the calling app has been granted the READ_PRIVILEGED_PHONE_STATE + * permission, has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}), or + * is a device owner or profile owner on an organization owned device that has been granted the + * READ_PHONE_STATE permission. The profile owner is an app that owns a managed profile on the + * device; for more details see + * Work profiles. + * + * @return the card string of the SIM card which contains the subscription or an empty string + * if these requirements are not met. The card string is the ICCID for UICCs or the EID for + * eUICCs. * @hide * //TODO rename usages in LPA: UiccSlotUtil.java, UiccSlotsManager.java, UiccSlotInfoTest.java */ @@ -638,6 +644,13 @@ public class SubscriptionInfo implements Parcelable { return this.mCardString; } + /** + * @hide + */ + public void clearCardString() { + this.mCardString = ""; + } + /** * Returns the card ID of the SIM card which contains the subscription (see * {@link UiccCardInfo#getCardId()}.