Merge "Renamed the id printing method" into udc-dev

This commit is contained in:
TreeHugger Robot
2023-03-13 07:31:33 +00:00
committed by Android (Google) Code Review
4 changed files with 15 additions and 14 deletions

View File

@@ -453,7 +453,7 @@ public final class EuiccProfileInfo implements Parcelable {
+ ", accessRules="
+ Arrays.toString(mAccessRules)
+ ", iccid="
+ SubscriptionInfo.givePrintableIccid(mIccid)
+ SubscriptionInfo.getPrintableId(mIccid)
+ ")";
}
}

View File

@@ -947,29 +947,30 @@ public class SubscriptionInfo implements Parcelable {
}
/**
* Get ICCID stripped PII information on user build.
* Get stripped PII information from the id.
*
* @param iccId The original ICCID.
* @param id The raw id (e.g. ICCID, IMSI, etc...).
* @return The stripped string.
*
* @hide
*/
public static String givePrintableIccid(String iccId) {
String iccIdToPrint = null;
if (iccId != null) {
if (iccId.length() > 9 && !TelephonyUtils.IS_DEBUGGABLE) {
iccIdToPrint = iccId.substring(0, 9) + Rlog.pii(false, iccId.substring(9));
@Nullable
public static String getPrintableId(@Nullable String id) {
String idToPrint = null;
if (id != null) {
if (id.length() > 9 && !TelephonyUtils.IS_DEBUGGABLE) {
idToPrint = id.substring(0, 9) + Rlog.pii(false, id.substring(9));
} else {
iccIdToPrint = iccId;
idToPrint = id;
}
}
return iccIdToPrint;
return idToPrint;
}
@Override
public String toString() {
String iccIdToPrint = givePrintableIccid(mIccId);
String cardStringToPrint = givePrintableIccid(mCardString);
String iccIdToPrint = getPrintableId(mIccId);
String cardStringToPrint = getPrintableId(mCardString);
return "[SubscriptionInfo: id=" + mId
+ " iccId=" + iccIdToPrint
+ " simSlotIndex=" + mSimSlotIndex

View File

@@ -165,7 +165,7 @@ public final class UiccPortInfo implements Parcelable{
return "UiccPortInfo (isActive="
+ mIsActive
+ ", iccId="
+ SubscriptionInfo.givePrintableIccid(mIccId)
+ SubscriptionInfo.getPrintableId(mIccId)
+ ", portIndex="
+ mPortIndex
+ ", mLogicalSlotIndex="

View File

@@ -281,7 +281,7 @@ public class UiccSlotInfo implements Parcelable {
+ ", mIsEuicc="
+ mIsEuicc
+ ", mCardId="
+ SubscriptionInfo.givePrintableIccid(mCardId)
+ SubscriptionInfo.getPrintableId(mCardId)
+ ", cardState="
+ mCardStateInfo
+ ", mIsExtendedApduSupported="