platform/core/appfw/amd.git
22 months agoRevert "Revert "Kill the app which socket is not connected"" 43/285643/1
Changgyu Choi [Fri, 16 Dec 2022 01:49:30 +0000 (10:49 +0900)]
Revert "Revert "Kill the app which socket is not connected""

This reverts commit 8b4ce77e7cc38db8bf838404a90757cb10317f0c.

Change-Id: I9befe0cc94c8781092b78ecd35ee6030104f8f03
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.12 40/285640/1
Changgyu Choi [Fri, 16 Dec 2022 01:29:04 +0000 (10:29 +0900)]
Release version 1.57.12

Changes:
 - Change priority of normal level request
 - Check socket existence before sending requests
 - Adjust priority of idler

Change-Id: Ia656eb768323b30d41c51a8602ad87174680b9f5
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoAdjust priority of idler 39/285639/2
Hwankyu Jhun [Fri, 16 Dec 2022 01:24:41 +0000 (01:24 +0000)]
Adjust priority of idler

After checking the permission of the caller, cynara thread adds a idler
to send the request to the main thread.
This patch adjusts the priority of adding the idler to high.

Change-Id: I832628bd53e5d558ca9e5aca184ceb7461498a89
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoCheck socket existence before sending requests 33/285633/2
Hwankyu Jhun [Fri, 16 Dec 2022 00:31:17 +0000 (00:31 +0000)]
Check socket existence before sending requests

AMD checks whether the app socket is ready or not before sending the
request to the running app process.
If it's not ready, AMD doesn't send the request for reactivity.

Change-Id: Ied029cb8c4501067d31f483801a3557bc7f86ad1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoChange priority of normal level request 38/285638/1
Changgyu Choi [Fri, 16 Dec 2022 01:10:25 +0000 (10:10 +0900)]
Change priority of normal level request

When amd was received many requests, it has a problem that the request
is processed continuously late due to the slow processing of the
request.
This patch is intended to improve this problem by setting the priority
of normal level requests a little higher thant the G_PRIORITY_DEFUALT.

Change-Id: I6aeb585893058ae391eb893c70bcde155898316b
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.11 20/285220/1 accepted/tizen/unified/20221209.014558
Changgyu Choi [Thu, 8 Dec 2022 00:58:13 +0000 (09:58 +0900)]
Release version 1.57.11

Changes:
 - Revert "Kill the app which socket is not connected"

Change-Id: I331a47993171a55b5f13037ec8aed21c612c5ba1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRevert "Kill the app which socket is not connected" 18/285218/2
Changgyu Choi [Thu, 8 Dec 2022 00:18:52 +0000 (09:18 +0900)]
Revert "Kill the app which socket is not connected"

This reverts commit c3adee3cc5b2d2c2affac0380c7e0dd3aa051c21.

This patch will be applied again soon.

Change-Id: Ic48c614e0ec0e85d168db3c77629411c61ce88b4

22 months agoRelease version 1.57.10 80/285180/1
Changgyu Choi [Wed, 7 Dec 2022 08:21:54 +0000 (17:21 +0900)]
Release version 1.57.10

Changes:
 - Apply subsession_register_event_callback()

Change-Id: I0a4a40b862fd5eb8d0a2e3c6385db7bc5c5b2160
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoApply subsession_register_event_callback() 73/285173/2
Changgyu Choi [Wed, 7 Dec 2022 07:19:30 +0000 (16:19 +0900)]
Apply subsession_register_event_callback()

sessiond is sometimes loaded late when booting.
So, the initialization of amd is delayed due to this.
This patch is applied to improve amd initialization performance.

Change-Id: I4af9dc80455ec9a9324ceb24b0f1f479cfdfa5c1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.9 50/285150/1
Changgyu Choi [Wed, 7 Dec 2022 01:22:46 +0000 (10:22 +0900)]
Release version 1.57.9

Changes:
 - Kill the app which socket is not connected

Change-Id: Ibdf33531c3689760834332e9c5088c4fb988c5c4
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoMerge "Kill the app which socket is not connected" into tizen
Changgyu Choi [Wed, 7 Dec 2022 01:14:31 +0000 (01:14 +0000)]
Merge "Kill the app which socket is not connected" into tizen

22 months agoKill the app which socket is not connected 73/284373/8
Changgyu Choi [Wed, 16 Nov 2022 09:45:55 +0000 (18:45 +0900)]
Kill the app which socket is not connected

Sometimes, the socket creation of a specific app is delayed and the launch request cannot be responded.
In this case, there is a possibility that it will be a zombie app.
When this patch is applied, amd forcibly shuts down applications whose sockets are not connected for a long time and do not respond to execution requests.

Change-Id: I3d202f4c591097b5181e94a2e6a03ecd2a34c65e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.8 48/285148/1 accepted/tizen/unified/20221208.043839
Hwankyu Jhun [Wed, 7 Dec 2022 01:07:08 +0000 (01:07 +0000)]
Release version 1.57.8

Changes:
 - Delay amd ready file creation
 - Revert "Add pkgmgr-info-server dependency"

Change-Id: I4da99d22bc07bf45f5039b4f8d2270a68f55147f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRevert "Add pkgmgr-info-server dependency" 40/285140/2
Hwankyu Jhun [Tue, 6 Dec 2022 23:57:44 +0000 (23:57 +0000)]
Revert "Add pkgmgr-info-server dependency"

This reverts commit e51622d78df11074c8f1d2ee6372726b7ec0b783.
Currently, the pkginfo-server creates a ready file after
loading package & app information.
Calling the direct access function is not needed anymore.

Change-Id: I33a62a6537553323a0b65ec361356e3eaa76bfdf
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoDelay amd ready file creation 42/285142/2
Hwankyu Jhun [Wed, 7 Dec 2022 00:42:41 +0000 (00:42 +0000)]
Delay amd ready file creation

To delay amd ready file creation, amd uses g_idle_add() function.

Change-Id: Iaa26d7acfe1bb149ebd678d4f51577c505933177
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 1.57.7 33/285033/1
Hwankyu Jhun [Mon, 5 Dec 2022 01:38:34 +0000 (01:38 +0000)]
Release version 1.57.7

Changes:
 - Revert "Modify the conditions for creating a pending item"
 - Fix checking pending item condition

Change-Id: Idf252ab95d8cbc201e2ba7c537053eb449c632fb
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoFix checking pending item condition 31/285031/1
Hwankyu Jhun [Mon, 5 Dec 2022 01:00:12 +0000 (01:00 +0000)]
Fix checking pending item condition

If the request option is AUL_SOCK_QUEUE, AMd has to pend the request.
This patch fixes the check condition.

Change-Id: I35e60a97aabd5cd264e7f4484823e4cf4afe605d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRevert "Modify the conditions for creating a pending item" 30/285030/1
Hwankyu Jhun [Mon, 5 Dec 2022 00:49:44 +0000 (00:49 +0000)]
Revert "Modify the conditions for creating a pending item"

This reverts commit 15f35b1ac30f2d01ab783b8aca463a62b4954174.

Change-Id: I74cb84befc044abf554e1e2e5a519cb3ba2321c0

22 months agoRelease version 1.57.6 02/285002/1
Changgyu Choi [Fri, 2 Dec 2022 09:36:20 +0000 (18:36 +0900)]
Release version 1.57.6

Changes:
 - Fix launch fail case

Change-Id: Iab65ce5147b99442c7a628e08a0ac0643919a708
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix launch fail case 01/285001/1
Changgyu Choi [Fri, 2 Dec 2022 09:27:58 +0000 (18:27 +0900)]
Fix launch fail case

If local launch was failed, amd needs to check that request is pended
before flushing pending request.

Change-Id: I4df8f2438ca7bab3282ba215088e4a79209194f9
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.5 70/284970/1
Changgyu Choi [Fri, 2 Dec 2022 01:34:12 +0000 (10:34 +0900)]
Release version 1.57.5

Changes:
 - Modify the conditions for creating a pending item
 - Prevent duplicate launch

Change-Id: I88d701dceda4855588bbd649fb676e3784affd1d
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoPrevent duplicate launch 59/284859/6
Changgyu Choi [Tue, 29 Nov 2022 07:56:03 +0000 (16:56 +0900)]
Prevent duplicate launch

If both on-boot and restart options are enabled.
Some app may be duplicated launched.
After applying this patch, amd restart app after pkg update when it is not onboot app.

Change-Id: I9b79c0061ae3af101bd2dae197fc35fe04b0cb16
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoModify the conditions for creating a pending item 22/284922/6
Changgyu Choi [Thu, 1 Dec 2022 01:47:31 +0000 (10:47 +0900)]
Modify the conditions for creating a pending item

The previous version of amd did not create a pending item when doing local launch.
This patch does not create a pending item for local launch to solve these problems.

Change-Id: I24bf6a30d12faa7e03b1ca05033ee2b1aa91382c
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.4 97/284797/1
Changgyu Choi [Mon, 28 Nov 2022 01:18:40 +0000 (10:18 +0900)]
Release version 1.57.4

Changes:
 - Fix APP_TERM_BY_PID_ASYNC behavior
 - Fix static analysis issue

Change-Id: I2d7951f24ec091a3dc09fe52b640e93dbc4719b1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix static analysis issue 57/284757/1
Changgyu Choi [Fri, 25 Nov 2022 06:38:30 +0000 (15:38 +0900)]
Fix static analysis issue

Change-Id: I9c3b53a5e793b53184855df1bcf44a69e2e12aac
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix APP_TERM_BY_PID_ASYNC behavior 36/284736/1
Changgyu Choi [Thu, 24 Nov 2022 11:12:25 +0000 (20:12 +0900)]
Fix APP_TERM_BY_PID_ASYNC behavior

The operation of APP_TERM_BY_PID_ASYNC has been changed due to launch refactoring.
This patch modifies the result of the above command to return async as before.

Change-Id: I40152e3ea4ef5a09ab9abe3703a4289baa1a7c70
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 1.57.3 33/284633/1 accepted/tizen/unified/20221124.015424
Changgyu Choi [Tue, 22 Nov 2022 06:41:28 +0000 (15:41 +0900)]
Release version 1.57.3

Changes:
 - Fix static analysis issues
 - Add a request id on the timeout logs

Change-Id: Ic4362f4b813659cafb345e182b964e376c15a351
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoAdd a request id on the timeout logs 80/284580/2
Changgyu Choi [Mon, 21 Nov 2022 07:16:16 +0000 (16:16 +0900)]
Add a request id on the timeout logs

This patch adds a request id logs for debugging.

Change-Id: Icb2239205ddbff9084bcfe3596eda98a34b1414d
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix static analysis issues 83/284583/2
Changgyu Choi [Mon, 21 Nov 2022 08:16:00 +0000 (17:16 +0900)]
Fix static analysis issues

Change-Id: Iacd4b8656945a7fd021633f237eb4f72a81e3d7d
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoRelease version 1.57.2 41/284441/1 accepted/tizen/unified/20221118.021721
Hwankyu Jhun [Thu, 17 Nov 2022 06:37:46 +0000 (06:37 +0000)]
Release version 1.57.2

Changes:
 - Refactor amd main
 - Add namespace to macro
 - Refactor ANR monitor
 - Adjust coding style

Change-Id: I8c8ba5bce738343140cb6491a8ef255cfcc652e5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoAdjust coding style 36/284436/6
Hwankyu Jhun [Thu, 17 Nov 2022 02:05:28 +0000 (02:05 +0000)]
Adjust coding style

This patch adjusts c++ language coding style by cpplint tool.
The coding style is google c++ coding style.

Change-Id: I8379fca53ed589f8704e7fa5b2e8df31339558a2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRefactor ANR monitor 69/284369/6
Hwankyu Jhun [Wed, 16 Nov 2022 08:18:42 +0000 (08:18 +0000)]
Refactor ANR monitor

The anr monitor is implemented using C++ language.

Change-Id: I981a73b7009b2bf55f637df44b7d059a1504eaf3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoAdd namespace to macro 68/284368/1
Hwankyu Jhun [Wed, 16 Nov 2022 07:55:22 +0000 (07:55 +0000)]
Add namespace to macro

If "using namespace amd" is not defined, using THROW() causes the build
break issue.

Change-Id: I249609439afe84e310022b08e385370827e1a339
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRefactor amd main 32/284332/2
Hwankyu Jhun [Wed, 16 Nov 2022 01:20:13 +0000 (01:20 +0000)]
Refactor amd main

The amd_main is implmeneted using C++ language.

Change-Id: I7d868ad913f4558671c15f4509090a0f840f3069
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.57.1 91/284291/1 accepted/tizen/unified/20221116.120912 accepted/tizen/unified/20221116.164428
Changgyu Choi [Tue, 15 Nov 2022 04:52:40 +0000 (13:52 +0900)]
Release version 1.57.1

Changes:
 - Change priority of request scheduler to -90

Change-Id: I4b2dbbc6b48a9874adab1845b662662cb8ba0e29
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoChange priority of request scheduler to -90 88/284288/1
Changgyu Choi [Tue, 15 Nov 2022 04:34:27 +0000 (13:34 +0900)]
Change priority of request scheduler to -90

In abnormal case(OOM), amd may not work watchdog normally because it handles requests scheduled by G_PRIORITY_HIGH.
In this case, there is a problem that amd is killed because it cannot respond to the watchdog signal.
This patch solves this problem by lowering the request scheduling priority a little (-100 -> -90).

Change-Id: Id25b689bf21b4a0b9decb0b3c66b3e31934ea052
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoRelease version 1.57.0 34/284234/2 accepted/tizen/7.0/unified/20221116.014836 accepted/tizen/unified/20221115.172900
Hwankyu Jhun [Mon, 14 Nov 2022 05:39:35 +0000 (05:39 +0000)]
Release version 1.57.0

Changes:
 - Modify handling launch requests

Change-Id: I45f35a2f797bf977c297c62bdacdf56e2af10bc0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoModify handling launch requests 89/283789/37
Hwankyu Jhun [Thu, 3 Nov 2022 04:43:14 +0000 (04:43 +0000)]
Modify handling launch requests

In the previous, amd will be blocked until launchpad responds.
To avoid blocking issues, amd sends the launch request to launchpad
asynchronously. And then, amd waits for getting read events.

Change-Id: I17f782232d0c6f84dc7289b04165b89ef5668cd3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.56.13 87/284187/1 accepted/tizen/7.0/unified/20221115.022322 accepted/tizen/unified/20221115.022412
Changgyu Choi [Fri, 11 Nov 2022 07:10:01 +0000 (16:10 +0900)]
Release version 1.56.13

Changes:
 - Add missing to check the variable is nullptr
 - Send -EAGAIN error when result info has timed out.

Change-Id: Id6a3740b99669fb0695c8407dd79dd4f1f9100f4
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoSend -EAGAIN error when result info has timed out. 62/284162/5
Changgyu Choi [Fri, 11 Nov 2022 01:35:36 +0000 (10:35 +0900)]
Send -EAGAIN error when result info has timed out.

When a app use app_control_send_launch_request_sync(), it can't receive timeout error.
After applying this patch, app control api can distinguish timeout event.

Change-Id: I8bc166b99d057dc11092434f9058b1aaf6fb1bfc
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoAdd missing to check the variable is nullptr 23/284023/2
Changgyu Choi [Wed, 9 Nov 2022 00:42:29 +0000 (09:42 +0900)]
Add missing to check the variable is nullptr

Change-Id: Ib2f7092b50803e577e530689479307b4bc3f377f
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoRelease version 1.56.12 25/283925/1 accepted/tizen/7.0/unified/20221108.164939 accepted/tizen/7.0/unified/20221110.060004 accepted/tizen/unified/20221108.163900
Hwankyu Jhun [Mon, 7 Nov 2022 08:22:33 +0000 (08:22 +0000)]
Release version 1.56.12

Changes:
 - Fix wrong implementation of getting instance ID

Change-Id: I05da29a92fd785bb59e9b47d0b3dc44e4dbdb0f6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoFix wrong implementation of getting instance ID 23/283923/1
Hwankyu Jhun [Mon, 7 Nov 2022 08:12:15 +0000 (08:12 +0000)]
Fix wrong implementation of getting instance ID

The _launch_context_get_instance_id() function has to return nullptr
when the instance id is empty string.

Change-Id: I2031658fc8a63754de03fb16242880d97b21159e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.56.11 14/283814/1 accepted/tizen/unified/20221104.082322
Changgyu Choi [Thu, 3 Nov 2022 09:16:37 +0000 (18:16 +0900)]
Release version 1.56.11

Changes:
 - Fix wrong implementations
 - Update app status while updating the lifecycle state
 - Update app status to dying when socket disconnected

Change-Id: I2a6495d9b76f044b7585d38e2fb1f636b3d6d673
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoUpdate app status to dying when socket disconnected 40/283740/6
Changgyu Choi [Wed, 2 Nov 2022 08:53:50 +0000 (17:53 +0900)]
Update app status to dying when socket disconnected

When the app socket was disconnected,
amd update the app status to improve the timing issue.

Change-Id: I6d5e313c9533dfb76d8eb76dea772fc90da447f1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoUpdate app status while updating the lifecycle state 52/259652/9
Hwankyu Jhun [Thu, 10 Jun 2021 10:46:44 +0000 (19:46 +0900)]
Update app status while updating the lifecycle state

While getting the request to update the lifecycle state, the status of
the app status handle will be updated.
This fix does not exactly match the behavior. This is a patch prepared
for testing purpose by the request.

Change-Id: If1bd3b661cc0a3c256407f17229b758e4afed9cd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoFix wrong implementations 30/283730/2
Hwankyu Jhun [Wed, 2 Nov 2022 08:21:30 +0000 (08:21 +0000)]
Fix wrong implementations

- Fixes a wrong argument of function call
- Fixes a wrong privilege of access control
- Fixes a missing component info setting

Change-Id: Ib0d279151760c9cfeb53f7dc938ca24abe7ca63e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.56.10 87/283687/1
Hwankyu Jhun [Wed, 2 Nov 2022 02:13:24 +0000 (02:13 +0000)]
Release version 1.56.10

Changes:
 - Fix wrong cmake options
 - Refactor amd launch

Change-Id: If1bc1c2ae2e68ec5c8b9b2623b0654ade5920fae
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRefactor amd launch 24/283324/12
Hwankyu Jhun [Mon, 24 Oct 2022 08:47:28 +0000 (08:47 +0000)]
Refactor amd launch

The amd launch is implemented using C++ language.

Change-Id: Iffa2b994a3f3538c80ca69bc5d434c382d95a814
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoFix wrong cmake options 09/283609/1
Hwankyu Jhun [Mon, 31 Oct 2022 07:16:43 +0000 (07:16 +0000)]
Fix wrong cmake options

This patch fixes wrong compilation options to apply.

Change-Id: Ia4e1363d0e2b35991fcbdc96c7ad4e70ea35356b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.56.9 00/283500/1
Hwankyu Jhun [Fri, 28 Oct 2022 00:07:53 +0000 (00:07 +0000)]
Release version 1.56.9

Changes:
 - Modify subsession event registration

Change-Id: Ic933cb7f3e0b26865f64b36f680a8203b417815c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoModify subsession event registration 75/283475/4
Hwankyu Jhun [Thu, 27 Oct 2022 10:13:12 +0000 (10:13 +0000)]
Modify subsession event registration

When the user logs in or dbus is ready, amd registers the subsession event.
Currently, while amd is calling RegisterSubsessionEvent(), amd cannot use dbus.
It causes the error of the subsession API.

Change-Id: If752cd37ba83bd24dd7ab6a27c98b12bb6d4a6bc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.56.8 84/283084/1
Changgyu Choi [Tue, 18 Oct 2022 02:25:41 +0000 (11:25 +0900)]
Release version 1.56.8

Changes:
 - Fix static analysis issues

Change-Id: I6e0e2c3a8e1e28e3d62ab4084493277b18592677
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix static analysis issues 30/283030/1
Changgyu Choi [Mon, 17 Oct 2022 03:13:31 +0000 (12:13 +0900)]
Fix static analysis issues

Change-Id: Ib55d0f085775b0d2727d3f9898d7bfd7c043ee14
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.56.7 80/282980/1
Hwankyu Jhun [Fri, 14 Oct 2022 06:41:20 +0000 (06:41 +0000)]
Release version 1.56.7

Changes:
 - Modify exception handling of handling app term request
 - Prevent deadlock issue

Change-Id: I3e7a8a51227fa29f8dbe2011657cb4b649e21835
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoPrevent deadlock issue 77/282977/1
Hwankyu Jhun [Fri, 14 Oct 2022 06:20:35 +0000 (06:20 +0000)]
Prevent deadlock issue

When sending the request is failed, amd closes the socket of the client channel.
It makes the deadlock issue of amd with ecore errors in a some product.
To avoid deadlock issues, amd removes the client channel when sending the request
is failed.

Change-Id: Ia6055d772e39f66ae159ca1148d302cd1c5acd4b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoModify exception handling of handling app term request 66/282966/1
Hwankyu Jhun [Fri, 14 Oct 2022 02:25:31 +0000 (02:25 +0000)]
Modify exception handling of handling app term request

If the argument is wrong, AMD should sends the error result to the caller.
This patch adds missing error logs for debugging.

Change-Id: I62fe1b7569fcd74abd5e0573310023e81fef22d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.56.6 84/282484/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.104936 accepted/tizen/unified/20221005.023220 tizen_7.0_m2_release
Hwankyu Jhun [Tue, 4 Oct 2022 07:13:41 +0000 (07:13 +0000)]
Release version 1.56.6

Changes:
 - Fix the termination request handling

Change-Id: Iddf518ab88d925dd4d8b516bbb913fc379f878d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix the termination request handling 70/282470/3
Hwankyu Jhun [Tue, 4 Oct 2022 06:00:42 +0000 (06:00 +0000)]
Fix the termination request handling

When amd is handling the termination requests, amd updates the app status to
STATUS_DYING to handle the termination request and the launch request properly.
After handling the termination request, amd sends the launch request to
the launchpad to execute a new process.

Change-Id: I26b7d75f5916a3ddea15729bcd6bedcd5b128ebd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.56.5 66/282366/1 accepted/tizen/unified/20221004.150436
Changgyu Choi [Fri, 30 Sep 2022 07:56:34 +0000 (16:56 +0900)]
Release version 1.56.5

Changes:
 - Fix static analysis issues

Change-Id: I95ca8720af230f922be8451ed362af590b7d2f56
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix static analysis issues 65/282365/1
Changgyu Choi [Fri, 30 Sep 2022 07:53:24 +0000 (16:53 +0900)]
Fix static analysis issues

Changes:
 - Fix other types of comparison.

Change-Id: I313a2e274768a12e1a93920cf3a5c17b654cb238
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.56.4 21/282121/1 accepted/tizen/unified/20220928.144439
Hwankyu Jhun [Tue, 27 Sep 2022 06:55:48 +0000 (06:55 +0000)]
Release version 1.56.4

Changes:
 - Use modified tizen_base::Parcel
 - Fix static analysis issues

Change-Id: I567a4c9e71e4d3784a5d84adbcf78467d810aba0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix static analysis issues 03/282103/2
Hwankyu Jhun [Tue, 27 Sep 2022 05:18:11 +0000 (05:18 +0000)]
Fix static analysis issues

The following issues are fixed:
 - ODR_VIOLATION

Change-Id: Ia62c1b6013ce217a0512eda71488a99283d0956e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoUse modified tizen_base::Parcel 52/281952/1
Hwankyu Jhun [Fri, 23 Sep 2022 10:48:40 +0000 (10:48 +0000)]
Use modified tizen_base::Parcel

To improve the performance of the parcel creation, the implementation of
the Parcel is changed. It uses malloc() instead of std::vector.

Requires:
 - https://review.tizen.org/gerrit/#/c/platform/core/base/bundle/+/281779/

Change-Id: Ib3de172fe0bfd584f9d7aadd73709b42c566859a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.56.3 39/281739/1 accepted/tizen/unified/20220922.062122 accepted/tizen/unified/20220922.062744
Changgyu Choi [Wed, 21 Sep 2022 07:56:35 +0000 (16:56 +0900)]
Release version 1.56.3

Changes:
 - Remove wl_display_roundtrip()

Change-Id: I529fc1b0fb04b14d0656b2ac3aedc57170621640
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRemove wl_display_roundtrip() 35/281735/1
Changgyu Choi [Wed, 21 Sep 2022 07:43:23 +0000 (16:43 +0900)]
Remove wl_display_roundtrip()

wl_display_roundtrip() causes blocking.

Change-Id: I039394439314e21d4add7c1f7525cd754bcf07a3
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.56.2 48/281348/1 accepted/tizen/unified/20220919.090122
Hwankyu Jhun [Thu, 15 Sep 2022 22:54:09 +0000 (22:54 +0000)]
Release version 1.56.2

Changes:
 - Modify exception handling for missed error transmission

Change-Id: Ic6453f867e2c4dd8ba4a4215a817c9c46de36f56
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoModify exception handling for missed error transmission 02/281302/1
Hwankyu Jhun [Thu, 15 Sep 2022 09:45:29 +0000 (09:45 +0000)]
Modify exception handling for missed error transmission

When the target application is not running, AMD has to send the error to
the caller.

Change-Id: I3dbe420626e80bcdd8b98f91107a21ae07f4442a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.56.1 65/280965/1 accepted/tizen/unified/20220913.175631
Changgyu Choi [Wed, 7 Sep 2022 07:42:15 +0000 (16:42 +0900)]
Release version 1.56.1

Changes:
 - Fix static analysis issues
 - Add missing certinfo release logic

Change-Id: I5fce0788a6e82b78284ca7124ec575579fa1df56
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoAdd missing certinfo release logic 27/280927/3
Changgyu Choi [Wed, 7 Sep 2022 01:47:47 +0000 (10:47 +0900)]
Add missing certinfo release logic

Change-Id: Ifcdfd45cd1eca5b48758330e32106fd913fd1add
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix static analysis issues 67/280867/8
Changgyu Choi [Tue, 6 Sep 2022 06:04:07 +0000 (15:04 +0900)]
Fix static analysis issues

Changs:
 - Fix implicit lower size type casting.

Change-Id: Ibe4b63a7927d7ad76e3015c72b80afa3cb0e8167
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.56.0 18/280918/1 accepted/tizen/unified/20220908.013406
Changgyu Choi [Wed, 7 Sep 2022 00:26:44 +0000 (09:26 +0900)]
Release version 1.56.0

Changes:
 - Add PKG_PRE_EVENT_SEND handler

Change-Id: Ie2d0a858335c29614f2bb0b5b6fa39413302cf95
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoAdd PKG_PRE_EVENT_SEND handler 91/280291/9
Changgyu Choi [Fri, 26 Aug 2022 08:08:50 +0000 (17:08 +0900)]
Add PKG_PRE_EVENT_SEND handler

This command receive pkg event from app-installers before sending pkg event to listening apps.
amd should reload appinfo before some apps
that is listing pkg event receive done event.

Requires:
 - https://review.tizen.org/gerrit/c/platform/core/appfw/aul-1/+/280292

Change-Id: I8a550531ccaab85adb902ea8fe4578ac1d0f33d0
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.55.8 33/280433/1 accepted/tizen/unified/20220830.133713 submit/tizen/20220830.051217
Changgyu Choi [Tue, 30 Aug 2022 05:11:05 +0000 (14:11 +0900)]
Release version 1.55.8

Changes:
 - Add a missing timeout set to the client socket
 - Change unassigned fd value to -1
 - Fix GetPendingItem()
 - Remove unnecessary reference shared_ptr

Change-Id: I8b005c371de578d5bae7a1a2e6041b4cd7906119
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRemove unnecessary reference shared_ptr 32/280432/2
Changgyu Choi [Tue, 30 Aug 2022 04:41:32 +0000 (13:41 +0900)]
Remove unnecessary reference shared_ptr

Some use case of shared_from_this() is unnecessary.
It only causes unnecessary object creation & destruction.

Change-Id: I4fc4bc10324f24f6b419a05efdb4b718e97672d6
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix GetPendingItem() 28/280428/4
Changgyu Choi [Tue, 30 Aug 2022 03:56:07 +0000 (12:56 +0900)]
Fix GetPendingItem()

amd returns nullptr without making it when there is no PendingItem.
This patch is for working same as previous version.

Change-Id: I8a73a09a09e81c9bcd5e30fe212b0da52b195607
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoChange unassigned fd value to -1 17/280417/2
Changgyu Choi [Tue, 30 Aug 2022 01:53:40 +0000 (10:53 +0900)]
Change unassigned fd value to -1

The request had assigned fd to 0 after DetachFD.
It can cause wrong use or close.

Change-Id: I86b224f86e06012fe1b0f639975bb016aa36f89c
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoAdd a missing timeout set to the client socket 13/280413/3
Hwankyu Jhun [Tue, 30 Aug 2022 00:39:50 +0000 (00:39 +0000)]
Add a missing timeout set to the client socket

This patch adds calling SetReceiveTimeout() to set the receive timeout
of the socket of the app com client. The interval of the timeout of the socket
is 100ms.

Change-Id: I428f521150d8d62b92a6c37bbb0fa36e1fd6a2f0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.55.7 74/280274/1 accepted/tizen/unified/20220830.032706 submit/tizen/20220826.060801
Hwankyu Jhun [Fri, 26 Aug 2022 05:27:48 +0000 (05:27 +0000)]
Release version 1.55.7

Changes:
 - Fix metadata-profile.xml

Change-Id: I8578015b10408810afb5f87111ea99671ba09e3f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix metadata-profile.xml 55/280255/1
Hwankyu Jhun [Fri, 26 Aug 2022 01:27:41 +0000 (01:27 +0000)]
Fix metadata-profile.xml

If the published value is 'Y', it means the metadata is opened in officially.

Change-Id: Iff625a848395359b780594d92752788a476d419e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.55.6 11/280211/1 submit/tizen/20220825.082646
Hwankyu Jhun [Thu, 25 Aug 2022 08:23:20 +0000 (08:23 +0000)]
Release version 1.55.6

Changes:
 - Fix wrong exception handling

Change-Id: I803248ea74a984c0749885010377882a15d51650
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix wrong exception handling 10/280210/1
Hwankyu Jhun [Thu, 25 Aug 2022 08:16:56 +0000 (08:16 +0000)]
Fix wrong exception handling

If sending the rpc-port fd is failed, AMD has to remove the created port information.

Change-Id: Ic42af9a57ad5712a06db42076ddf0aa53b878674
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.55.5 69/280169/1 accepted/tizen/unified/20220825.135039 submit/tizen/20220825.005043
Changgyu Choi [Thu, 25 Aug 2022 00:49:51 +0000 (09:49 +0900)]
Release version 1.55.5

Changes:
 - Refactor amd::Request

Change-Id: I3aea0d7675ad4c287309aaa8e4c666f134393d66
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRefactor amd::Request 15/280115/3
Changgyu Choi [Wed, 24 Aug 2022 05:47:17 +0000 (14:47 +0900)]
Refactor amd::Request

Changes:
 - Replaces loop to stl method instead of for and while.
 - Replaces type to simple name instead of complicated one.
 - Changes included header to amd_noti.h due to wrong dependency.

Change-Id: I9f106e237b83d844a68b67d4fd669c28751c37de
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.55.4 45/280045/1 submit/tizen/20220823.011841
Changgyu Choi [Tue, 23 Aug 2022 01:17:19 +0000 (10:17 +0900)]
Release version 1.55.4

Changes:
 - Change CheckStatus timing

Change-Id: I65fd5156cf044fd449f75672bcea53483887f4c2
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoChange CheckStatus timing 77/279977/4
Changgyu Choi [Mon, 22 Aug 2022 01:47:51 +0000 (10:47 +0900)]
Change CheckStatus timing

CheckStatus() should be executed immediately before the
DispatchRequest().

Change-Id: I3eacdd4bcf8f16b8af947c90beb198d4d9b03968
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.55.3 67/279667/1 accepted/tizen/unified/20220818.210813 submit/tizen/20220816.010744 submit/tizen/20220817.052411 submit/tizen/20220818.050713
Changgyu Choi [Tue, 16 Aug 2022 01:01:57 +0000 (10:01 +0900)]
Release version 1.55.3

Changes:
 - Fix CheckStatus()

Change-Id: I3adce98dc52e9d2e0e9ad9282e2e4d66bc4f4332
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix CheckStatus() 11/279611/2
Changgyu Choi [Fri, 12 Aug 2022 08:15:44 +0000 (17:15 +0900)]
Fix CheckStatus()

Although request has not AUL_K_APPID, it should be Normal status.

Change-Id: I9150cae2b2f558686ec0b5d80ebafce35464b9c2
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.55.2 38/279538/1 submit/tizen/20220811.062848
Hwankyu Jhun [Thu, 11 Aug 2022 06:24:49 +0000 (15:24 +0900)]
Release version 1.55.2

Changes:
 - Fix wrong implementation

Change-Id: I6d81cedd00128d519eeaa6de2b5fe98adeace7d8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix wrong implementation 33/279533/2
Hwankyu Jhun [Thu, 11 Aug 2022 05:21:27 +0000 (14:21 +0900)]
Fix wrong implementation

The request handler of the APP_TERM_BY_PID_SYNC_WITHOUT_RESTART command
is fixed. AMD has to send the result that is 0 when handling the request
is successfully.

Change-Id: If884c92fb3cd05296b123568dd24a570e71d8c08
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.55.1 74/279274/1 accepted/tizen/unified/20220805.131902 submit/tizen/20220804.142848
Changgyu Choi [Fri, 5 Aug 2022 01:23:52 +0000 (10:23 +0900)]
Release version 1.55.1

Changes:
 - Set the value in the bundle for light user app

Change-Id: I9a352c55430685f156556b5e776e0839511dc47a
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoSet the value in the bundle for light user app 37/278337/9
Ilho Kim [Tue, 19 Jul 2022 06:33:39 +0000 (15:33 +0900)]
Set the value in the bundle for light user app

Set the value in the bundle to distinguish
the launch of the app using the light user feature

Change-Id: I7cf34ca992ab6db5a1b77bab2c3f247d858e097c
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
2 years agoRelease version 1.55.0 10/279110/1 accepted/tizen/unified/20220802.144747 accepted/tizen/unified/20220803.072914 submit/tizen/20220802.063524
Hwankyu Jhun [Tue, 2 Aug 2022 06:31:23 +0000 (15:31 +0900)]
Release version 1.55.0

Changes:
 - Remove amd-mod-launchpad package
 - Bypass privilege check for RPC Port

Change-Id: I593b47be87f88a2a5ca2c2a203b739b094064049
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoBypass privilege check for RPC Port 79/279079/1
Hwankyu Jhun [Tue, 2 Aug 2022 01:13:15 +0000 (10:13 +0900)]
Bypass privilege check for RPC Port

If the target application is the default voice control engine,
AMD doesn't check privileges. The default voice control engine is set to
the vconfkey that is VCONFKEY_VC_ENGINE_DEFAULT. AMD monitors the
vconfkey using the vconf_notify_key_changed() API. If the value of the
key is changed, AMD sets the default voice control engine.

Change-Id: I81349a7843bb99bc0d12918736544e49a87f9ffd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRemove amd-mod-launchpad package 28/278928/1
Hwankyu Jhun [Thu, 28 Jul 2022 07:05:15 +0000 (16:05 +0900)]
Remove amd-mod-launchpad package

The package is not used. We decide to remove the package from this.
If it's needed again, we'll implement it in the launchpad package as the
shared object.

Change-Id: Id4787e22ee7cb91b7fc93fbf73b4574e4d29b034
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRevert "Revert "Check process ID before calling API"" 03/278803/1
Changgyu Choi [Tue, 26 Jul 2022 07:50:52 +0000 (16:50 +0900)]
Revert "Revert "Check process ID before calling API""

This reverts commit 37726e951d4bcf91d245fb98e98da0d4c3381b44.

Change-Id: Ideeac2920c8881de4b5335fc21c0c9781da5a780
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRevert "Revert "Change request process policy"" 02/278802/1
Changgyu Choi [Tue, 26 Jul 2022 07:48:29 +0000 (16:48 +0900)]
Revert "Revert "Change request process policy""

This reverts commit 7881b327605f447b8ff3a39cccb74518859a2aa0.

Change-Id: I4ebcb5a9c6958a501fc622dcfda2e7215965baf1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRevert "Change request process policy" 18/278718/1 accepted/tizen/unified/20220728.131822 submit/tizen/20220725.232057
Changgyu Choi [Mon, 25 Jul 2022 08:59:32 +0000 (17:59 +0900)]
Revert "Change request process policy"

This reverts commit c2a42da6823c01bc22fccab7cdc89cf80ac4f867.

Change-Id: Ia96e0ee2955b6b395b1c9477ab4c7b07ecec108e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRevert "Check process ID before calling API" 17/278717/3
Changgyu Choi [Mon, 25 Jul 2022 08:58:03 +0000 (17:58 +0900)]
Revert "Check process ID before calling API"

This reverts commit 6a4a2862db4c60f163fb80270d52cea64d80ed78.

Change-Id: I96636931cb4c5e1484709d0ff60feeb593022a82
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.54.3 69/278669/1 submit/tizen/20220725.024329
Changgyu Choi [Mon, 25 Jul 2022 02:41:35 +0000 (11:41 +0900)]
Release version 1.54.3

Changes:
 - Remove launchpad cpu boosting inheritance

Change-Id: Iaed6be9eb2e072e9f6c5f0353d0ea5798149f244
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>