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

Commit ed048ac5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "PBAP Logging"

parents e8f6b255 9b0ed63e
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) {