platform/core/system/deviced.git
4 years agoEnable usb_mode udev event for factory mode. 78/222178/3
INSUN PYO [Fri, 10 Jan 2020 05:00:10 +0000 (14:00 +0900)]
Enable usb_mode udev event for factory mode.

Factory jig internally disconnects only signal cable(in Blue and White) of USB cable.
It makes a strange state.

In general, when the USB cable is disconnected, switch udev event and usb_mode udev event occur.
But, in factory jig case, usb_mode udev event only occurs.

Without luck, data-router.service crashs on factory jig because of one's own problems.
So, we have to restart data-router.service when usb_mode udev event happens.

And, sdbd.service and mtp-response.service also restart as a preventive measure.

Change-Id: Ia538383aefd82bad9eaf976fc4dedef605c60026

4 years agoFix display to release lock on booting done. 57/222157/3
Youngjae Cho [Fri, 10 Jan 2020 04:39:52 +0000 (13:39 +0900)]
Fix display to release lock on booting done.

Change-Id: I1743869f2ca7d218ef3745cab71c1f7785edadde
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoFix GCC-9 build error on x86_64, aarch64 51/222051/2 accepted/tizen/unified/20200110.123516 submit/tizen/20200109.085058
Youngjae Cho [Thu, 9 Jan 2020 08:39:23 +0000 (17:39 +0900)]
Fix GCC-9 build error on x86_64, aarch64

Change-Id: I7ede3309e98ddf58ad11e5feffec4f01abfdc40b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoSupport display blink on logdump 22/222022/2
Youngjae Cho [Thu, 9 Jan 2020 05:43:40 +0000 (14:43 +0900)]
Support display blink on logdump

Change-Id: I9ee202204711b196c2d10807a8da09845bacc203
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoExtend USB gadget configuration for further usage #2 23/222023/2 submit/tizen/20200109.072530
INSUN PYO [Thu, 9 Jan 2020 06:12:29 +0000 (15:12 +0900)]
Extend USB gadget configuration for further usage #2

Change-Id: I9d0086b2bea235baab8241b0f7e89d3fca47c8e5

4 years agoRename functions, variables for consistency 75/221775/6 accepted/tizen/unified/20200109.065544 submit/tizen/20200108.103615
Youngjae Cho [Tue, 7 Jan 2020 09:25:40 +0000 (18:25 +0900)]
Rename functions, variables for consistency

dbus_platformlcdcontrol()  -> dbus_changestatebyreason()
display_platform_on()      -> display_on_by_reason()
display_platform_off()     -> display_off_by_reason()
display_platform_control() -> deleted
enum platform_control      -> deleted

Change-Id: I66e0024e235983629d7c8853510ab5bae2921906
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoFix build warning on x86_64, aarch64 63/221863/2 accepted/tizen/unified/20200109.065525 submit/tizen/20200108.065117
Youngjae Cho [Wed, 8 Jan 2020 06:05:56 +0000 (15:05 +0900)]
Fix build warning on x86_64, aarch64

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change-Id: I8a17c36bb5b79e01ce814be2cfa563ca95780836
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agobattery-monitor: modified to use consecutive sessions 33/219833/7
sanghyeok.oh [Tue, 10 Dec 2019 12:29:01 +0000 (21:29 +0900)]
battery-monitor: modified to use consecutive sessions

Monitoring data consists of multiple sessions.
Session means monitoring data within device enabled(on) state.
So display battery monitor should distinguish each lcd on-off as session.

Change-Id: I99d1e91857af802890de9f851ff08c69797bffba
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoFix log type specifier 40/221840/1
Youngjae Cho [Wed, 8 Jan 2020 02:44:10 +0000 (11:44 +0900)]
Fix log type specifier

Change-Id: If0b713d19c48bbde1e855401fcf09e9b4e24e083
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoRemove warning for GCC-9 22/221522/11 submit/tizen/20200107.015739
sanghyeok.oh [Fri, 3 Jan 2020 08:21:52 +0000 (17:21 +0900)]
Remove warning for GCC-9

Change-Id: If89275f76837f5d3ba6ccf16145abe4526d186b9
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoMerge "[Tizen 6.0] Support build with glibc 2.30" into tizen
sanghyeok oh [Mon, 6 Jan 2020 09:21:38 +0000 (09:21 +0000)]
Merge "[Tizen 6.0] Support build with glibc 2.30" into tizen

4 years ago[Tizen 6.0] Support build with glibc 2.30 72/221472/3
Mikhail Kashkarov [Mon, 16 Dec 2019 04:54:19 +0000 (07:54 +0300)]
[Tizen 6.0] Support build with glibc 2.30

The current glibc definitions of the htole* macros don't allow their use
in a static context:

descs_gen.c:59:12: error: initializer element is not constant
   59 |   .magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
      |            ^~~~~~~

Import solution from https://patchwork.kernel.org/patch/10517059/

Change-Id: I0019f890de17fbf4d9c89777b0ac07ccb7a74171
Signed-off-by: Mikhail Kashkarov <m.kashkarov@partner.samsung.com>
4 years agoEnable usb tethering for wearable profile 71/221471/1 accepted/tizen/unified/20200105.221215 submit/tizen/20200103.021604
INSUN PYO [Fri, 3 Jan 2020 00:18:40 +0000 (09:18 +0900)]
Enable usb tethering for  wearable profile

Change-Id: I15349031f74ef7773337aa6b500757e5234580ca
(cherry picked from commit b34ca1a93580481ba270071cf5b233d84e9f9501)

4 years agoSupport extcon counter using device-notifier 29/221129/9 accepted/tizen/unified/20191227.142559 submit/tizen/20191227.111333
Youngjae Cho [Fri, 27 Dec 2019 09:01:11 +0000 (18:01 +0900)]
Support extcon counter using device-notifier

Change-Id: If4c43890024c147561d31e41ade60066c3f321fa
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoExtend USB gadget configuration for further usage 16/221116/7
INSUN PYO [Fri, 27 Dec 2019 07:13:57 +0000 (16:13 +0900)]
Extend USB gadget configuration for further usage

Change-Id: I6ea6de9ead0ba0dbef89d71ab0717b2c6b2477c9
(cherry picked from commit 234a312b38c2407ea41020df6d7508501caa91ff)

4 years agoAdd a dbus policy rule for /csa partition 10/221110/3
Hyotaek Shim [Fri, 27 Dec 2019 06:22:54 +0000 (15:22 +0900)]
Add a dbus policy rule for /csa partition

<check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Csa"
        privilege="http://tizen.org/privilege/internal/default/platform"/>

Change-Id: I1e31836a350e14e1c5efa100493c5df15c3aa2d4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoWatchdog timeout 90 -> 30 sec to reduce delay from unexpected poweroff failure 00/221100/1
Hyotaek Shim [Fri, 27 Dec 2019 06:01:06 +0000 (15:01 +0900)]
Watchdog timeout 90 -> 30 sec to reduce delay from unexpected poweroff failure

Change-Id: Ib86c4507fd127e046958ea63083500dcabdce881
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd /shared/.h files in deviced.pc 97/221097/3
Hyotaek Shim [Fri, 27 Dec 2019 05:52:36 +0000 (14:52 +0900)]
Add /shared/.h files in deviced.pc

Change-Id: I93b5166b898f54122e295ebbb93441b600be702f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd deviced header in deviced.pc for product plugin modules 43/221043/2
Hyotaek Shim [Thu, 26 Dec 2019 12:33:09 +0000 (21:33 +0900)]
Add deviced header in deviced.pc for product plugin modules

BuildRequires: pkgconfig(deviced)

Change-Id: I250f5780b646dd9b56d48b607a531249a8dbe62a
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoRevert "Safe umount an sdcard partition (/opt/media/SDCardA1)" 26/220526/2 accepted/tizen/unified/20191219.143625 submit/tizen/20191219.082139
Hyotaek Shim [Thu, 19 Dec 2019 07:18:43 +0000 (07:18 +0000)]
Revert "Safe umount an sdcard partition (/opt/media/SDCardA1)"

This reverts commit bf9160eaaae561158273f08316da80c857960286.

Change-Id: Ia8c827d76ed4710891a27c0c97c938ca33353905

4 years agoChange DPMS_GET_TIMEOUT to 5 seconds 08/220308/2
Youngjae Cho [Tue, 17 Dec 2019 00:50:11 +0000 (09:50 +0900)]
Change DPMS_GET_TIMEOUT to 5 seconds

Change-Id: I892308efa4c6c4cecdca9b5f1361d590e48ab660
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoSeparate context of DPMS get/set request 11/220211/1
Youngjae Cho [Mon, 16 Dec 2019 06:09:31 +0000 (15:09 +0900)]
Separate context of DPMS get/set request

Separate DPMS client into two, get/set, each of which is only in charge
of get or set request. And attached to different context so
that they can be handled in different context.
 * dpms_set_state() --> handled within the default context
 * dpms_get_state() --> handled within the dpms_context

Change-Id: I34c7388f83d8bb54a8bfc12c65c2fc45455b9ce1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoRefactoring display-dpms 06/220006/5
Youngjae Cho [Thu, 12 Dec 2019 08:23:51 +0000 (17:23 +0900)]
Refactoring display-dpms

- Separate initialization from dpms_is_available() to init_dpms().
- Integrate dpms exit sequence into exit_dpms() for poweroff.
- Delete pointer 'wl_glib_data' and use pointer 'info' instead,
  which are practically same.
- Fix usage of disconnect_interface_with_dpms() considering
  GSource finalize.

Change-Id: I7579b7338ee263b4c991cc8a055cefc0eb392f02
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoFix typo 37/219937/2
Youngjae Cho [Thu, 12 Dec 2019 02:24:56 +0000 (11:24 +0900)]
Fix typo

Fix process_background(), process_foreground() log.

Change-Id: If80620f63c0997b6339aa788656bd416b4fb5d66
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoDelete disabling hardkey sound while touchscreen pressed 66/219866/2 accepted/tizen/unified/20191211.121103 submit/tizen/20191211.053721
Youngjae Cho [Wed, 11 Dec 2019 05:23:42 +0000 (14:23 +0900)]
Delete disabling hardkey sound while touchscreen pressed

Change-Id: Ie0f358de9da8a6a54b65874b320255fe9977a7a9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agobattery-monitor: initial module 56/214356/13
sanghyeok.oh [Fri, 20 Sep 2019 12:10:55 +0000 (21:10 +0900)]
battery-monitor: initial module

Change-Id: Ib353d1baf71816e7cdfe89e9b879759d05504f9f
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoremove cmake warning 09/219709/1
sanghyeok.oh [Mon, 9 Dec 2019 09:01:31 +0000 (18:01 +0900)]
remove cmake warning

Change-Id: I2e164564262605f91b1aa0c0454b257c33628be9
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoChange unref location of dpms_loop, dpms_context 45/218545/7 accepted/tizen/unified/20191127.020306 submit/tizen/20191126.121759
Youngjae Cho [Mon, 25 Nov 2019 08:43:04 +0000 (17:43 +0900)]
Change unref location of dpms_loop, dpms_context

Change-Id: I7272dfc095424b4a7d3bf7cd4a65f2e714e5c5df
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoExit mainloop after poweroff call to systemd 45/218645/2
Youngjae Cho [Tue, 26 Nov 2019 09:06:10 +0000 (18:06 +0900)]
Exit mainloop after poweroff call to systemd

Change-Id: I150d0638026632c655f2f7280edb77070f7ce034
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoRemove default value at systemd services 90/218290/1
INSUN PYO [Thu, 21 Nov 2019 05:33:43 +0000 (14:33 +0900)]
Remove default value at systemd services

https://www.freedesktop.org/software/systemd/man/systemd.service.html
 - Behavior of notify is similar to exec; ... If NotifyAccess= is missing or set to none, it will be forcibly set to main.
 - WatchdogSec= ... If NotifyAccess= is not set, it will be implicitly set to main.

Change-Id: I6392252b39036367dc56c62854219b4df73e0ad2

4 years agoMake get_lcd_power() use dpms to get lcd power 07/217807/4 accepted/tizen/unified/20191118.122822 submit/tizen/20191118.061624
Youngjae Cho [Thu, 14 Nov 2019 08:49:11 +0000 (17:49 +0900)]
Make get_lcd_power() use dpms to get lcd power

Deviced used to set lcd power by requesting to dpms(dpms_set_state), but
get lcd power by reading node directly through HAL(display_dev->get_state).
To make this get/set machanism same, get mechanism changed to use
dpms(dpms_get_state), removed all regarding HAL. Also, make dpms_get_state
synchronous and dpms_set_state asynchronous to ensure latency issue.

Change-Id: Ib93cb55d18f3e175a16c7138288b09ac76d25f05
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoAdd touchscreen execute 94/217494/2 accepted/tizen/unified/20191113.010239 submit/tizen/20191112.072646
Youngjae Cho [Tue, 12 Nov 2019 06:28:14 +0000 (15:28 +0900)]
Add touchscreen execute

Change-Id: Ia97235271addd8c10690e1b0dbfdc92b3b8c0231
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agodisplay-dpms: use get_state listener to get get_dpms request event 89/217089/2 accepted/tizen/unified/20191112.034025 submit/tizen/20191111.071211
Junkyeong Kim [Wed, 6 Nov 2019 07:31:14 +0000 (16:31 +0900)]
display-dpms: use get_state listener to get get_dpms request event

Change-Id: Iae31d9d3d95fcdd6c886c3be5988d7b19759bc72
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
4 years agosvace fix 37/217237/4
sanghyeok.oh [Fri, 8 Nov 2019 02:02:44 +0000 (11:02 +0900)]
svace fix

Change-Id: I520705e248ae242f8aba8c1821380d774cee3046
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoExclude battery critical-log in case of -DBATTERY_MODULE=off 99/217299/4
Youngjae Cho [Fri, 8 Nov 2019 06:33:26 +0000 (15:33 +0900)]
Exclude battery critical-log in case of -DBATTERY_MODULE=off

Change-Id: I9adfd7018964fb14b73f1453876ee0fc3d5b78ea
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoDisable reboot option check 64/217364/1 accepted/tizen/unified/20191111.105547 submit/tizen/20191111.023004 submit/tizen/20191111.023037
Hyotaek Shim [Mon, 11 Nov 2019 02:13:52 +0000 (11:13 +0900)]
Disable reboot option check

Change-Id: If0ab215661dd131c04558ae055260b2fa72e1246
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoRemove pweroff_popup, shorten long key press interval 15/216915/2
Youngjae Cho [Tue, 5 Nov 2019 01:29:05 +0000 (10:29 +0900)]
Remove pweroff_popup, shorten long key press interval

Change-Id: Ic0ce8d155ec698265f582f813de5874dd8925416
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoDelete trailing '\n' character in log of ctime_r 21/216521/1
Youngjae Cho [Mon, 28 Oct 2019 01:52:03 +0000 (10:52 +0900)]
Delete trailing '\n' character in log of ctime_r

Change-Id: I494de2e480bbc3aff092136f75d114560763f747
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoStop checking lock if process had been terminated 94/215894/9
Youngjae Cho [Thu, 17 Oct 2019 08:19:47 +0000 (17:19 +0900)]
Stop checking lock if process had been terminated

Change-Id: I960c850c033f6ab2297293ba092c101a1cf77775
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoAdd config file of critical-log to iot and tv profiles. 14/215914/1
INSUN PYO [Thu, 17 Oct 2019 11:03:12 +0000 (20:03 +0900)]
Add config file of critical-log to iot and tv profiles.

Because of "config-parser.c: config_parse(127) > Failed to read '/etc/deviced/critical-log.conf'. line=0" error on XU3.

Change-Id: I9fef3ca3a21052544e9c00aa0ef831d46069bb32

4 years agoRemove unused code regarding /usr/bin/save_blenv 59/215459/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.023311 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090849 accepted/tizen/unified/20191011.023405 submit/tizen/20191010.021317 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
Hyotaek Shim [Tue, 8 Oct 2019 10:05:49 +0000 (19:05 +0900)]
Remove unused code regarding /usr/bin/save_blenv

Change-Id: If4418c367927abe2edef46afedb4831797eef154
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix ASAN build errors 28/215328/1 accepted/tizen/unified/20191007.234854 submit/tizen/20191007.054826
Hyotaek Shim [Mon, 7 Oct 2019 05:47:29 +0000 (14:47 +0900)]
Fix ASAN build errors

[  288s] CMakeFiles/deviced.dir/src/battery/lowbat-handler.c.o:(.bss+0x140): multiple definition of `old_battery'
[  288s] CMakeFiles/deviced.dir/src/battery/battery-time.c.o:(.bss+0x200): first defined here
[  288s] CMakeFiles/deviced.dir/src/battery/lowbat-handler.c.o: In function `lowbat_initialized':
[  288s] /home/abuild/rpmbuild/BUILD/deviced-5.5.0/src/battery/lowbat-handler.c:102: multiple definition of `battery'
[  288s] CMakeFiles/deviced.dir/src/battery/battery-time.c.o:/home/abuild/rpmbuild/BUILD/deviced-5.5.0/src/battery/battery-time.c:363: first defined here

Change-Id: Ibf76f7265dfc1bf41c2b8e72de3dd6ed888ab7fc
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoSupport USB tethering 48/214948/5 accepted/tizen/unified/20191001.110311 submit/tizen/20191001.062652
INSUN PYO [Mon, 30 Sep 2019 06:24:59 +0000 (15:24 +0900)]
Support USB tethering

To enable USB tethering, you must run the following two commands after configuring the USB endpoint.

1. /sbin/ifconfig usb0 192.168.129.3 up
2. /Sbin/route add -net 192.168.129.0 netmask 255.255.255.0 dev usb0

These commands are not directly executed by deviced, but are delegated to rndis.service.
The reason is to use the already implemented structure (sdbd.service and mtp-response.service).

The patch has been split into deviced and libdeivce-node.
The rndis.service is in deviced, and the code to run rndis.service is in libdevice-node.

Connected patch: "Support USB tethering" commit on libdevice-node.

Change-Id: I9fdc8424c94ee1f7e29a9a2cc37958d24373d74c

4 years agoDo not make caution of pmlock_expired for normal applications 89/214989/1 accepted/tizen/unified/20191001.062605 submit/tizen/20190930.121512 submit/tizen/20191001.010135
Hyotaek Shim [Mon, 30 Sep 2019 12:14:09 +0000 (21:14 +0900)]
Do not make caution of pmlock_expired for normal applications

Change-Id: Id12492ee7d56a367318a590f4c0dc957c84f5c46
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix library dependency in plugin modules 69/214269/1 accepted/tizen/unified/20190923.225250 submit/tizen/20190919.121821 submit/tizen/20190919.122002
Hyotaek Shim [Thu, 19 Sep 2019 11:57:01 +0000 (20:57 +0900)]
Fix library dependency in plugin modules

Change-Id: Iaa5c932f025ab9e45bf8ada653a5e5d6819e6a4b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agofix bug of macro ADD_SOURCE 34/214234/1
sanghyeok.oh [Thu, 19 Sep 2019 06:30:09 +0000 (15:30 +0900)]
fix bug of macro ADD_SOURCE

Change-Id: If68cd575a30886d75678edf82992c4e647d0c1e3
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoModify TV display configurations 90/214190/2 submit/tizen/20190919.021435
Hyotaek Shim [Thu, 19 Sep 2019 02:06:22 +0000 (11:06 +0900)]
Modify TV display configurations

Change-Id: I9164660ca9c9e698855d4bd3fc1f53cc511d07e9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoDo not enter S_SLEEP on emulator environment 38/214138/1 accepted/tizen/unified/20190919.010706 submit/tizen/20190918.102133
Hyotaek Shim [Wed, 18 Sep 2019 09:42:40 +0000 (18:42 +0900)]
Do not enter S_SLEEP on emulator environment

Change-Id: I9a0fba246cdb8403d03a16578b2c64efe5a8a9c1
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoUnmount rw partitions even for emulator environment 36/214136/1
Hyotaek Shim [Wed, 18 Sep 2019 09:33:28 +0000 (18:33 +0900)]
Unmount rw partitions even for emulator environment

Change-Id: Ie777afa9c3b8d9b69080f9bd340e85f24021a909
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix SleepSupport not to step into default_action(S_SLEEP) 91/214091/2 accepted/tizen/unified/20190918.102335 submit/tizen/20190918.025803
Hyotaek Shim [Wed, 18 Sep 2019 02:41:42 +0000 (11:41 +0900)]
Fix SleepSupport not to step into default_action(S_SLEEP)

Change-Id: I5d08b01bc2444c0985d474ed6f647e1496a7ad68
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoDelete duplicated call for lcd_on_procedure() 01/213901/2 submit/tizen/20190918.011459
Youngjae Cho [Mon, 16 Sep 2019 09:09:57 +0000 (18:09 +0900)]
Delete duplicated call for lcd_on_procedure()

Change-Id: Ice42021b7accf261ec840cc977008ef565ad73fc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoFix SleepSupport 62/213862/2 accepted/tizen/unified/20190916.111603 submit/tizen/20190916.054022
Hyotaek Shim [Mon, 16 Sep 2019 03:10:08 +0000 (12:10 +0900)]
Fix SleepSupport

Change-Id: Ic44b710acb3fe4a19238933c0b32e67bbca13387
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd ultrapowersaving module 94/213694/3 accepted/tizen/unified/20190916.111618 submit/tizen/20190916.012534
Youngjae Cho [Mon, 9 Sep 2019 05:02:04 +0000 (14:02 +0900)]
Add ultrapowersaving module

Change-Id: I65f7000fcd955197ce793b45b800e99161a8859d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoDelete duplicate logs 91/213691/2
INSUN PYO [Tue, 10 Sep 2019 07:29:04 +0000 (16:29 +0900)]
Delete duplicate logs

Change-Id: Ic53c99ff3225a1d2a15a2f34a5d9e32d8e84db0d

4 years agoFix add_device() not to remove added devices 55/213655/1
Hyotaek Shim [Tue, 10 Sep 2019 01:27:41 +0000 (10:27 +0900)]
Fix add_device() not to remove added devices

Change-Id: I7d6dbd9e240311b09fe251d492c11cb830c0eaef
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd HBM, LBM module 62/213362/6 accepted/tizen/unified/20190911.111739 submit/tizen/20190909.095136
Youngjae Cho [Wed, 4 Sep 2019 12:16:36 +0000 (21:16 +0900)]
Add HBM, LBM module

Change-Id: I64a3090092f622f879d2c754e71b5354682936c6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoMinor fix to add SleepSupport=no for TV profile 71/213571/1 accepted/tizen/unified/20190909.050734 submit/tizen/20190909.023801
Hyotaek Shim [Mon, 9 Sep 2019 02:36:01 +0000 (11:36 +0900)]
Minor fix to add SleepSupport=no for TV profile

Change-Id: If8ec6b89f95de701778fca751cca28a2996eae64
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoIncrease ALWAYS_ON_TIMEOUT from 1 hour to 100 hours 01/213501/3 submit/tizen/20190909.022603
Hyotaek Shim [Fri, 6 Sep 2019 04:15:49 +0000 (13:15 +0900)]
Increase ALWAYS_ON_TIMEOUT from 1 hour to 100 hours

Change-Id: I453debda0b4b1b344e0ca491ae0dea43bb089ac5
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd SleepSupport=no for TV profile 70/213570/1 submit/tizen/20190909.020521
Hyotaek Shim [Mon, 9 Sep 2019 02:04:28 +0000 (11:04 +0900)]
Add SleepSupport=no for TV profile

Change-Id: I3a637a43ce0aba64b50093b24d4e8a13a7b91f33
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd SleepSupport field in display.conf 64/213464/4 accepted/tizen/unified/20190906.111923 submit/tizen/20190905.124442 submit/tizen/20190905.124935
Hyotaek Shim [Thu, 5 Sep 2019 12:25:51 +0000 (21:25 +0900)]
Add SleepSupport field in display.conf

Change-Id: I86f09c9fcfe0e1da0ab798242777c8fc5469c702
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agousb-host-test: / remove at end of path CONFIGFS_PATH 34/213234/1 accepted/tizen/unified/20190904.011521 submit/tizen/20190903.061918
INSUN PYO [Tue, 3 Sep 2019 06:14:36 +0000 (15:14 +0900)]
usb-host-test: / remove at end of path CONFIGFS_PATH

mount_check does not work properly with / at the end of path.

Change-Id: I77700ff4074ce48b047851f7f5f5026ed20ee092

4 years agocoverity fix 26/213226/1
sanghyeok.oh [Tue, 3 Sep 2019 05:17:21 +0000 (14:17 +0900)]
coverity fix

Change-Id: Ic355e6fb4419394a443e995875cd818850a4a2c5
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agousb-host-test: wait for /sys/kernel/config to mount after modprobe usb_f_fs 59/213159/2 accepted/tizen/unified/20190902.111130 submit/tizen/20190902.065215
INSUN PYO [Mon, 2 Sep 2019 06:30:48 +0000 (15:30 +0900)]
usb-host-test: wait for /sys/kernel/config to mount after modprobe usb_f_fs

Workaround: "modprobe usb_f_fs" doesn't guarantee that /sys/kernel/config is mounted.
So, deviced must wait for /sys/kernel/config to be mounted.

Change-Id: Ibf047e2261b786b57dd63f1f831936e8312567f1

4 years agoRestrict signal policy 38/213138/4 accepted/tizen/unified/20190902.055150 submit/tizen/20190902.014312
Baumann [Fri, 30 Aug 2019 13:50:30 +0000 (15:50 +0200)]
Restrict signal policy

Change-Id: I2864bd37fe36e58207d04ffd23ea1de22fd59556
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd Dimming=no to disable dim in wearable target 60/213060/1 accepted/tizen/unified/20190830.110632 submit/tizen/20190830.082117
lokilee73 [Fri, 30 Aug 2019 01:56:27 +0000 (10:56 +0900)]
Add Dimming=no to disable dim in wearable target

Change-Id: Ia848a6c20008fcd681785d808ef70bd8015ff552
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agoApply MCD display 04/212604/13 submit/tizen/20190829.010425
lokilee73 [Fri, 23 Aug 2019 08:28:08 +0000 (17:28 +0900)]
Apply MCD display

Change-Id: I3ee82aafab34390d6907239c2ab6542540f3abf7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agoAdd critical-log module 80/212680/4
Youngjae Cho [Mon, 26 Aug 2019 05:39:11 +0000 (14:39 +0900)]
Add critical-log module

Change-Id: Ic719ce9f2156bdaebedb5cda60643e7462dce792
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoSafe umount an sdcard partition (/opt/media/SDCardA1) 83/212783/1 accepted/tizen/unified/20190827.110615 submit/tizen/20190827.024510
Hyotaek Shim [Tue, 27 Aug 2019 01:26:27 +0000 (10:26 +0900)]
Safe umount an sdcard partition (/opt/media/SDCardA1)

Change-Id: I7a27f311e1da52a5e8930854ec9fa22f00fbb443
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoFix svace issue 50/212750/1
Yunmi Ha [Mon, 26 Aug 2019 10:58:09 +0000 (19:58 +0900)]
Fix svace issue

- check return value before refer

Change-Id: I085162d37bc94d5df858454323a142bce3c5f0cd
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agodbus: modified to use renamed api 51/212151/1 accepted/tizen/unified/20190816.112235 accepted/tizen/unified/20190827.043450 submit/tizen/20190816.021726 submit/tizen/20190826.105652
sanghyeok.oh [Fri, 16 Aug 2019 01:56:36 +0000 (10:56 +0900)]
dbus: modified to use renamed api

change 'dbus_handle_broadcast_dbus_signal' to 'dbus_handle_emit_dbus_signal'

Change-Id: If35e9bc2bb52c15585a57a8a012be3bedadd79ff
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agodbus: modified to use revised api 09/212109/1 accepted/tizen/unified/20190816.112325 submit/tizen/20190814.105129
sanghyeok.oh [Wed, 14 Aug 2019 08:22:50 +0000 (17:22 +0900)]
dbus: modified to use revised api

Change-Id: I781eb867a01f460ff9022a3ac59497469b621e47
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
4 years agoRemove Booting_Done signal broadcasted by deviced 23/211923/3
lokilee73 [Mon, 12 Aug 2019 05:01:06 +0000 (14:01 +0900)]
Remove Booting_Done signal broadcasted by deviced

- Booting_Done is broadcasted by systemd

Change-Id: If0607321f3bbe140915744b2283958361d29ea77
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agodbus: allow GetAll method call for g_dbus_proxy. 11/211911/2
sanghyeok.oh [Mon, 12 Aug 2019 03:17:10 +0000 (12:17 +0900)]
dbus: allow GetAll method call for g_dbus_proxy.

g_dbus_proxy_new_*() function generate dbus properties related method
call.
Without allow rule, It makes dbus policy error.

Deviced doesn't have any dbus properties.
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is recommended to create g_dbus_proxy for deviced.

Change-Id: I095d3df2711c5ef7bf06fc90c5e54d60e4532ffd
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoRemove vconf enum for VCONFKEY_SYSMAN_POWER_OFF_POPUP 01/211801/1 accepted/tizen/unified/20190809.110757 submit/tizen/20190809.075412
lokilee73 [Fri, 9 Aug 2019 07:17:12 +0000 (16:17 +0900)]
Remove vconf enum for VCONFKEY_SYSMAN_POWER_OFF_POPUP
- VCONFKEY_SYSMAN_POWER_OFF_POPUP is removed from VCONFKEY_SYSMAN_POWER_OFF_STATUS
- So, remove related code

Change-Id: I22ce64bf59fba048a969b0599961e829ebc1fd03
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix battery module 59/210859/12
lokilee73 [Thu, 25 Jul 2019 09:11:00 +0000 (18:11 +0900)]
Fix battery module

Change-Id: I29a241fad703080b55d02d5bc7267e7a0832e719
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd exception handle, fix log format specifier 96/211296/1 accepted/tizen/unified/20190805.042847 submit/tizen/20190801.083214
Youngjae Cho [Thu, 1 Aug 2019 07:52:55 +0000 (16:52 +0900)]
Add exception handle, fix log format specifier

Change-Id: I0f3f230501ba46c345dcd20d2b737fbb5722dfa1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
5 years agoAdd a board info module 82/211082/10 submit/tizen/20190801.065937
Youngjae Cho [Tue, 30 Jul 2019 01:18:37 +0000 (10:18 +0900)]
Add a board info module

Change-Id: I89309dec1f198a5fbac3e4fbbbee484bcb6f5bf2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
5 years agoRemove power off popup from power off type 08/211108/2 submit/tizen/20190730.112013
lokilee73 [Tue, 30 Jul 2019 07:17:48 +0000 (16:17 +0900)]
Remove power off popup from power off type

Change-Id: I16ed1f64ba7a26340975796071f1736bd6470ba9
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange log level for failed AOD mode to avoid confusion 43/211043/1
lokilee73 [Mon, 29 Jul 2019 09:09:06 +0000 (18:09 +0900)]
Change log level for failed AOD mode to avoid confusion

Change-Id: I3647f7db0a07c3d29219ecef7f9d1a5899dde5cd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoApply new algorithm for battery health 09/207209/9 accepted/tizen/unified/20190725.042832 submit/tizen/20190724.030536
lokilee73 [Thu, 30 May 2019 08:40:53 +0000 (17:40 +0900)]
Apply new algorithm for battery health

When battery health is bad such as high, low or ovp, we have to alarm users.
Expecially, in case of wearable device, it can hurt users by heat.
So, to protect it, apply a new algorithm to warn users periodically.
A new concept about bad bttery health:
1. Launch popup when battery.health is HEALTH_LOW or HEALTH_HIGH
2. Keep LCD_NORMAL for 10 seconds
3. Set relaunch timer to 3.6 seconds, When lcd state is LCD_OFF
4. Set lcd state to LCD_NORMAL
5. go to 1 step

newly added functions for it
- update_health_pm_status(): LCD OFF and unlock LCD_DIM
- change_health_popup_timer(): set health_poup_timer
- health_popup_timer_init(): initialize health_popup_timer
- launch_health_popup(): launch popup in case of HEALTH_HIGH and HEALTH_LOW

do_not_disturb()
- apply a new function to check if it is in do_not_disturb mode
- remove memory/shealth/sleep/do_not_disturb because it is not used anymore

battery_pm_change_internal()
- apply a new function to check battery_do_not_disturb()

reorganize update_health(), update_ovp()

display_changed()
- change to return current state, when input is NULL
- add launch popup in case of HEALTH_LOW and HEALTH_HIGH

check_abnormal_status()
- change name from check_battery_status(), because it only deals with abnormal status
- modify to refer to old_battery

Change-Id: I328588e8805f8b4a2790036cbd2a8c8cbc6a7831
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange strcmp to strcasecmp to detect lower case and upper case as well 14/210414/1 accepted/tizen/unified/20190723.053647 submit/tizen/20190722.050109
lokilee73 [Fri, 19 Jul 2019 02:26:03 +0000 (11:26 +0900)]
Change strcmp to strcasecmp to detect lower case and upper case as well

Change-Id: Ib0bd7e475ea5046e628000c84e499e9d87b6b5c0
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd exception code for tz_dpms_mng 25/210125/6 accepted/tizen/unified/20190717.220444 submit/tizen/20190717.062901
lokilee73 [Tue, 16 Jul 2019 05:20:35 +0000 (14:20 +0900)]
Add exception code for tz_dpms_mng

If tz_dpms_mng is NULL, it means deviced cannot use internal APIs supported by enlightenment.
So, if it is NULL, we have to disconnect interface with dpms

Change-Id: If8b78c96301c3b45b95d08a1bc5fafe90c1088ec
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoDelete meaningless configuration 32/209532/2
INSUN PYO [Mon, 8 Jul 2019 11:26:40 +0000 (20:26 +0900)]
Delete meaningless configuration

Change-Id: Ifb04e88ce3b75fe4aa3f379af3532c7f0f4ec513

5 years agousb-host-test: ignore failure module load/unload when it is built-in 13/209713/2 accepted/tizen/unified/20190711.062844 submit/tizen/20190710.072253
Seung-Woo Kim [Tue, 9 Jul 2019 09:23:59 +0000 (18:23 +0900)]
usb-host-test: ignore failure module load/unload when it is built-in

Even though dummy_hcd and usb_f_fs are kernel built-in module,
module load failure blocks usb-host-test. Just ignore the failure
of module load/unload when it is built-in.

Change-Id: I3bd7084cf2ce4b5806d272662ecd16f7b97cc11c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoApply async for dpms 24/209324/14 accepted/tizen/unified/20190709.113101 submit/tizen/20190709.075431
lokilee73 [Fri, 5 Jul 2019 01:46:34 +0000 (10:46 +0900)]
Apply async for dpms

change communication method with dpms, from sync to async.

Change-Id: I50894dc5b2b3420d0fb9335e298601a400eb120a
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix memory leak 22/209522/1 accepted/tizen/unified/20190709.071116 submit/tizen/20190708.124837
lokilee73 [Mon, 8 Jul 2019 11:11:20 +0000 (20:11 +0900)]
Fix memory leak

Change-Id: Ie34f039aeab698ba33f8edb9611a82b22ffc6de6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd omitted dependency (zlib) 52/209352/1 accepted/tizen/unified/20190708.052516 submit/tizen/20190705.064027
Inkyun Kil [Fri, 5 Jul 2019 05:35:35 +0000 (14:35 +0900)]
Add omitted dependency (zlib)

Change-Id: I4b4ec163a271a2da0909dd9e379b016962710367
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
5 years agoFix error while loading display.so 62/209262/6 accepted/tizen/unified/20190705.041547 submit/tizen/20190704.115311
lokilee73 [Thu, 4 Jul 2019 06:30:28 +0000 (15:30 +0900)]
Fix error while loading display.so

ex) Failed to open module: /usr/lib/deviced/display.so: undefined symbol: lcd_direct_control

Change-Id: I2f9ddc746fea3170bdaeb8faad10233595323733
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoApply changes for ambient mode 40/209140/5 submit/tizen/20190703.113545
lokilee73 [Tue, 2 Jul 2019 12:57:11 +0000 (21:57 +0900)]
Apply changes for ambient mode

1. add ambient_lcdoff_signal_handler for signal from clock-viewer
2. change broadcasted signal from integer to string
   ex) 0, 1 -> ALPMOff, ALPMOn
3. move ambient_check_invalid_state to del_state_cond
4. add lcd_direct_control for lcd control

Change-Id: Ice5f37124ad90f49ea21b618b99dade6901b8686
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange function names and add lcd_on_procedure for changed ambient mode 24/208724/2
lokilee73 [Thu, 27 Jun 2019 11:50:32 +0000 (20:50 +0900)]
Change function names and add lcd_on_procedure for changed ambient mode

1. change function names for unification
   ex) start_clock -> ambient_start_clock
       end_clock   -> ambient_end_clock
2. add lcd_on_procedure for changed ambient mode

Change-Id: I740ea105e41ef1199e40a0f9db70b3ba675df848
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd information about the relationship between unit dependencies 49/208749/1
INSUN PYO [Fri, 28 Jun 2019 01:47:45 +0000 (10:47 +0900)]
Add information about the relationship between unit dependencies

Change-Id: Ia6f196c854933e5323ef6e7f4011541bd42494c1

5 years agoAdd protection code to prevent crash 49/208649/1 accepted/tizen/unified/20190627.115203 submit/tizen/20190627.050132
lokilee73 [Thu, 27 Jun 2019 04:48:23 +0000 (13:48 +0900)]
Add protection code to prevent crash

If there are not HAL for display_dev->get_state, crash occurs.
So, add protection code for it.

Change-Id: Ibe14f9dfa049dfbe3fd7f7cac1ad4b0cfc608ecf
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix build warning 04/208504/2
INSUN PYO [Tue, 25 Jun 2019 08:35:00 +0000 (17:35 +0900)]
Fix build warning

Change-Id: Ieb07f2399a87bba41c1f519791cb7172aa8f7764

5 years agoAdd display(dpms) reply handling and retry 76/208476/7 accepted/tizen/unified/20190625.222159 submit/tizen/20190625.083700
Hyotaek Shim [Tue, 25 Jun 2019 02:51:39 +0000 (11:51 +0900)]
Add display(dpms) reply handling and retry

Change-Id: I2a1c8dd3646c6b215b1c95c3fb53e5cf07561136
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoChange dpms_get_state to use HAL for lcd get state 02/208502/2
lokilee73 [Tue, 25 Jun 2019 08:11:24 +0000 (17:11 +0900)]
Change dpms_get_state to use HAL for lcd get state

Change-Id: I465f01f4e8b2f4119fc8b2828ea2a909305d4bd2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd battery_health_changed to keep dim in case of bad battery health 22/207222/3 accepted/tizen/unified/20190625.051522 submit/tizen/20190624.124304
lokilee73 [Thu, 30 May 2019 12:13:52 +0000 (21:13 +0900)]
Add battery_health_changed to keep dim in case of bad battery health

LCD dim has to be kept for bad battery health like HEALTH_LOW, HEALTH_HIGH, HEALTH_OVP.
Battery_health_changed adds DIMSTAY_FLAG to pm_status_flag.
It protects LCD change from dim to LCD_OFF by request of other applications or daemons.
ex) lockstate, changestate in dbus-send

Change-Id: I544259e07eb36967df11c1d709508651c214f079
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd display_staydim_check for commonly used code 14/208214/3
lokilee73 [Thu, 20 Jun 2019 02:46:34 +0000 (11:46 +0900)]
Add display_staydim_check for commonly used code

Change-Id: Ib3a5f23b2a93f48eafecb9fe5f1f7a43f19f6bf2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoTemporarily allow org.tizen.system.deviced.Board in dbus policy 15/208015/1
Hyotaek Shim [Mon, 17 Jun 2019 04:33:31 +0000 (13:33 +0900)]
Temporarily allow org.tizen.system.deviced.Board in dbus policy

Change-Id: I5ce697624c93a03bc8ae9af5184ec2456c21ee7a
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoInitialize dpms_connected in disconnect_interface_with_dpms to protect crash 81/207981/1 accepted/tizen/unified/20190618.045939 submit/tizen/20190617.014724
lokilee73 [Fri, 14 Jun 2019 10:35:24 +0000 (19:35 +0900)]
Initialize dpms_connected in disconnect_interface_with_dpms to protect crash

Display can be controlled by devicectl command.
ex) devicectl display stop/start
After disconnect_interface_with_dpms is called by devicectl command,
LCD_ON can be requested via dbus-send.
At this time, dpms related functions and variables are initialized.
So, crash can occur.

Change-Id: I9fdbc0c27e612bbdc9d11309f2a0be6102112d66
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoUpdate battery.health_s in check_health_status 16/207716/2
lokilee73 [Tue, 11 Jun 2019 09:11:14 +0000 (18:11 +0900)]
Update battery.health_s in check_health_status

battery.health_s is not synchronized with battery.health.
So, update battery.health_s in check_health_status to synchronize them.

Change-Id: I779b1c91e202198be62ef858d2fa774a067a2c7d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>