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

Commit 76c89dfe authored by moezbhatti's avatar moezbhatti
Browse files

Improve phone number matching when country code might be there

parent 1484ab3e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -44,7 +44,10 @@ class PhoneNumberUtils @Inject constructor(context: Context) {
        }

        if (PhoneNumberUtils.compare(first, second)) {
            if (phoneNumberUtil.isNumberMatch(first, second) >= PhoneNumberUtil.MatchType.NSN_MATCH) {
            val firstNumber = parse(first) ?: return false
            val secondNumber = parse(second) ?: return false
            val matchType = phoneNumberUtil.isNumberMatch(firstNumber, secondNumber)
            if (matchType >= PhoneNumberUtil.MatchType.NSN_MATCH) {
                return true
            }
        }