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

Commit cd03335b authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "PBAPS: Enable contact search with full or part of given string"

am: 4cece2cf

* commit '4cece2cf':
  PBAPS: Enable contact search with full or part of given string
parents 8c87f720 4cece2cf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
            }
        } else {
            if (searchValue != null) {
                compareValue = searchValue.trim();
                compareValue = searchValue.trim().toLowerCase();
            }
            for (int pos = listStartOffset; pos < listSize &&
                    itemsFound < requestSize; pos++) {
@@ -678,7 +678,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
                if (currentValue.contains(","))
                    currentValue = currentValue.substring(0, currentValue.lastIndexOf(','));

                if (searchValue.isEmpty() || ((currentValue.toLowerCase()).equals(compareValue.toLowerCase()))) {
                if (searchValue.isEmpty() || ((currentValue.toLowerCase()).startsWith(compareValue))) {
                    itemsFound++;
                    writeVCardEntry(pos, currentValue,result);
                }