diff options
author | Michael Groover <mpgroover@google.com> | 2021-02-03 02:06:26 +0000 |
---|---|---|
committer | Michael Groover <mpgroover@google.com> | 2021-02-05 23:57:15 +0000 |
commit | 9b85c6411ee5b25281c065b877d84324b855a717 (patch) | |
tree | 4c039931f9f7df5198415ec84639fbf5417d9174 | |
parent | 82b0600bfef789a0c16ce2d47aa3d1f507e134a7 (diff) | |
parent | a13fc7f314ac56e75eca09c94db8090f928023ff (diff) | |
download | base-9b85c6411ee5b25281c065b877d84324b855a717.tar.gz |
resolve merge conflicts of a13fc7f314ac56e75eca09c94db8090f928023ff to qt-qpr1-dev
Bug: 173421434
Change-Id: Ia5912645861a88e819189321861ffd81240c34d6
Merged-In: I03072c65e1c7101538a7a20541d2ac59a2d213e3
-rw-r--r-- | telephony/java/android/telephony/SubscriptionInfo.java | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index 628dc9348246..1f560cab13d2 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -209,6 +209,20 @@ public class SubscriptionInfo implements Parcelable { 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 */ public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName, @@ -281,13 +295,27 @@ 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() { return this.mIccId; } /** + * @hide + */ + public void clearIccId() { + this.mIccId = ""; + } + + /** * @return the slot index of this Subscription's SIM card. */ public int getSimSlotIndex() { |