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

Commit 28ebdcb2 authored by Shi Yuanjie's avatar Shi Yuanjie Committed by android-build-merger
Browse files

Merge "Fix to hide phone number printed in the log" am: b967dce9

am: ae023634

Change-Id: I3b54ecc96fc467975cb7fbcbf5325ed8b339d6fa
parents c47b1fc2 ae023634
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -337,7 +337,31 @@ public final class ConnectionRequest implements Parcelable {
                mAddress == null
                        ? Uri.EMPTY
                        : Connection.toLogSafePhoneNumber(mAddress.toString()),
                mExtras == null ? "" : mExtras);
                bundleToString(mExtras));
    }

    private static String bundleToString(Bundle extras){
        if (extras == null) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        sb.append("Bundle[");
        for (String key : extras.keySet()) {
            sb.append(key);
            sb.append("=");
            switch (key) {
                case TelecomManager.EXTRA_INCOMING_CALL_ADDRESS:
                case TelecomManager.EXTRA_UNKNOWN_CALL_HANDLE:
                    sb.append(Log.pii(extras.get(key)));
                    break;
                default:
                    sb.append(extras.get(key));
                    break;
            }
            sb.append(", ");
        }
        sb.append("]");
        return sb.toString();
    }

    public static final Creator<ConnectionRequest> CREATOR = new Creator<ConnectionRequest> () {
+8 −7
Original line number Diff line number Diff line
@@ -16,17 +16,18 @@

package android.telephony.ims;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;

import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.telecom.Call;
import android.telecom.Connection;
import android.telecom.Log;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Provides the conference information (defined in RFC 4575) for IMS conference call.
@@ -189,7 +190,7 @@ public final class ImsConferenceState implements Parcelable {
                sb.append("<");
                while (iterator.hasNext()) {
                    Entry<String, Bundle> entry = iterator.next();
                    sb.append(entry.getKey());
                    sb.append(Log.pii(entry.getKey()));
                    sb.append(": ");
                    Bundle participantData = entry.getValue();

@@ -197,7 +198,7 @@ public final class ImsConferenceState implements Parcelable {
                        sb.append(key);
                        sb.append("=");
                        if (ENDPOINT.equals(key) || USER.equals(key)) {
                            sb.append(android.telecom.Log.pii(participantData.get(key)));
                            sb.append(Log.pii(participantData.get(key)));
                        } else {
                            sb.append(participantData.get(key));
                        }