mozilla-b2g/gaia — pull request #9232 by janjongboom (2013-04-17 11:39:05+00:00)
Title: Bug 856991 - Use equals to look up phone numbers in SMS app instead of contains

At the moment the SMS app does all lookups via a contains filter op to mozContacts. However, this is causing problems when sending (or receiving) messages to a number that is the substring of the number of an existing contact, because they will either be both matched, or if the shorter number is non-existing the wrong contact will be selected.

This patch introduces `findByEqualString` that does an `equals` op against mozContacts and replaces all calls (except the one in the find contact screen) by this call. I've added test cases.