Loading telephony/java/android/telephony/SubscriptionInfo.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -208,6 +208,20 @@ public class SubscriptionInfo implements Parcelable { */ */ private int mSubscriptionType; private int mSubscriptionType; /** * Public copy constructor. * @hide */ public SubscriptionInfo(SubscriptionInfo info) { this(info.mId, info.mIccId, info.mSimSlotIndex, info.mDisplayName, info.mCarrierName, info.mNameSource, info.mIconTint, info.mNumber, info.mDataRoaming, info.mIconBitmap, info.mMcc, info.mMnc, info.mCountryIso, info.mIsEmbedded, info.mNativeAccessRules, info.mCardString, info.mCardId, info.mIsOpportunistic, info.mGroupUUID == null ? null : info.mGroupUUID.toString(), info.mIsGroupDisabled, info.mCarrierId, info.mProfileClass, info.mSubscriptionType, info.mGroupOwner, info.mCarrierConfigAccessRules); } /** /** * @hide * @hide */ */ Loading Loading @@ -281,12 +295,26 @@ public class SubscriptionInfo implements Parcelable { } } /** /** * @return the ICC ID. * Returns the ICC ID 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 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 * <a href="https://developer.android.com/work/managed-profiles">Work profiles</a>. Profile * owner access is deprecated and will be removed in a future release. * * @return the ICC ID, or an empty string if one of these requirements is not met */ */ public String getIccId() { public String getIccId() { return this.mIccId; return this.mIccId; } } /** * @hide */ public void clearIccId() { this.mIccId = ""; } /** /** * @return the slot index of this Subscription's SIM card. * @return the slot index of this Subscription's SIM card. */ */ Loading Loading
telephony/java/android/telephony/SubscriptionInfo.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -208,6 +208,20 @@ public class SubscriptionInfo implements Parcelable { */ */ private int mSubscriptionType; private int mSubscriptionType; /** * Public copy constructor. * @hide */ public SubscriptionInfo(SubscriptionInfo info) { this(info.mId, info.mIccId, info.mSimSlotIndex, info.mDisplayName, info.mCarrierName, info.mNameSource, info.mIconTint, info.mNumber, info.mDataRoaming, info.mIconBitmap, info.mMcc, info.mMnc, info.mCountryIso, info.mIsEmbedded, info.mNativeAccessRules, info.mCardString, info.mCardId, info.mIsOpportunistic, info.mGroupUUID == null ? null : info.mGroupUUID.toString(), info.mIsGroupDisabled, info.mCarrierId, info.mProfileClass, info.mSubscriptionType, info.mGroupOwner, info.mCarrierConfigAccessRules); } /** /** * @hide * @hide */ */ Loading Loading @@ -281,12 +295,26 @@ public class SubscriptionInfo implements Parcelable { } } /** /** * @return the ICC ID. * Returns the ICC ID 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 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 * <a href="https://developer.android.com/work/managed-profiles">Work profiles</a>. Profile * owner access is deprecated and will be removed in a future release. * * @return the ICC ID, or an empty string if one of these requirements is not met */ */ public String getIccId() { public String getIccId() { return this.mIccId; return this.mIccId; } } /** * @hide */ public void clearIccId() { this.mIccId = ""; } /** /** * @return the slot index of this Subscription's SIM card. * @return the slot index of this Subscription's SIM card. */ */ Loading