mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864695 - [Dialer] Numbers starting with 5 retrive wrong phone number suggestions. r=reuben.bmo, r=bent
This commit is contained in:
parent
acfc9a35b1
commit
2364dfa204
@ -498,22 +498,14 @@ ContactDB.prototype = {
|
||||
}
|
||||
|
||||
// containsSearch holds incremental search values for:
|
||||
// normalized number, national format, international format
|
||||
// normalized number and national format
|
||||
for (let i = 0; i < normalized.length; i++) {
|
||||
containsSearch[normalized.substring(i, normalized.length)] = 1;
|
||||
}
|
||||
if (parsedNumber) {
|
||||
if (parsedNumber.nationalFormat) {
|
||||
let number = PhoneNumberUtils.normalize(parsedNumber.nationalFormat);
|
||||
for (let i = 0; i < number.length; i++) {
|
||||
containsSearch[number.substring(i, number.length)] = 1;
|
||||
}
|
||||
}
|
||||
if (parsedNumber.internationalFormat) {
|
||||
let number = PhoneNumberUtils.normalize(parsedNumber.internationalFormat);
|
||||
for (let i = 0; i < number.length; i++) {
|
||||
containsSearch[number.substring(i, number.length)] = 1;
|
||||
}
|
||||
if (parsedNumber && parsedNumber.nationalFormat) {
|
||||
let number = PhoneNumberUtils.normalize(parsedNumber.nationalFormat);
|
||||
for (let i = 0; i < number.length; i++) {
|
||||
containsSearch[number.substring(i, number.length)] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,9 +122,7 @@ var steps = [
|
||||
filterValue: number1.international};
|
||||
req = mozContacts.find(options);
|
||||
req.onsuccess = function () {
|
||||
ok(req.result.length == 1, "Found exactly 1 contact.");
|
||||
findResult1 = req.result[0];
|
||||
ok(findResult1.id == sample_id1, "Same ID");
|
||||
ok(req.result.length == 0, "Found exactly 0 contacts.");
|
||||
next();
|
||||
};
|
||||
req.onerror = onFailure;
|
||||
@ -220,9 +218,7 @@ var steps = [
|
||||
filterValue: number2.international};
|
||||
req = mozContacts.find(options);
|
||||
req.onsuccess = function () {
|
||||
ok(req.result.length == 1, "Found exactly 1 contact.");
|
||||
findResult1 = req.result[0];
|
||||
ok(findResult1.id == sample_id1, "Same ID");
|
||||
ok(req.result.length == 0, "Found exactly 1 contact.");
|
||||
next();
|
||||
};
|
||||
req.onerror = onFailure;
|
||||
|
Loading…
Reference in New Issue
Block a user