Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c93941a authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add Rlog.pii for SMSNumberUtils address filtering.

Adding Rlog.pii for phone number information which is potentially logged
to the SmsNumberUtils logs.

Test: Manual
Bug: 62827376
Change-Id: I46e6626972f0ff6657feec4bb66af35bc2b07a70
parent 11594832
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -530,10 +530,11 @@ public class SmsNumberUtils {
     *  Filter the destination number if using VZW sim card.
     *  Filter the destination number if using VZW sim card.
     */
     */
    public static String filterDestAddr(Phone phone, String destAddr) {
    public static String filterDestAddr(Phone phone, String destAddr) {
        if (DBG) Rlog.d(TAG, "enter filterDestAddr. destAddr=\"" + destAddr + "\"" );
        if (DBG) Rlog.d(TAG, "enter filterDestAddr. destAddr=\"" + Rlog.pii(TAG, destAddr) + "\"" );


        if (destAddr == null || !PhoneNumberUtils.isGlobalPhoneNumber(destAddr)) {
        if (destAddr == null || !PhoneNumberUtils.isGlobalPhoneNumber(destAddr)) {
            Rlog.w(TAG, "destAddr" + destAddr + " is not a global phone number! Nothing changed.");
            Rlog.w(TAG, "destAddr" + Rlog.pii(TAG, destAddr) +
                    " is not a global phone number! Nothing changed.");
            return destAddr;
            return destAddr;
        }
        }


@@ -553,7 +554,8 @@ public class SmsNumberUtils {


        if (DBG) {
        if (DBG) {
            Rlog.d(TAG, "destAddr is " + ((result != null)?"formatted.":"not formatted."));
            Rlog.d(TAG, "destAddr is " + ((result != null)?"formatted.":"not formatted."));
            Rlog.d(TAG, "leave filterDestAddr, new destAddr=\"" + (result != null ? result : destAddr) + "\"" );
            Rlog.d(TAG, "leave filterDestAddr, new destAddr=\"" + (result != null ? Rlog.pii(TAG,
                    result) : Rlog.pii(TAG, destAddr)) + "\"");
        }
        }
        return result != null ? result : destAddr;
        return result != null ? result : destAddr;
    }
    }