Fix the problem that DB cannot be deleted if DB is not initialized.
authorsaerome.kim <saerome.kim@samsung.com>
Mon, 28 Oct 2019 12:33:16 +0000 (21:33 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Tue, 29 Oct 2019 00:45:47 +0000 (09:45 +0900)
- Problem: During factory reset, vendor-plugin can't initialize the DB.
- Cause: The DB was not opened before the DB initialization.
- Solution: Delete the DB when reset_cb() is called.

Change-Id: I65394d0c4ab9b9719cbe3f9f63f1ef82d243a583
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
packaging/ua-manager.spec
ua-daemon/src/ua-manager-core.c

index 315796c..5b5cbee 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ua-manager
 Summary:    User awareness manager
-Version:    0.12.4
+Version:    0.12.5
 Release:    1
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index 3c8fe78..520bca1 100644 (file)
@@ -3093,6 +3093,7 @@ void _uam_core_reset_database(void)
        if (UAM_ERROR_NONE != ret) {
                UAM_ERR("_uam_db_clear failed with %s",
                                _uam_manager_error_to_str(ret));
+               unlink(DATABASE_FULL_PATH);
                return;
        }