Commit Graph

8 Commits

Author SHA1 Message Date
jimmorrisson
04fd5dfaf0 [EGD-3147] SMS incoming ASCII characters (#939) 2020-11-04 14:37:38 +01:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Piotr Tanski
24c927ef39 [EGD-3988] SMS thread for a specific contact shall be splitted into separate ones if multiple phone numbers are available. (#801) 2020-10-09 14:32:22 +02:00
Marcin Smoczyński
737e586dde [EGD-3300] allow empty e164 on parsing
Do not throw on empty e164 while parsing number records.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-19 15:06:46 +02:00
Marcin Smoczyński
0936930063 [EGD-2593] improved matching contact by numbers
Introduced format aware phone number comparison to allow improved
matching phone numbers with contacts.

Phone numbers are also displayed formatted on a phonebook/calllog
list view and on detailed contact info view.

Entered and e164 number are verified to match each other during
processing db request.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-17 14:01:38 +02:00
Marcin Smoczyński
a4a8315b97 fix empty calllog list item
Fix empty calllog title when number comes in national format. The
problem was caused by:
 1. making assumption that every number from cellular network comes in
 e164 format which is not true,
 2. using e164 number when looking for contact matching calllog entry
 without checking if e164 exists for calllog entry.
Fix problem by:
a.d.1 - replacing `PhoneNumber::viewFromE164` with less strict
`PhoneNumber::Parse` method which basically is a convenience method
which creates `PhoneNumber` entity and uses it to create a `View`.
a.d.2 - instead of fetching e164 directly introduce `getNonEmpty` method
of a View, which returns e164 number if it is present and entered number
otherwise.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-05-18 17:31:57 +02:00
Marcin Smoczyński
b434745311 utils: fix various minor bugs in phonenumber
Bugs:
 - invalid number validation
 - no `const` qualifier in comparison operators
 - lack of comparison operator for PhoneNumber::View

Add appropriate unit tests.
2020-05-18 01:17:08 +02:00
Marcin Smoczyński
c47923d70a [EGD-3107] Call number validation
Use specialized class to to pass phone number between apps and services
instead of ambigious std::string. Introduced class (utils::PhoneNumber)
wraps calls to libphonenumber providing more convienient interface.
However using libphonenumber directly may be resource hungry in terms
of stack, heap and cpu usage, so helper class has been introduced to
pass information about phone numbers (utils::PhoneNumber::View). It is
designed to maintain integrity thus can be created from an instance of
utils::PhoneNumber only or moved/copied to.

Add new field to the calllog db holding e164 formatted number. Both
entered and e164 numbers will be needed to be able to match with
contacts correctly.

Add constexpr information about country codes (utils::country).
2020-05-05 00:51:53 +02:00