fix bugs of ode app 14/118414/1 accepted/tizen/common/20170310.122351 accepted/tizen/ivi/20170310.103243 accepted/tizen/mobile/20170310.103155 accepted/tizen/tv/20170310.103208 accepted/tizen/unified/20170310.104900 accepted/tizen/wearable/20170310.103223 submit/tizen/20170310.085026 submit/tizen_unified/20170310.103913
authoryeji01kim <yeji01.kim@samsung.com>
Fri, 10 Mar 2017 08:38:10 +0000 (17:38 +0900)
committeryeji01kim <yeji01.kim@samsung.com>
Fri, 10 Mar 2017 08:38:10 +0000 (17:38 +0900)
modified to update the next button properly

Change-Id: Ida531b6661f5f3a0129181940c8bead8ce0456e9
Signed-off-by: yeji01kim <yeji01.kim@samsung.com>
tools/apps/ode/src/internal-decrypt/main.c
tools/apps/ode/src/internal-encrypt/check.c
tools/apps/ode/src/ode-app-common.c

index fab9ddb..750c150 100755 (executable)
@@ -44,17 +44,19 @@ static void update_internal_decrypt_next_button_status(appdata_s *ad)
 static void dec_battery_charger_changed_cb(runtime_info_key_e key, void *data)
 {
        appdata_s *ad = (appdata_s *) data;
-       if (key == RUNTIME_INFO_KEY_CHARGER_CONNECTED)
+       if (key == RUNTIME_INFO_KEY_CHARGER_CONNECTED) {
                battery_icon_status_update(ad);
                update_internal_decrypt_next_button_status(ad);
+       }
 }
 
 static void dec_battery_changed_cb(device_callback_e type, void *value, void *user_data)
 {
        appdata_s *ad = (appdata_s *) user_data;
-       if (type == DEVICE_CALLBACK_BATTERY_CAPACITY)
+       if (type == DEVICE_CALLBACK_BATTERY_CAPACITY) {
                battery_icon_status_update(ad);
                update_internal_decrypt_next_button_status(ad);
+       }
 }
 
 void ode_check_decrypt_device_create_view(appdata_s *ad)
@@ -119,7 +121,7 @@ void ode_check_decrypt_device_create_view(appdata_s *ad)
                dlog_print(DLOG_ERROR, LOG_TAG, "battery_cb_register failed");
                ui_app_exit();
        }
-
+       update_internal_decrypt_next_button_status(ad);
        snprintf(string, sizeof(string), __(status_text[0]), NEEDED_BATTERY_PERCENT);
        check_msg = ode_create_textblock(encryption_check_layout, string, MSG_TEXT_STYLE);
        elm_object_part_content_set(encryption_check_layout, "battery_text", check_msg);
index 0315f9f..ce15271 100755 (executable)
@@ -203,6 +203,7 @@ void ode_check_encrypt_device_create_view(appdata_s *ad)
        elm_object_part_content_set(encryption_check_layout, "charge_text", check_msg);
 
        elm_object_part_content_set(base_layout, "content_layout", encryption_check_layout);
+       update_internal_encrypt_next_button_status(ad);
 
        /* set bottom button */
        item = elm_naviframe_item_push(navi_bar, __("IDS_ST_HEADER_ENCRYPT_DEVICE"), NULL, NULL, base_layout, NULL);
index 8e8f9a3..88d617b 100755 (executable)
@@ -83,11 +83,13 @@ void set_next_btn(Evas_Object *layout, const char* edj_path, const char *btn_tex
 {
        Evas_Object *btn_layout;
        Evas_Object *next_btn;
+       appdata_s *ad = (appdata_s *)data;
        dlog_print(DLOG_DEBUG, LOG_TAG, "set_next_btn start");
        btn_layout = ode_create_layout(layout, edj_path, "next_button_layout");
 
        next_btn = ode_create_button(btn_layout, btn_text, "bottom");
        elm_object_part_content_set(btn_layout, "next_button", next_btn);
+       ad->device_info.next_button = next_btn;
 
        evas_object_smart_callback_add(next_btn, "clicked", callback, data);
        elm_object_part_content_set(layout, "bottom_layout", btn_layout);