From: Amritanshu Date: Tue, 22 Sep 2020 06:53:45 +0000 (+0530) Subject: [TIZENIOT-2002]Removed icon X-Git-Tag: submit/tizen/20200922.075937^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b3955a5160abd57522f8aa2ef88198cce525fa1;p=profile%2Fcommon%2Fapps%2Fnative%2Frecovery-app-ui.git [TIZENIOT-2002]Removed icon [TIZENIOT-2007]Show popup before reboot [TIZENIOT-2008]Change Button text Change-Id: Ia204ed2d06c490d4364209e187de5fe8bd479047 Signed-off-by: Amritanshu --- diff --git a/src/interaction.c b/src/interaction.c index ee8dc9d..a61a428 100755 --- a/src/interaction.c +++ b/src/interaction.c @@ -121,9 +121,23 @@ _send_notification_local_recovery_cb(void *data, Evas_Object *obj, void *event_i static void _local_recovery_device_reboot_cb(void *data, Evas_Object *obj, void *event_info) { - LOGI("Inside _download_image_cb"); + LOGI("Inside _local_recovery_device_reboot_cb"); Evas_Object *nf = data; + char title[PATH_MAX]; + snprintf(title, sizeof(title), "Recovering. Don't turn off your device"); + + Evas_Object *popup = elm_popup_add(nf); + elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_text_set(popup, "title,text", title); + + eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _popup_hide_cb, NULL); + evas_object_smart_callback_add(popup, "dismissed", _popup_hide_finished_cb, NULL); + evas_object_smart_callback_add(popup, "block,clicked", _popup_block_clicked_cb, NULL); + + evas_object_show(popup); + /* Reboot device to start recovery */ int ret = device_power_reboot("recovery"); LOGI("device_power_reboot API return : %d", ret); @@ -131,8 +145,6 @@ _local_recovery_device_reboot_cb(void *data, Evas_Object *obj, void *event_info) if (ret == -1 || WEXITSTATUS(ret) != 0) { recovery_failed_show_popup(nf, ret); } - - elm_popup_dismiss(nf); } void recovery_show_popup(Evas_Object *nf, char *title, char *image_path) @@ -159,10 +171,10 @@ void recovery_show_popup(Evas_Object *nf, char *title, char *image_path) elm_object_part_content_set(popup, "button1", btn1); evas_object_smart_callback_add(btn1, "clicked", _send_notification_local_recovery_cb, popup); - /* Download button */ + /* Recover button */ Evas_Object *btn2 = elm_button_add(popup); //elm_object_style_set(btn2, "popup"); - elm_object_text_set(btn2, "Download"); + elm_object_text_set(btn2, "Recover"); elm_object_part_content_set(popup, "button2", btn2); evas_object_smart_callback_add(btn2, "clicked", _local_recovery_device_reboot_cb, nf); diff --git a/tizen-manifest.xml b/tizen-manifest.xml index 6ba3374..1ba45ed 100755 --- a/tizen-manifest.xml +++ b/tizen-manifest.xml @@ -3,7 +3,6 @@ - local-recovery-ui.png