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

Commit ae322ece authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4466732 from c4cc0550 to pi-release

Change-Id: I398ca3c4de102d4fd0f12b8af844eebea63ffb9f
parents 71f94b4c c4cc0550
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -970,10 +970,20 @@ public class BluetoothPbapVcardManager {
        String stripedVCard = "";
        for (int i = 0; i < attr.length; i++) {
            if (attr[i].startsWith("TEL")) {
                attr[i] = attr[i].replace("(", "");
                attr[i] = attr[i].replace(")", "");
                attr[i] = attr[i].replace("-", "");
                attr[i] = attr[i].replace(" ", "");
                String[] vTagAndTel = attr[i].split(":", 2);
                int telLenBefore = vTagAndTel[1].length();
                // Remove '-', '(', ')' or ' ' from TEL number
                vTagAndTel[1] = vTagAndTel[1].replace("-", "")
                                             .replace("(", "")
                                             .replace(")", "")
                                             .replace(" ", "");
                if (vTagAndTel[1].length() < telLenBefore) {
                    if (V) {
                        Log.v(TAG, "Fixing vCard TEL to " + vTagAndTel[1]);
                    }
                    attr[i] = new StringBuilder().append(vTagAndTel[0]).append(":")
                                                 .append(vTagAndTel[1]).toString();
                }
            }
        }