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

Commit 6d40286e authored by Smriti Gupta's avatar Smriti Gupta Committed by android-build-merger
Browse files

Merge "PBAPS: Don\'t filter out DateTime when requested"

am: 57a0f6de

* commit '57a0f6de':
  PBAPS: Don't filter out DateTime when requested
parents 8f017cd0 57a0f6de
Loading
Loading
Loading
Loading
+22 −15
Original line number Diff line number Diff line
@@ -759,7 +759,7 @@ public class BluetoothPbapVcardManager {
            NOTE(     17, "NOTE",                     false,        false),
            URL(      20, "URL",                      false,        false),
            NICKNAME( 23, "NICKNAME",                 false,        true),
            DATETIME( 28, "DATETIME", false,        true);
            DATETIME( 28, "X-IRMC-CALL-DATETIME",     false,        false);

            public final int pos;
            public final String prop;
@@ -817,12 +817,19 @@ public class BluetoothPbapVcardManager {

                    // Since PBAP does not have filter bits for IM and SIP,
                    // exclude them by default. Easiest way is to exclude all
                    // X- fields....
                    if (currentProp.startsWith("X-")) filteredIn = false;
                    // X- fields, except date time....
                    if (currentProp.startsWith("X-")) {
                        filteredIn = false;
                        if (currentProp.equals("X-IRMC-CALL-DATETIME")) {
                            filteredIn = true;
                        }
                    }
                }

                // Build filtered vCard
                if (filteredIn) filteredVCard.append(line + SEPARATOR);
                if (filteredIn) {
                    filteredVCard.append(line + SEPARATOR);
                }
            }

            return filteredVCard.toString();