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

Commit a14194cf authored by android-build-prod (mdb)'s avatar android-build-prod (mdb) Committed by Gerrit Code Review
Browse files

Merge "PBAP: Send remaining contacts instead of error on Contact deletion"

parents 5a7bd55f ab6f2c5a
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -344,6 +344,9 @@ public class BluetoothPbapVcardManager {
                        Log.e(TAG, "Failed to read a contact. Error reason: "
                                + composer.getErrorReason());
                        return nameList;
                    } else if (vcard.isEmpty()) {
                        Log.i(TAG, "Contact may have been deleted during operation");
                        continue;
                    }
                    if (V) {
                        Log.v(TAG, "Checking selected bits in the vcard composer" + vcard);
@@ -739,6 +742,9 @@ public class BluetoothPbapVcardManager {
                    Log.e(TAG,
                            "Failed to read a contact. Error reason: " + composer.getErrorReason());
                    return ResponseCodes.OBEX_HTTP_INTERNAL_ERROR;
                } else if (vcard.isEmpty()) {
                    Log.i(TAG, "Contact may have been deleted during operation");
                    continue;
                }
                if (V) {
                    Log.v(TAG, "vCard from composer: " + vcard);
@@ -835,6 +841,9 @@ public class BluetoothPbapVcardManager {
                    Log.e(TAG,
                            "Failed to read a contact. Error reason: " + composer.getErrorReason());
                    return ResponseCodes.OBEX_HTTP_INTERNAL_ERROR;
                } else if (vcard.isEmpty()) {
                    Log.i(TAG, "Contact may have been deleted during operation");
                    continue;
                }
                if (V) {
                    Log.v(TAG, "Checking selected bits in the vcard composer" + vcard);
@@ -921,14 +930,16 @@ public class BluetoothPbapVcardManager {
                        continue;
                    }
                    if (needSendBody == NEED_SEND_BODY) {
                        if (vcard != null) {
                            vcard = vcardfilter.apply(vcard, vcardType21);
                        }
                        if (vcard == null) {
                            Log.e(TAG, "Failed to read a contact. Error reason: "
                                    + composer.getErrorReason());
                            return ResponseCodes.OBEX_HTTP_INTERNAL_ERROR;
                        } else if (vcard.isEmpty()) {
                            Log.i(TAG, "Call Log may have been deleted during operation");
                            continue;
                        }
                        vcard = vcardfilter.apply(vcard, vcardType21);

                        if (V) {
                            Log.v(TAG, "Vcard Entry:");
                            Log.v(TAG, vcard);