Fix not to send duplcated reply 02/206102/5 accepted/tizen/unified/20190606.220040 submit/tizen/20190605.092841
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 14 May 2019 08:40:35 +0000 (17:40 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Tue, 14 May 2019 11:41:05 +0000 (20:41 +0900)
commite3c535a4fd34073f446052ab035a9481c7a593ce
tree8353905ffb2042a7eb155dfebeed798c81874bc3
parent8ed070f96329ac0b3d40bcdfabb17cb34a1e2f95
Fix not to send duplcated reply

When ok, cancel or back button is pressed,
power_lock_expired_terminate runs first.
It causes duplicated reply.
Current problem is as below.
1. User press cancel button
   ex) send_result(CLOSE_APP) is executed by power_lock_expired_terminate
       send_result(ALLOW_APP) is executed by power_lock_expired_allow_app
2. User choose ok button
   ex) send_result(CLOSE_APP) is executed by power_lock_expired_terminate
       send_result(CLOSE_APP) is executed by power_lock_expired_close_app

So, add button_id to fix duplicated reply.
1. User press cancel button
   ex) send_result(CLOSE_APP) is not executed because button_id is ALLOW_APP
       send_result(ALLOW_APP) is executed by power_lock_expired_allow_app
2. User choose ok button
   ex) send_result(CLOSE_APP) is not executed because button_id is CLOSE_APP
       send_result(CLOSE_APP) is executed by power_lock_expired_close_app

Finally, remove result_sended.
Because result_sended does not work properly.

Change-Id: I43cc267ccc1825cb6f8726645492fc8c6a3c1044
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/power/power.c