48 Commits

Author SHA1 Message Date
Lefucjusz
773f2c7eb1 [BH-2069] Update license URL in headers
Update outdated license file URL in
license headers across all project.
2024-09-18 11:53:01 +02:00
rrandomsky
e2f59a13b2 [MOS-1007] Fix for add/update contact with 2 same phone numbers
There was possibility to add contact, or edit some contact, with have
2 same phone numbers (exactly the same or witch/without country code).
Now this has been fixed and is not possible to create, even by editing, contact
with 2 exactly the same numbers or 2 same numbers and one of them with a country code
2023-08-03 11:26:12 +02:00
Lukasz Mastalerz
4ddf3ce952 [CP-889] Add extended information about number duplications
Changed a way of returning information to Center about number
duplications
2023-05-31 10:10:03 +02:00
rrandomsky
e07f2db550 [MOS-864] Fix for country code in new contact based on deleted one
Fix for scenario when contact with some number with/without country code
was deleted, and new contact with same number but without/with country
code is added and then new contact have same prefix as deleted one.
Now new contact will have number exacly like provided.
2023-02-01 14:18:20 +01:00
Lukasz Mastalerz
d7c8a8a6bf [CP-1210] Contacts imported from SIM dont show up in Mudita Center
Fix for imported contacts from SIM don't show up in Mudita Center.
Added functionality to send notification after all imported contacts are
added to the database.
2023-01-26 15:12:10 +01:00
Lefucjusz
fc076fa4cc [MOS-855] Fix restore from legacy backup
Added checking if requested to restore backup
from pre-UDM version and setting db versions
to zero in such case, as version info file
(called backup.json in legacy backups) doesn't
contain info about versions.
2023-01-19 16:41:56 +01:00
Mateusz Piesta
0a9846e4a8 [MOS-694] Move DB initialization from OS to build scripts
* Switched to DB initialization at compile time
* Organized and cleaned up db files directories(not finished completely)
* Fixed DB related unit tests
* Minor improvements to CMake
* Small fixes for GCC12 build
2023-01-19 16:41:56 +01:00
rrandomsky
0342eb50c8 [MOS-737] Fix for adding a country code prefix to existing contact
Adding or removing country code from existing contacts number is
changing now number record itself, exactly when changed number
is placed in DB, instead to create new number record, to avoid
miss match during matching numbers.
2022-12-21 14:55:30 +01:00
rrandomsky
abdf9b7c45 [MOS-737] Revert "Fix for adding a country code prefix to existing ..."
This reverts commit 14d6d53ac8,
because it can cause critical error for SMS application.
2022-12-07 15:05:44 +01:00
rrandomsky
14d6d53ac8 [MOS-737] Fix for adding a country code prefix to existing contact
Adding or removing code country from contact's number creates a
new number record. Old number, which was connected witch contact
previously, is removed from the numbers table to avoid miss match
numbers. Changing country code only creates new number records,
without removing old ones. Old ones are temporary number from now.
2022-12-05 14:18:29 +01:00
GravisZro
e59cd4036b [MOS-245] Fix errant spaces
It appears in the past a major edit was made but had used a regex to
change some text which resulted in an errant space between the
enumuneration/struct/class name and the scope resolution operator.
These errant spaces have been removed.
2022-02-24 08:47:20 +01:00
Piotr Tański
7637eb0d29 [EGD-7907] Fixed contact editing
A contact could be removed during update process.
2021-11-04 10:41:25 +01:00
Piotr Tański
9820a00cbc [EGD-7474] Contacts management fixes
Fixed managing contacts on the DB side.
2021-10-04 15:06:22 +02:00
Pawel Olejniczak
cdadee24cc [CP-388] Check for duplicates before adding contact
Prevent adding duplicate contact using service desktop API.
2021-08-26 11:56:04 +02:00
Przemyslaw Brudny
10f27328e8 [EGD-7215] Connected Sim contact import with backends
Connected Sim contact import with cellular contact read
and DB contacts write.
2021-07-29 23:31:04 +02:00
Wojtek Rzepecki
3ac4bd4935 [EGD-7127] Store imported contacts in DB
Added API for storing imported contacts list
in phonebook database
2021-07-22 15:45:06 +02:00
Pawel.Paprocki
c42df2435d [EGD-6646] Fix Contact Record db tests
Clean  WAL file after db init
2021-04-29 09:44:40 +02:00
Adam Dobrowolski
940989833f [EGD-6527] Internationalization API unification
Single api to rule i18n
all calls to localistaion in cpp files unified
cut off ass many dependencies in i18n header as possible
2021-04-20 20:07:44 +02:00
Wiktor S. Ovalle Correa
10a2c37969 [EGD-3649] Fix paths in UT
Reorganization of assets left path in UT outdated.
2021-04-20 16:45:27 +02:00
Wiktor S. Ovalle Correa
3b141041e9 [EGD-5737] Merge master into experimental
Keep experimental up to date with changes from master
2021-02-17 17:09:37 +01:00
Jakub Pyszczak
ff5ed529d3 [EGD-5163] Fix UT module-db
Convert module database tests to run natively on linux.
2021-02-17 17:05:31 +01:00
Jakub Pyszczak
5ad8a9bc65 [EGD-5145] Fix remove vfs include from UT
Deprecated vfs is no more accessible. Deleted old includes.
2021-02-17 17:02:15 +01:00
RobertPiet
cafeb52103 [EGD-5317] Module-db UT solved
Vfs init.
Convertion time string to unix time returns 1 hour later than should.
DatabaseInitializer stub that just creates empty dbs with table
structure but without data. Notification table initial records moved
to Database Initilize section. UT run with a stub of Database
Initialize - new test section introduced to test original
initializer: test-initializer.
Added missing data for contacts db to run the sorted list test
and test fix.
2021-02-04 16:45:50 +01:00
Borys Jelenski
b00efa685b [EGD-5115] Fix dangling ptrs in module-db tests
The dangling ptrs derefencing freed memory has been fixed.
They caused the tests to trigger the ASan. Additonally, in some tests
where DB objects were allocated dynamically, they are now allocated
automatically on the stack to simplify the code.
2021-02-04 16:45:50 +01:00
jimmorrisson
14918dc4f9 [EGD-4925] Change new filesystem handling implementation in module-gui. (#1193)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module gui. There are some modifications in other modules included which are necessary because of build system issues.
2020-12-16 15:23:11 +01:00
jimmorrisson
6711e02bad [EGD-4446] Change: new filesystem handling implementation in module db. (#1052)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module database. It also contains minor fixes in module-db.
2020-12-05 10:40:27 +01:00
Krzysztof Mozdzynski
0ef0d615f3 [EGD-4150] Change filename i18 to i18n (#1108)
Change filename of internationalization files from i18 to i18n.

I18n should stand for internationalization, not i18. That's why I changed in 'module-utils' name of the folder 'i18' and both .cpp and .hpp files to 'i18n'.
2020-11-27 18:31:00 +01:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Pawel Olejniczak
f8b82e887c [EGD-3679] Replace vCard encoding with plain text for exporting contact data
[EGD-3679] Update contact record tests

[EGD-3679] Clean up ContactRecord

[EGD-3679] Remove vcard encoding

[EGD-3679] Update changelog
2020-09-16 11:16:47 +02:00
Radoslaw Wicik
1a919db2ed [EGD-2974] Support for temporary contacts as a group 2020-09-15 15:04:10 +02:00
Marcin Smoczyński
d0a43c0346 [EGD-3507] phonebook: fix duplicates on update
Fix duplicates detection when updating a contact.

Before this change dupliates detection both for numbers and speed dial
was not implemented at all.

Fix contact update procedure - add unbinding procedure if a new number
was bound to another contact before update. Do the same for speed dial.

Fix invalid contact number tests (it wasn't taken into account that each
section has clean db state).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-08-21 10:58:42 +02:00
Marcin Smoczyński
060df7e11f [EGD-3370] phonebook: fix alternative number
Enable handling of an alternative number in phonebook.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-08-04 17:07:37 +02:00
Radoslaw Wicik
61db889b18 [EGD-3428] Fix db interface functions names - Update Tests 2020-07-16 10:55:07 +02:00
Radoslaw Wicik
c2b8a33d4b [EGD-3428] Fix db interface functions names - Database class 2020-07-16 10:55:07 +02:00
Marcin Smoczyński
a9cb37d7f4 tests: add proper catch2 handling
Add proper catch2 support:
 - add catch2 as a submodule
 - add cmake function to add test easily
 - discover each test in test binary
 - remove copies of catch.hpp
 - do not try to process tests for rt1051

Do not test internals of utf8, only public interface (nasty bugs could
occur otherwise).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-24 10:38:14 +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
Pawel Olejniczak
bb3191ed73 [EGD-3126] Update tests of contact name formatting 2020-06-03 19:00:20 +02:00
Pawel Olejniczak
cae8e740cf [EGD-3195] Add sections to ContactRecord_tests 2020-05-12 11:54:36 +02:00
Pawel Olejniczak
ed3eefa001 [EGD-3195] Add unit tests for contact name formatting 2020-05-12 11:54:36 +02:00
Pawel Olejniczak
2014feabc7 [EGD-3155] Add changes suggested by reviewers 2020-05-08 08:57:29 +02:00
Pawel Olejniczak
6eed387019 [EGD-3155] Update db unit tests according to last changes with contact address 2020-05-08 08:57:29 +02:00
Alek Rudnik
55ec93cccf [EGD-2986] fixed module db UT (#326)
* [EGD-2986] fixed module db UT

* [EGD-2986] missing change

* []EGD-2986] add BD init check

* [EGD-2986] fix in threads table
2020-04-23 12:41:30 +02:00
Radoslaw Wicik
a8573a404c Apply new style 2020-03-17 10:03:16 +01:00
pholat
93d964f532 Phonebook: Updated db tests 2019-08-26 09:25:40 +02:00
Mati
2918195e2c Slight change in records API(constructors) 2019-06-07 14:16:57 +02:00
Mati
35982af81c WiP: ThreadRecord 2019-06-04 15:59:30 +02:00
Mati
951604cb95 Minor API updates. Finished implementing ContactRecord 2019-06-04 15:46:54 +02:00
Mati
d446b0ac94 WiP: record interface 2019-06-04 08:27:30 +02:00