diff options
author | Irfan Abdul <irfan.abdul@samsung.com> | 2016-07-11 13:43:58 +0530 |
---|---|---|
committer | irfan abdul <irfan.abdul@samsung.com> | 2016-07-11 01:16:21 -0700 |
commit | 008f20af7d98406b413a7ec1d9f8651d3a6520d8 (patch) | |
tree | 5436455877431ba7d3ef1a074ff601dcee1230a4 | |
parent | 6419565a3289df2d439c57e4edc41d5ac474d0c9 (diff) | |
download | idle-clock-digital-008f20af7d98406b413a7ec1d9f8651d3a6520d8.tar.gz idle-clock-digital-008f20af7d98406b413a7ec1d9f8651d3a6520d8.tar.bz2 idle-clock-digital-008f20af7d98406b413a7ec1d9f8651d3a6520d8.zip |
Fix:TSAM-6179- crash when idle clock is chagned.
TSAM-6256: black screen display.
[Cause 6179] In this callback, typedef void(* device_changed_cb)(device_callback_e type, void *value, void *user_data) void* value is not a pointer, its a int as per system FW team (knhoon.baik). Since its casting as pointer, accessing the value by dereferencing pointer is causing crash.
[Cause 6256] Fixed is missing for the parts.
Change-Id: Id2d0c1d99890d0f61ac61bfbc78cd36937268cc0
-rwxr-xr-x | data/idle-clock-digital.edc | 2 | ||||
-rwxr-xr-x | src/clock_view.c | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/data/idle-clock-digital.edc b/data/idle-clock-digital.edc index 806cfe7..6a640f9 100755 --- a/data/idle-clock-digital.edc +++ b/data/idle-clock-digital.edc @@ -79,6 +79,7 @@ collections { rel1 { relative: 0.0 0.5; to: "bg"; offset: 0 -30; } rel2 { relative: 1.0 0.5; to: "bg"; offset: 0 -30; } visible: 1; + fixed: 1 1; color: 255 255 255 255; align: 0.5 0.5; text{ @@ -128,6 +129,7 @@ collections { align: 0.5 0.5; } visible: 0; + fixed: 1 1; } description{ state: "text_date_1" 0.0; diff --git a/src/clock_view.c b/src/clock_view.c index ebb6ece..b1864f5 100755 --- a/src/clock_view.c +++ b/src/clock_view.c @@ -1058,26 +1058,23 @@ static void _device_state_changed_cb(device_callback_e type, void *value, void * { _D(""); appdata *ad = data; + struct tm *ts = NULL; + time_t tt; + struct tm tempts; + if (!ad) { _E("ad is null. check!!"); return; } - struct tm *ts = NULL; - time_t tt; - struct tm tempts; if (type != DEVICE_CALLBACK_DISPLAY_STATE) { _E("Wrong callback was called. check!!!"); return; } - display_state_e *val = (display_state_e *)value; - if (!val) { - _E("Changed value is null. Check!!!"); - return; - } - _D("DISPLAY STATE [%d] ", *val); + display_state_e val = (display_state_e)value; + _D("DISPLAY STATE [%d] ", val); - if (*val == DISPLAY_STATE_NORMAL) { + if (val == DISPLAY_STATE_NORMAL) { if (!ad->is_show) { clock_view_set_info_time(ad); clock_view_show_clock(ad); @@ -1092,7 +1089,7 @@ static void _device_state_changed_cb(device_callback_e type, void *value, void * ad->timer = NULL; } ad->timer = ecore_timer_add(60 - ts->tm_sec, clock_view_set_info_time, ad); - } else if (*val == DISPLAY_STATE_SCREEN_OFF) { + } else if (val == DISPLAY_STATE_SCREEN_OFF) { //_clear_time(data); //Disable this code for transit to alpm clock } else _D("Not interested PM STATE"); |