Register package manager event handler before loading wakeup engines 99/282299/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 29 Sep 2022 11:33:06 +0000 (20:33 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 29 Sep 2022 11:41:25 +0000 (20:41 +0900)
commit7d3cff07f22746654f0f7e080190ae89150ced33
tree65a38a77a9aada75f15f3785c016fddf1e8cf4f7
parent1ca407474f6f4dfe7f6a3663ce520d5bfd77584c
Register package manager event handler before loading wakeup engines

If the wakeup engine app gets installed while
multi-assistant-service is being launched and also
is trying to load wakeup engines, the newly installed
wakeup engine will not be loaded since at the time of
launching the installation was not completed,
and the installation completion event would not be
received also, since the package manager event handler
might not be registered yet.
So if we register package manager event handler first
and then load wakeup engines, even if the wakeup engine
currently being installed fails to be loaded, the
installation completion event is guaranteed to be received
by the package manager event handler, making sure that
the multi-assistant-service would restart for re-loading.

Change-Id: I1e8f57d6a08c9290a0ae11422d1404188c97c3df
src/package_update_monitor.cpp
src/service_main.cpp