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

Commit 9b0ed63e authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Sanket Agarwal
Browse files

PBAP Logging

Move information about how many entries were synced to VDBG (and
disable) to protect any possible PII in logs.

Bug: 31855210
Change-Id: I67b0566d063411997ffda926cecd2e889f309b13
(cherry picked from commit de157fa9312e945daab25cc7813f56bb18b8ffcb)
parent e8f6b255
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import javax.obex.HeaderSet;

final class BluetoothPbapRequestPullPhoneBook extends BluetoothPbapRequest {

    private static final boolean DBG = true;
    private static final boolean VDBG = false;

    private static final String TAG = "BluetoothPbapRequestPullPhoneBook";

@@ -98,7 +98,7 @@ final class BluetoothPbapRequestPullPhoneBook extends BluetoothPbapRequest {
        Log.v(TAG, "readResponse");

        mResponse = new BluetoothPbapVcardList(mAccount, stream, mFormat);
        if (DBG) {
        if (VDBG) {
            Log.d(TAG, "Read " + mResponse.getCount() + " entries.");
        }
    }
+12 −3
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import java.util.List;

public class CallLogPullRequest extends PullRequest {
    private static boolean DBG = true;
    private static boolean VDBG = false;
    private static String TAG = "PbapCallLogPullRequest";
    private static final String TIMESTAMP_PROPERTY = "X-IRMC-CALL-DATETIME";
    private static final String TIMESTAMP_FORMAT = "yyyyMMdd'T'HHmmss";
@@ -54,7 +55,10 @@ public class CallLogPullRequest extends PullRequest {
        }

        if (DBG) {
            Log.d(TAG, "onPullComplete with " + mEntries.size() + " count.");
            Log.d(TAG, "onPullComplete");
            if (VDBG) {
                Log.d(TAG, " with " + mEntries.size() + " count.");
            }
        }
        int type;
        try {
@@ -73,7 +77,9 @@ public class CallLogPullRequest extends PullRequest {
            for (VCardEntry vcard : mEntries) {
                List<PhoneData> phones = vcard.getPhoneList();
                if (phones == null || phones.size() != 1) {
                    if (VDBG) {
                        Log.d(TAG, "Incorrect number of phones: " + vcard);
                    }
                    continue;
                }

@@ -85,7 +91,10 @@ public class CallLogPullRequest extends PullRequest {
                        try {
                            date = parser.parse(pair.second);
                        } catch (ParseException e) {
                            Log.d(TAG, "Failed to parse date " + pair.second);
                            Log.d(TAG, "Failed to parse date ");
                            if (VDBG) {
                                Log.d(TAG, pair.second);
                            }
                        }
                    }
                }
+5 −3
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import java.util.List;

public class PhonebookPullRequest extends PullRequest {
    private static final int MAX_OPS = 200;
    private static final boolean DBG = true;
    private static final boolean VDBG = false;
    private static final String TAG = "PbapPhonebookPullRequest";

    private final Account mAccount;
@@ -72,7 +72,7 @@ public class PhonebookPullRequest extends PullRequest {
            return;
        }

        if (DBG) {
        if (VDBG) {
            Log.d(TAG, "onPullComplete with " + mEntries.size() + " count.");
        }
        try {
@@ -82,7 +82,9 @@ public class PhonebookPullRequest extends PullRequest {
                }
                addContact(e);
            }
            if (VDBG) {
                Log.d(TAG, "Sync complete: add=" + mEntries.size());
            }
        } catch (OperationApplicationException | RemoteException | NumberFormatException e) {
            Log.d(TAG, "Got exception: ", e);
        } catch (InterruptedException e) {