fota: Modify condition of upgrade state transition 21/314721/4
authorSangYoun Kwak <sy.kwak@samsung.com>
Wed, 17 Jul 2024 09:57:48 +0000 (18:57 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 22 Jul 2024 03:47:30 +0000 (12:47 +0900)
commit0b9e828225bca1f57899f786ea294d99fbc45d99
tree51e37ae7a593a9fd601aa41ccf40654b9083de29
parent347b2dac978839a1bb38d13649fee8a02d0628b5
fota: Modify condition of upgrade state transition

upgrade-manager service checks if upgrade is completed at the
initialization time and if upgrade is completed, then transition the
upgrade state from "ready" to "completed".

The transition condition is:
 * upgrade status progress is 100
 * boot mode is "normal"

But if upgrade is performed as 'online' mode, the boot mode(which is
parsed from the /proc/cmdline) is "fota".

To make upgrade state be transitioned to "completed", condition is
modified:
 * upgrade status progress is 100
 * (boot mode is "normal")
    or
   (boot mode is "fota" and upgrade type is "online")

Change-Id: I6d284f135df863c991bc8c08f75d6fa6e2b07ab5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
update-manager/fota/fota-installer.c