aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-proxy.cpp
AgeCommit message (Collapse)AuthorFilesLines
2021-08-20homescreen/hs-proxy: Guard against empty appidslamprey_12.1.9lamprey_12.1.8lamprey_12.1.7lamprey_12.1.6lamprey_12.1.5lamprey_12.1.4lamprey_12.1.3lamprey_12.1.20lamprey_12.1.2lamprey_12.1.19lamprey_12.1.18lamprey_12.1.17lamprey_12.1.16lamprey_12.1.15lamprey_12.1.14lamprey_12.1.13lamprey_12.1.12lamprey_12.1.11lamprey_12.1.10lamprey_12.1.1lamprey_12.1.0lamprey_12.0.1lamprey/12.1.9lamprey/12.1.8lamprey/12.1.7lamprey/12.1.6lamprey/12.1.5lamprey/12.1.4lamprey/12.1.3lamprey/12.1.20lamprey/12.1.2lamprey/12.1.19lamprey/12.1.18lamprey/12.1.17lamprey/12.1.16lamprey/12.1.15lamprey/12.1.14lamprey/12.1.13lamprey/12.1.12lamprey/12.1.11lamprey/12.1.10lamprey/12.1.1lamprey/12.1.0lamprey/12.0.112.1.912.1.812.1.712.1.612.1.512.1.412.1.312.1.2012.1.212.1.1912.1.1812.1.1712.1.1612.1.1512.1.1412.1.1312.1.1212.1.1112.1.1012.1.112.1.012.0.1lampreyMarius Vlad1-1/+1
Bug-AGL: SPEC-4037 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I6a9b7fd74d81cb117afcb12639862288769b7fde (cherry picked from commit 36574a78bc7baaf3dd254ed91641fd993fc90c14)
2021-03-10src/homescreen, hs-client, hs-proxy: Fix trivial unused warningslamprey_11.91.0lamprey/11.91.011.91.0Marius Vlad1-0/+1
As we're now using Werror, need clean-up some trivial bits. Bug-AGL: SPEC-3843 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I17c7e61c0fd3b420a4c76fa40fe6486d2bad0c5e
2021-03-10hs-clientmanager: Pass arguments to printf() wrappersMarius Vlad1-1/+1
Avoid crashing on various platforms, by not setting any argument at all. Bug-AGL: SPEC-3843 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ifb082b95fd6ebc71e863b843c9fd895f5f7efdde
2021-03-03hs-proxy,hs-clientmanager: Handle correctly the shutdown of appsMarius Vlad1-0/+18
The fake subscribe mechanism failed to account for the client context, which is bound to the afb_req_t of the client itself, and only dealing with the client list. This effectively means we can't really register (a/an automated) callback function to remove the appid from the client list once the application has been legally terminated/stopped. This adds a check to verify, for the showWindow verb, if the application is still found to be running, and return the appropriate value in case that is not case. This should determine to start the application and fix the issue. Bug-AGL: SPEC-3796 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia828e1ec374bf3bed21c52814721074c01f16691
2021-03-03hs-proxy: Avoid creating a client contextMarius Vlad1-8/+1
The subscribe mechanism requires that the client itself performs the subscribe (it assumes a unique, distinct afb_req_t type in order to create the client context) and attempting to handle one, automatically would not really work, so only use it (the fake sub mechanism) the keep track of application w/ the help of the client_list. Bug-AGL: SPEC-3796 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I783614e1db83280878b77b786e4f80fccd1a74a1
2021-02-01Fix potential memory leakLi Xiaoming1-2/+1
json structure allocating code should be placed in where it is used, if there is a condition check which may cause a return before the before-mentioned place in the function. Bug-AGL: SPEC-3584 Change-Id: I5f88c7ce0b9257b2782144548f11a0e1d7ab388a Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
2020-08-19hs-proxy: Keep track of clientCtx and client when starting applicationjellyfish_9.99.4jellyfish/9.99.49.99.4Marius Vlad1-3/+59
The subscribe verb was used in the past to keep track of applications, which was done in background with the help of event handlers. As that no longer happens we keep track of the client and its clientCtx when starting directly from the homescreen binding, faking the subscribe logic. As the afb_req_t object is no longer in scope when the async callback handler returns, we do it before doing the call to af-main, and assume that we'll succeed. We use the async callback handler to verify if the application was indeed started but any application crashing afterwards will require an additional check performed, as it will found in the hash table of clients. Bug-AGL: SPEC-3524 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I0e417dc5f2953947cd27ca551c0d2a2af5c57e6d
2020-08-19hs-proxy: Hand over the hs_instance to AfmMainProxyMarius Vlad1-2/+3
Bug-AGL: SPEC-3524 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I80a7bac4244e62f49ab4bf068476ad4e888085f1
2019-03-28Change log macro to AFB_XXXwang_zhiqiang1-4/+3
1. using binder log macro instead of HMI_LOG. 2. unify log using level as below: AFB_ERROR: fatal error or serious error may occur. AFB_WARNING: input parameter error or not serious error. AFB_NOTICE: alert sth. AFB_INFO: print input argument or sth else. AFB_DEBUG: prompt for calling location. 3. delete hmi-debug.h. Change-Id: I203864ced39c418d2f792faa50ab2c009deb9d02 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
2019-03-25Start app and get runnables list by homescreenwang_zhiqiang1-0/+135
1.start application in showWindow. 2.add "getRunnables" verb. 3.handle "application-list-changed" event from afm-main and add "application-list-changed" event. Bug-AGL: SPEC-2188 Change-Id: I619b97424d20af373a945ff502a8133339916923 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>