platform/core/connectivity/ua-manager.git
5 years agoSet default light threshold as 2
saerome.kim [Fri, 27 Sep 2019 06:24:42 +0000 (15:24 +0900)]
Set default light threshold as 2

Change-Id: I4a4da9d914bffb0535a803b5f24080aaa26fb850
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoAllow device to be removed when discriminant disabled accepted/tizen/unified/20190929.221439 submit/tizen/20190927.055416
Abhay Agarwal [Fri, 27 Sep 2019 03:51:07 +0000 (12:51 +0900)]
Allow device to be removed when discriminant disabled

Change-Id: I5aeb906656032597a6656ccceeed02706239e4e7
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoFixed svace issues.
saerome.kim [Fri, 27 Sep 2019 01:38:01 +0000 (10:38 +0900)]
Fixed svace issues.

410291: Potential Memory Leak.
410713: Handle leak of SQLLite statement.
401702, 410740, 410741: Memory leak.
410742: Missing null-check.

Change-Id: I709b77dc29699c434e94bc5645455bcfdeb53bed
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoUpdate default presence/absence threshold
Abhay Agarwal [Thu, 26 Sep 2019 05:30:15 +0000 (14:30 +0900)]
Update default presence/absence threshold

Change-Id: I3ef0ad7c4cdecaa7e2dcabb4d696f2bc53623e6b
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoAPI Support for set presence/absence threshold
Abhay Agarwal [Wed, 25 Sep 2019 10:42:45 +0000 (19:42 +0900)]
API Support for set presence/absence threshold

Change-Id: I74daf1f806afa4df35fbb8c6e20acefd86b57151
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agosensor info memory issues
Abhay Agarwal [Tue, 24 Sep 2019 03:53:06 +0000 (12:53 +0900)]
sensor info memory issues

Change-Id: I5a8cfee673741c30cb7c1cb24dbb562256669efe
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoProvide sensor information in detection callback
Abhay Agarwal [Fri, 20 Sep 2019 10:13:35 +0000 (19:13 +0900)]
Provide sensor information in detection callback

Change-Id: Ic36c9180ad27660ab20059f05cd5441a3cbc6ae1
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoAdded script to create .ua-manager-data.db
saerome.kim [Tue, 24 Sep 2019 03:50:05 +0000 (12:50 +0900)]
Added script to create .ua-manager-data.db
Added APACHE-2.0 license in ua_db.sql

Change-Id: I6068784d0b2bd60d5a7478922ca12d20b188bd94
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoupdate ua_db.sql for db migration support
Abhay Agarwal [Tue, 24 Sep 2019 01:39:12 +0000 (10:39 +0900)]
update ua_db.sql for db migration support

Change-Id: I7b7b5dfd85e196e6e71243955f9e38861d597d6a
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoFixed svace issues. accepted/tizen/unified/20190923.225303 submit/tizen/20190923.121724
saerome.kim [Mon, 23 Sep 2019 12:12:07 +0000 (21:12 +0900)]
Fixed svace issues.

410290, 410291, 410292, 410293: Memory leak due to unrelaseing
returned pointer after calling sql3_mrprintf()

Change-Id: I4eb8c49027f25c1e901905848ee0ff6f930b440c
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed a coverity issue.
saerome.kim [Mon, 23 Sep 2019 08:45:19 +0000 (17:45 +0900)]
Fixed a coverity issue.

- 1087243 (#1 of 1): var_deref_model: Passing null pointer database to
sqlite3_busy_handler, which dereferences it.

Change-Id: I7ca3b4ec8c3fe26544ae7a2986088fae76e8cd9a
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years ago[Fix] Absence detection callback 37/214437/1
Abhay Agarwal [Wed, 18 Sep 2019 10:33:58 +0000 (19:33 +0900)]
[Fix] Absence detection callback

Change-Id: Id9acbf51ab574be1348f9342612f4b4abe2dd426
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years ago[Fix] Presence detection callback 36/214436/1
Abhay Agarwal [Wed, 18 Sep 2019 04:34:12 +0000 (13:34 +0900)]
[Fix] Presence detection callback

Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
This patch fix the issue of presence callback not being received in ALL mode,
when light presence was detected before motion.

Change-Id: Id1b5811d695a66762ac70ef8e77f46b413f43081

5 years agoAdd functionality to check database version 35/214435/1
Abhay Agarwal [Tue, 17 Sep 2019 09:16:38 +0000 (18:16 +0900)]
Add functionality to check database version

Change-Id: I3c8f7194cd04b2822569de24e9e8e763b16c5311
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
5 years agoChaged default detection cycle: 900sec 54/213954/1
saerome.kim [Tue, 17 Sep 2019 02:21:29 +0000 (11:21 +0900)]
Chaged default detection cycle: 900sec
Remove an unused config. file.

Change-Id: Idc026724fd32d4cba16528cd9988cd3d2d441217
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoEnable continuous monitoring for envionmental sensors accepted/tizen/unified/20190917.034055 submit/tizen/20190916.120818
Abhay agarwal [Mon, 2 Sep 2019 09:29:33 +0000 (14:59 +0530)]
Enable continuous monitoring for envionmental sensors

Change-Id: Ib96df58d03eb615dad246beee28f12130fc999ec
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed a coverity issue
saerome.kim [Mon, 16 Sep 2019 09:50:11 +0000 (18:50 +0900)]
Fixed a coverity issue

1047600 leaked_storage: Variable out_var going out of scope leaks the storage it points to.

Change-Id: I1aaae9068efe4cce8c020f3e974909a119c52c15
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoAdd database API to clear adv table
Abhay agarwal [Fri, 13 Sep 2019 07:13:49 +0000 (12:43 +0530)]
Add database API to clear adv table

Change-Id: I1fa74d4d5adff3e3121e6357c54f4a997f3e5478
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years ago[Fix] coding style and remove extra comments
Abhay agarwal [Mon, 9 Sep 2019 06:58:44 +0000 (12:28 +0530)]
[Fix] coding style and remove extra comments

Change-Id: I455546293fc2982e5433c52998ab42b580bad1b1
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoRemove duplicate code to check table creation
Abhay agarwal [Fri, 6 Sep 2019 11:15:03 +0000 (16:45 +0530)]
Remove duplicate code to check table creation

Change-Id: I8973346679cfb0fd58cf6e8c6889cdb697fab885
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoRemove extra comments from code
Abhay agarwal [Fri, 6 Sep 2019 09:35:46 +0000 (15:05 +0530)]
Remove extra comments from code

Change-Id: I4a03ab1b941a2c3cca4392d99fe0dd9073268ddb
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoUpdate DB recovery logic
Abhay agarwal [Fri, 6 Sep 2019 06:25:29 +0000 (11:55 +0530)]
Update DB recovery logic

Change-Id: I2f43ff3c4842f5ffdb6b315ae2bda72f80edb1b2
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoRefactor db code to increase SAM score
Abhay agarwal [Thu, 5 Sep 2019 13:45:09 +0000 (19:15 +0530)]
Refactor db code to increase SAM score

Change-Id: I080dc2c315851b5f0166c20ef8bf9ac856ae6b3b
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoUpdate integrity check error codes
Abhay agarwal [Thu, 5 Sep 2019 11:33:44 +0000 (17:03 +0530)]
Update integrity check error codes

Change-Id: I21cb36f401a0684f21f850ad92002d4e054f0117
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoSet maximum attempts to access db in case db is locked
Abhay agarwal [Thu, 5 Sep 2019 11:04:52 +0000 (16:34 +0530)]
Set maximum attempts to access db in case db is locked

Change-Id: Ibed4b25c766e8e84ca6446737db8ccaa5aea4440
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoMove common db function from user table file
Abhay agarwal [Thu, 5 Sep 2019 10:00:34 +0000 (15:30 +0530)]
Move common db function from user table file

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
This patch also refactor the check_integrity function in multiple useful functions
Changes done as per db review

Change-Id: Ie9d0c08c9b2c64ac9d289cd73526ee4232f615ab

5 years ago[DB Review] DB commitee review comments.
saerome.kim [Thu, 5 Sep 2019 08:21:48 +0000 (17:21 +0900)]
[DB Review] DB commitee review comments.

Change-Id: Id8431c88a9cc4e6a673d9b947501768aa171d3db
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFix DB review issues 57/213357/1 accepted/tizen/unified/20190904.224508 submit/tizen/20190904.113521
Abhay agarwal [Wed, 4 Sep 2019 09:34:10 +0000 (15:04 +0530)]
Fix DB review issues

4. There is no code for releasing 'adv' table at _ua_db_deinitialize().
8. When checking the table in__check_integrity(),
 206 line: printing UAM_DB_IBEACON_ADV_TABLE using sqlite3_mprintf,
 221 line: On the other hand, printing UAM_DB_DEVICES_TABLE out when checking done successfully.

Change-Id: Ic8c0ab234bbaaa1d68a06c3fa6fc13cc51dcbce9
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed a svace issue 40/213340/2
saerome.kim [Wed, 4 Sep 2019 07:36:25 +0000 (16:36 +0900)]
Fixed a svace issue

406758: Non-terminated string of size 32.

Change-Id: I7d868df7f6a97ad886281e586dd468e5a0115e18
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed the problem that device can't be added to each plugin when ua-manager restart. accepted/tizen/unified/20190904.011549 submit/tizen/20190903.134657
saerome.kim [Tue, 3 Sep 2019 04:41:36 +0000 (13:41 +0900)]
Fixed the problem that device can't be added to each plugin when ua-manager restart.

Change-Id: I6ee109be28f9044575f48b83884864da2a33fd07
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoGet ibeacon adv list during initialization and add to plugin accepted/tizen/unified/20190830.110648 submit/tizen/20190830.050936
Abhay agarwal [Thu, 29 Aug 2019 10:47:57 +0000 (16:17 +0530)]
Get ibeacon adv list during initialization and add to plugin

Change-Id: I583c89dcfad00b10f4836d01f2ce5da73bfc6483
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoSupoort to add iBeacon Adv data in BLE Plugin
Abhay agarwal [Wed, 28 Aug 2019 08:18:53 +0000 (13:48 +0530)]
Supoort to add iBeacon Adv data in BLE Plugin

Change-Id: Iffacdd262e02c6d7cbeec3b93404c383207c6f24
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoAPI set to store ibeacon adv data
Abhay agarwal [Wed, 28 Aug 2019 04:58:12 +0000 (10:28 +0530)]
API set to store ibeacon adv data

Change-Id: Idffb8e303fba1f423e6f7692b51b25d92b2b6fc5
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years ago[Fix] Allow device to be removed when in default service accepted/tizen/unified/20190826.225907 accepted/tizen/unified/20190829.101441 submit/tizen/20190826.140219 submit/tizen/20190827.131417
Abhay agarwal [Mon, 26 Aug 2019 04:57:42 +0000 (10:27 +0530)]
[Fix] Allow device to be removed when in default service

Change-Id: I95f7209e7d25d8b4408ccacd5c92d632a6d8e6ed
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoRemove device only when not being used by any service
Abhay agarwal [Thu, 22 Aug 2019 12:00:52 +0000 (17:30 +0530)]
Remove device only when not being used by any service

Change-Id: I3fc7bfc47acc7fa82d29c5ca57d064d6728b1be1
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed the Coverity and Svace issues.
saerome.kim [Mon, 26 Aug 2019 09:08:05 +0000 (18:08 +0900)]
Fixed the Coverity and Svace issues.

1078581 Dereferencing null pointer tech.
1078570 leaked_storage: Variable 'app' going out of scope leaks the storage it points to.
386920 leaked_storage: Variable 'mac' going out of scope leaks the storage it points to.

Change-Id: I8dee929466df35ec1e577770846c9423a2ba895e
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoRemoved d-bus warning message
saerome.kim [Mon, 26 Aug 2019 05:17:36 +0000 (14:17 +0900)]
Removed d-bus warning message

- [GLib Err] GLib-0x08: g_variant_unref: assertion 'value->ref_count > 0' failed

Change-Id: Ieeeb6761bce1a6fe90f841195488b7ddd75d44e8
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed a bug that NULL DB path problem. 61/212561/1
saerome.kim [Fri, 23 Aug 2019 04:41:20 +0000 (13:41 +0900)]
Fixed a bug that NULL DB path problem.

Once used a parameter with either lon or '_' chracter in the middle or
the parameter, that regarded as NULL. In this case  DB path regarded as NULL.

Change-Id: Ief0b51b5fb01daf32badb01e7fd5d9d550514f6b
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed Doxygen issues in header file and corrected spelling mistake in log print 63/212463/1 accepted/tizen/unified/20190822.105942 submit/tizen/20190822.051725
Nishant Chaprana [Wed, 21 Aug 2019 12:42:38 +0000 (18:12 +0530)]
Fixed Doxygen issues in header file and corrected spelling mistake in log print

Change-Id: I4bca73b41dd7f4d1ef8b10c716ec996a7d8ccb08
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoRemoved 'users' group's access permission. 62/212462/1
saerome.kim [Wed, 21 Aug 2019 12:35:01 +0000 (21:35 +0900)]
Removed 'users' group's access permission.

- Do not allow 'users' group to access ua-manager.

Change-Id: I9fd90f925ff7716096ba37e160cb48715a5da440
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoIncreased SAM score 61/212461/1
saerome.kim [Wed, 21 Aug 2019 12:33:58 +0000 (21:33 +0900)]
Increased SAM score

- Increase Duplicated Code ratio.
- Removed all Global Variable violations.
- Removed all Predefined Preprocessor violations.

Change-Id: I059dfc8d902ef9a6bf9be282380d0e6ba1aad3bd
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoModification to store device_icon in database
Abhay agarwal [Tue, 20 Aug 2019 05:17:16 +0000 (10:47 +0530)]
Modification to store device_icon in database

Change-Id: Ia3a477355b5d6e1de2b9dcc57d95a3bce5b68c5e
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoModify update device API to support BLE payload update
Abhay agarwal [Mon, 19 Aug 2019 13:13:37 +0000 (18:43 +0530)]
Modify update device API to support BLE payload update

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed missing Svace issue.
saerome.kim [Mon, 19 Aug 2019 12:34:00 +0000 (21:34 +0900)]
Fixed missing Svace issue.

1242351: fixed potential crash issue.

Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed coverity issues 49/212249/1 accepted/tizen/unified/20190819.112109 submit/tizen/20190819.084830
saerome.kim [Mon, 19 Aug 2019 08:03:53 +0000 (17:03 +0900)]
Fixed coverity issues

1047600: Fixed memory leak issue.

Change-Id: I8aaa5f3474fd0595aa4a6143914763ec24ec229c
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed svace issues. 48/212248/1
saerome.kim [Mon, 19 Aug 2019 06:48:02 +0000 (15:48 +0900)]
Fixed svace issues.

386920: Added null-check routine.
300446,400466,1242348,1242352: Fixed potential memory leak problem.
1242351: Added missing null-check routine.

Change-Id: I6a64aa6dd8b51921c512c1a1242e5b7957fda097
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFix and update discriminant and payload values for plugin 18/212218/1
Abhay agarwal [Fri, 16 Aug 2019 10:47:59 +0000 (16:17 +0530)]
Fix and update discriminant and payload values for plugin

Change-Id: Ia324e70804802667075f11d261b16509072844d7
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoChanged duid -> DUID in comments. 17/212217/1
saerome.kim [Fri, 16 Aug 2019 02:21:26 +0000 (11:21 +0900)]
Changed duid -> DUID in comments.

Change-Id: I8e557c5580927bcbdce9bf98359f39156bf423e5
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoRemove unnecessary NULL checks 16/212216/1
Abhay agarwal [Wed, 14 Aug 2019 10:16:43 +0000 (15:46 +0530)]
Remove unnecessary NULL checks

Change-Id: I9cf076700e0dd68eeed2600cabb931819cb709fc
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFix to store only required bytes of BLE payload into DB 15/212215/1
Lokesh [Mon, 12 Aug 2019 10:23:53 +0000 (15:53 +0530)]
Fix to store only required bytes of BLE payload into DB

Put number of bytes to be stored instead of '-1'. As -1 continues untill
a NULL character is encountered.

Change-Id: Iec025a35f8e610a92c9ae5ef39412bf450d6f524
Signed-off-by: Lokesh <l.kasana@samsung.com>
5 years agoModify BLE payload structure 14/212214/1
Abhay agarwal [Tue, 13 Aug 2019 06:44:43 +0000 (12:14 +0530)]
Modify BLE payload structure

Change-Id: I58c9403bf3e7247f8ba1a456808838d0956683fb
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoSend device_id in USER_PRESENCE_DETECTED event 13/212213/1
Nishant Chaprana [Mon, 12 Aug 2019 10:12:33 +0000 (15:42 +0530)]
Send device_id in USER_PRESENCE_DETECTED event

Change-Id: I9146db9747cc18fc34e04bc6ac78f9d606e5b7e0
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoRemove duplicate dependency with implicit dependencies at "Type=dbus" 95/212095/1 accepted/tizen/unified/20190816.112346 submit/tizen/20190814.071136
INSUN PYO [Wed, 14 Aug 2019 07:06:56 +0000 (16:06 +0900)]
Remove duplicate dependency with implicit dependencies at "Type=dbus"

Refs: https://www.freedesktop.org/software/systemd/man/systemd.service.html
 - Services with Type=dbus set automatically acquire dependencies of type Requires= and After= on dbus.socket.

Change-Id: Ib02196227e07f417955840fa75b74622a22f80a6

5 years agobacked out the change made which followed security's guideliine. accepted/tizen/unified/20190816.112354 submit/tizen/20190814.071001
saerome.kim [Wed, 14 Aug 2019 05:36:55 +0000 (14:36 +0900)]
backed out the change made which followed security's guideliine.

Change-Id: I3735c588b2a55971477139452288e9023b3781b1
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed security 3rd vulnerability issues. 86/211986/1
saerome.kim [Tue, 13 Aug 2019 03:54:56 +0000 (12:54 +0900)]
Fixed security 3rd vulnerability issues.

Change-Id: I8857c60b9f424d927440c07cd96e014263bc977d
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agobackout detection parameters 04/211904/1
saerome.kim [Mon, 12 Aug 2019 01:45:53 +0000 (10:45 +0900)]
backout detection parameters

- detection cycle: 60sec -> 900sec
- detection window : 60sec
- max. detection period: 50sec -> 290sec

Change-Id: Ie4c09cd4a73246864d42d7af36c58fec8cea8b8b
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFix ble payload NULL issue 17/211817/1
Abhay agarwal [Tue, 6 Aug 2019 09:50:31 +0000 (15:20 +0530)]
Fix ble payload NULL issue

Change-Id: If2b186cfeea63fb9a0ebae5cffb5f6bbfa548074
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoUse memcpy/memdup as there can be intermediate NULLs in BLE payload 16/211816/1
Lokesh [Mon, 5 Aug 2019 09:47:40 +0000 (15:17 +0530)]
Use memcpy/memdup as there can be intermediate NULLs in BLE payload

Change-Id: Icc684c590d4af8c2c3ad33e6d49429e67bdd7a41
Signed-off-by: Lokesh <l.kasana@samsung.com>
5 years agoUpdate APIs to set/get BLE payload 15/211815/1
Abhay agarwal [Thu, 1 Aug 2019 09:53:12 +0000 (15:23 +0530)]
Update APIs to set/get BLE payload

Change-Id: I97ca8cef7658d63bf47046ccd9ecb5ab4a9b9333
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed vulnerability issues. 83/211483/1
saerome.kim [Tue, 6 Aug 2019 00:52:44 +0000 (09:52 +0900)]
Fixed vulnerability issues.
Added out-of-memory error code.

Change-Id: I3efc6f1dd82b81f4d05646e36325bb5f5d9330b0
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoImplemented ua_udpate_device API 82/211482/1
saerome.kim [Mon, 5 Aug 2019 10:53:15 +0000 (19:53 +0900)]
Implemented ua_udpate_device API
Implemented discriminant functionality

Change-Id: Id85aeedebd5323e6539a09a29297805b6fe30ebf
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed build error 62/211162/1 accepted/tizen/unified/20190730.224309 submit/tizen/20190730.123157
saerome.kim [Tue, 30 Jul 2019 11:14:47 +0000 (20:14 +0900)]
Fixed build error

Change-Id: I6c8f6ad3e8dcc51e7f42c84336deb3adb91b9bcd
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed crash if all devices are removed during reporting ABSENCE event. 40/211140/1
saerome.kim [Tue, 30 Jul 2019 07:56:07 +0000 (16:56 +0900)]
Fixed crash if all devices are removed during reporting ABSENCE event.

Change-Id: Id7e0822b4c2f636881b08f41064d94212e5e57e0
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoDeleted multiple macros in the same meaning. 39/211139/1
saerome.kim [Tue, 30 Jul 2019 01:46:27 +0000 (10:46 +0900)]
Deleted multiple macros in the same meaning.

Change-Id: Ia9e0cab1dc62104d2ca799f9ecc5c66a43948814
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoRemoved redundant codes related to DB management. 83/211083/1
saerome.kim [Tue, 30 Jul 2019 01:29:12 +0000 (10:29 +0900)]
Removed redundant codes related to DB management.

Change-Id: Id8bc6dc853c9e20559f8b5bbfd172e2e829149f5
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoModified to create tablses after creating new DB file in case of DB 77/211077/1
saerome.kim [Mon, 29 Jul 2019 23:52:46 +0000 (08:52 +0900)]
Modified to create tablses after creating new DB file in case of DB
error.

Change-Id: I85833d74b5f0652c0f7c48882d1e08c3170c0449
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFix db integrity check 76/211076/1
Abhay agarwal [Mon, 29 Jul 2019 08:28:29 +0000 (13:58 +0530)]
Fix db integrity check

Change-Id: I9227598ad860ea925dce54cd6912ce74086d0af6
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years ago[Fix] device insertion failed issue due to mismatched query arguments. 89/210889/1
Nishant Chaprana [Thu, 25 Jul 2019 14:00:31 +0000 (19:30 +0530)]
[Fix] device insertion failed issue due to mismatched query arguments.

Change-Id: I30aa462cfed2199c7d30630b7bc1f7d254ee1a55
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoAdd DB integrity check 88/210888/1
Abhay agarwal [Thu, 25 Jul 2019 13:07:49 +0000 (18:37 +0530)]
Add DB integrity check

Change-Id: Ie4f3a26069193b047b4c0c80e2ef9a99b9de7f12
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoUpdate discriminant functionality 87/210887/1
Nishant Chaprana [Thu, 25 Jul 2019 11:12:17 +0000 (16:42 +0530)]
Update discriminant functionality

This patch removes DBUS api for updating discriminant variable at runtime.
The variable should be updated at device addition time.

The patch also adds support for fetching discriminant value from database.

Change-Id: Ie4723eb0e7bac3290c9047544e97add4cdd38954
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoFix svace issue and remove not used files 86/210886/1
Abhay agarwal [Thu, 25 Jul 2019 09:09:03 +0000 (14:39 +0530)]
Fix svace issue and remove not used files

Change-Id: Ib8f6e9be2db8eef8e8b27120c7be86597c42e443
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoAdded discriminant functionality 85/210885/1
saerome.kim [Thu, 25 Jul 2019 06:02:13 +0000 (15:02 +0900)]
Added discriminant functionality

This function is used to set/get 'discriminant' flag to determine
whether a device to be deteced or not.

Change-Id: I3797b778d050dfb1a6a3c2386ca87a19e6b3e521
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed build error due to wrong dbus policy. 46/210746/1 accepted/tizen/unified/20190724.130104 submit/tizen/20190724.080451
saerome.kim [Wed, 24 Jul 2019 07:36:58 +0000 (16:36 +0900)]
Fixed build error due to wrong dbus policy.

Change-Id: I302a9fce5c1932ceb0899b3b07096998edf7bf69
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoDelete meaningless configuration 17/209517/3
INSUN PYO [Mon, 8 Jul 2019 11:04:25 +0000 (20:04 +0900)]
Delete meaningless configuration

Change-Id: I9e67a45241f7cc80f8ea58049653d06771180c7b

5 years agoCorrected type of last_seen variable from [long long int] to [long] 83/210683/1
Nishant Chaprana [Tue, 23 Jul 2019 15:37:38 +0000 (21:07 +0530)]
Corrected type of last_seen variable from [long long int] to [long]

Change-Id: Ic5405eb3cf92e40f65dca4334304406a6311e5aa
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoremove device from service when device being removed 62/210662/1
Abhay agarwal [Tue, 23 Jul 2019 11:12:55 +0000 (16:42 +0530)]
remove device from service when device being removed

Change-Id: I6f484976fe27e8bc054f35e7773bb43b5c080c70
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoupdate service list in init 27/210627/2
Abhay agarwal [Mon, 22 Jul 2019 13:35:26 +0000 (19:05 +0530)]
update service list in init

Change-Id: I109b9ced98f5701fa72f0f27322f05e72dae5ac2
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoRemoved useless dbus configuration. 18/210518/1
saerome.kim [Mon, 22 Jul 2019 03:48:49 +0000 (12:48 +0900)]
Removed useless dbus configuration.

Change-Id: Ie5433271c229e8fa995434bf32ae49dc902af21e
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoSending timestamp for Presence and Absence event of user. 17/210517/1
Nishant Chaprana [Fri, 19 Jul 2019 11:39:32 +0000 (17:09 +0530)]
Sending timestamp for Presence and Absence event of user.

Change-Id: I1832053850e9afd8f84f05ee93093138bc1c0f72
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoModified so that motion/light sensors can be detected even if a user or 16/210516/1
saerome.kim [Fri, 19 Jul 2019 03:55:45 +0000 (12:55 +0900)]
Modified so that motion/light sensors can be detected even if a user or
a device is not added.

Change-Id: I6722fdf204fdec72b26628205b29e9536e572fee
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoAdded two APIs(service category support) in header file 83/210283/1 accepted/tizen/unified/20190718.075204 submit/tizen/20190718.035616
Lokesh [Tue, 16 Jul 2019 08:31:29 +0000 (14:01 +0530)]
Added two APIs(service category support) in header file

1/ _uam_request_get_service_users
2/ _uam_request_get_service_devices

Change-Id: I97cfbe7967cf0945008982af2d7f999cdb2af4aa
Signed-off-by: Lokesh <l.kasana@samsung.com>
5 years agoRemoved redundant check for list pointer in __uam_core_get_dev_tech_info() 82/210282/1
Nishant Chaprana [Mon, 15 Jul 2019 10:05:01 +0000 (15:35 +0530)]
Removed redundant check for list pointer in __uam_core_get_dev_tech_info()

Change-Id: Ic7cb291b8927c4e0cd4604e1a4d5e32d2358c774
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoFixed Tizen coding guidelines warnings 81/210281/1
Nishant Chaprana [Mon, 15 Jul 2019 09:57:32 +0000 (15:27 +0530)]
Fixed Tizen coding guidelines warnings

Change-Id: Ic51b6b45398b3420073e190341c1a82ca0070b52
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoAdded service category APIs 80/210280/1
Abhay agarwal [Fri, 12 Jul 2019 12:05:00 +0000 (17:35 +0530)]
Added service category APIs

Change-Id: I92c16e1cdef0b6bfd92b0d60d223e0aea6b50157
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed OS type mismatching problem. 18/209918/1 accepted/tizen/unified/20190719.111801 submit/tizen/20190715.014305
saerome kim [Fri, 12 Jul 2019 08:35:02 +0000 (17:35 +0900)]
Fixed OS type mismatching problem.

Plugin devloper may intiailze OS type either UAM_OS_TYPE_UNDIFIEND or
UAM_OS_TYPE_INVAILD. but ua-manager handles only UAM_OS_TYPE_INVAILD.
This patch make ua-manager handles both UNDEFINED and INVALID cases.

Change-Id: Ib3de0e12064046252763ae289671cb029e2732f0
Signed-off-by: saerome kim <saerome.kim@samsung.com>
5 years agochaged detection parameters 40/209840/1 accepted/tizen/unified/20190712.115314 submit/tizen/20190711.231148
saerome.kim [Thu, 11 Jul 2019 12:19:20 +0000 (21:19 +0900)]
chaged detection parameters

- detection cycle 60sec
- detection window 50sec

Change-Id: Id929f8cc257774a292d8d05fd69fb2a862c61703
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFixed crash due to double free. 30/209830/1
saerome.kim [Thu, 11 Jul 2019 09:36:19 +0000 (18:36 +0900)]
Fixed crash due to double free.

g_dbus_proxy_call or g_dbus_method_invocation free the gvariant
input parameter in the function.

Change-Id: Id46bef23abb05c2658a20cfd33bb09f1536dd684
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
5 years agoFix Coverity issues 65/209765/1
Jung Jihoon [Wed, 10 Jul 2019 11:06:00 +0000 (20:06 +0900)]
Fix Coverity issues

- Resource leaks
1047595 1047599 1047606 1047610 1047613 1047618
1047621 1047628 1049995 1047614 1050025 1047600

- dereference before null check : 1074416
- Unreachable code : 1047594

Change-Id: Ia4f90384b26687c315926e7a8af77465bac17385
Signed-off-by: Jung Jihoon <jh8801.jung@samsung.com>
5 years agoFixed build error 57/209757/1
saerome kim [Wed, 10 Jul 2019 12:39:34 +0000 (21:39 +0900)]
Fixed build error

Change-Id: Ieecee53607c6bf3990f90255a145c8d8bf372eb5
Signed-off-by: saerome kim <saerome.kim@samsung.com>
5 years agoStore newly allcoated IP address in tech->addresses list 51/209751/1
Nishant Chaprana [Wed, 10 Jul 2019 11:44:48 +0000 (17:14 +0530)]
Store newly allcoated IP address in tech->addresses list

When device was not having IP address and it is found that new IP address
has been allocated to the device, then we need to store this IP address
in tech->addresses list.

Change-Id: I973db47a8655ea321063fd77947e88751156fd83
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoAdded reset database API support 23/209423/1 accepted/tizen/unified/20190708.052432 submit/tizen/20190707.231826
Atul Rai [Fri, 5 Jul 2019 05:31:41 +0000 (11:01 +0530)]
Added reset database API support

Change-Id: Idc68144da18c2c2d328a0dda2cb50c58bcf0194d
Signed-off-by: Atul Rai <a.rai@samsung.com>
5 years agoAdded api documentation 92/209292/1 accepted/tizen/unified/20190705.110642 submit/tizen/20190705.042311
saerome kim [Thu, 4 Jul 2019 10:45:43 +0000 (19:45 +0900)]
Added api documentation
- it is needed to describe how internal API work.

Change-Id: I209468bb99590686f25c1b4c0b3a13a8542d343c
Signed-off-by: saerome kim <saerome.kim@samsung.com>
5 years agoChanged the app to transmit the event to the bundle in the suspend state. 52/208852/1 accepted/tizen/unified/20190702.234158 submit/tizen/20190702.103155
saerome kim [Fri, 28 Jun 2019 11:27:06 +0000 (20:27 +0900)]
Changed the app to transmit the event to the bundle in the suspend state.

Change-Id: I048f27cf42d9aff88cdacd0f10aef31bac15b614
Signed-off-by: saerome kim <saerome.kim@samsung.com>
5 years agoFixed duplicate entries for absent users 51/208851/1
Abhay agarwal [Thu, 20 Jun 2019 10:16:46 +0000 (15:46 +0530)]
Fixed duplicate entries for absent users

Change-Id: I820b4c3d3fe6af79629fecd998b253fe615ffed6
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed memory leak in _uam_core_deinit() 50/208850/1
Atul Rai [Tue, 18 Jun 2019 10:33:39 +0000 (16:03 +0530)]
Fixed memory leak in _uam_core_deinit()

Change-Id: I841122907ab0b3d93e02697b8d44d085cded819f
Signed-off-by: Atul Rai <a.rai@samsung.com>
5 years agoFixed start detection logic 49/208849/1
Atul Rai [Tue, 18 Jun 2019 10:33:04 +0000 (16:03 +0530)]
Fixed start detection logic

Change-Id: I832dc8858b51a9ea14bd941daa70416083185901
Signed-off-by: Atul Rai <a.rai@samsung.com>
5 years agoDeny Add/Remove operations for default service 48/208848/1
Atul Rai [Tue, 18 Jun 2019 10:32:11 +0000 (16:02 +0530)]
Deny Add/Remove operations for default service

Change-Id: I0549aa051c984d336407a883a2fff785d155a1be
Signed-off-by: Atul Rai <a.rai@samsung.com>
5 years agoFixed issues in service addition/removal logic 47/208847/1
Atul Rai [Fri, 14 Jun 2019 03:33:21 +0000 (09:03 +0530)]
Fixed issues in service addition/removal logic

Change-Id: I9bcbbc93bc79d5a65ac80ddfc854b0ca77e8cafc
Signed-off-by: Atul Rai <a.rai@samsung.com>
5 years agoFix service database queries 46/208846/1
Abhay agarwal [Wed, 12 Jun 2019 12:04:22 +0000 (17:34 +0530)]
Fix service database queries

Change-Id: I215f37f7b3825de58ff939c6f086b11d8b81916d
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
5 years agoFixed service Add/Remove user API signature 45/208845/1
Atul Rai [Wed, 12 Jun 2019 03:20:28 +0000 (08:50 +0530)]
Fixed service Add/Remove user API signature

Change-Id: I6dec259a401b2a0a79dd2dde1604f6f798ee03cb
Signed-off-by: Atul Rai <a.rai@samsung.com>