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

Commit b4350195 authored by Santos Cordon's avatar Santos Cordon
Browse files

Hide SIP PII data from logs.

Bug: 28560740
Change-Id: I46464669d5f920c2af8756254a5549508ce99eca
parent 946fe8e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ abstract class SipConnectionBase extends Connection {

    SipConnectionBase(String dialString) {
        super(PhoneConstants.PHONE_TYPE_SIP);
        if (DBG) log("SipConnectionBase: ctor dialString=" + dialString);
        if (DBG) log("SipConnectionBase: ctor dialString=" + SipPhone.hidePii(dialString));
        mPostDialString = PhoneNumberUtils.extractPostDialPortion(dialString);

        mCreateTime = System.currentTimeMillis();
+7 −3
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ public class SipPhone extends SipPhoneBase {
    SipPhone (Context context, PhoneNotifier notifier, SipProfile profile) {
        super("SIP:" + profile.getUriString(), context, notifier);

        if (DBG) log("new SipPhone: " + profile.getUriString());
        if (DBG) log("new SipPhone: " + hidePii(profile.getUriString()));
        mRingingCall = new SipCall();
        mForegroundCall = new SipCall();
        mBackgroundCall = new SipCall();
@@ -191,7 +191,7 @@ public class SipPhone extends SipPhoneBase {

    private Connection dialInternal(String dialString, int videoState)
            throws CallStateException {
        if (DBG) log("dialInternal: dialString=" + (VDBG ? dialString : "xxxxxx"));
        if (DBG) log("dialInternal: dialString=" + hidePii(dialString));
        clearDisconnected();

        if (!canDial()) {
@@ -765,7 +765,7 @@ public class SipPhone extends SipPhoneBase {
                            ? ""
                            : (sipAudioCall.getState() + ", ");
                    if (SCN_DBG) log("[SipAudioCallAdapter] onCallEnded: "
                            + mPeer.getUriString() + ": " + sessionState
                            + hidePii(mPeer.getUriString()) + ": " + sessionState
                            + "cause: " + getDisconnectCause() + ", on phone "
                            + getPhone());
                    if (sipAudioCall != null) {
@@ -1074,4 +1074,8 @@ public class SipPhone extends SipPhoneBase {
            Rlog.d(SACA_TAG, s);
        }
    }

    public static String hidePii(String s) {
        return VDBG ? s : "xxxxx";
    }
}