Fix lcd_on_direct() not to update old state 51/235251/5
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 3 Jun 2020 04:59:58 +0000 (13:59 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 4 Jun 2020 06:56:25 +0000 (06:56 +0000)
commite0a73baccd9b9f5503018d99f65d2a4bada43a87
tree656f857251c9e50a20c47eea5570730115d26dd2
parent10e5620ea9ffc2643dbc7dbe301653b58fc0c767
Fix lcd_on_direct() not to update old state

As updating old state within lcd_on_direct() causes several problems,
this patch reverts the parts related to state update of lcd_on_direct()
from the following patches.
 - 613ecd25da136c6cf210e00a15a21783f7ecdf5b
 - 32a6e47d137a00c2a8b037b23ef4387f2ebecb23
 - 6e04a05360c0a77a1e4d0275d967acb89719d3e1

In general, lcd_on_direct() is followed by
default_proc_change_state_action(), and the subroutine is like below.
 - lcd_on_direct() : update old state
   -> ... (do something)
   -> default_proc_change_state_action() : update old state once more
   -> default_action()
So for the default_action(), if it is called through lcd_on_direct(),
pm_old_state and pm_cur_state is always same because old state is
updated twice. This makes below code in default_action() unreachable.

 device_notify(DEVICE_NOTIFIER_LCD, (void *)&pm_cur_state);

As a result, lcd_on_direct() should not update the pm_old_state.

Change-Id: Iefe46720100c9adc858f86ba54b06361946e3b88
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/iot/display/core.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/wearable/display/core.c
plugins/wearable/display/key-filter.c