From 0e794d1fe865d1a46123c049b28b4a1370f2ea12 Mon Sep 17 00:00:00 2001 From: junkyu han Date: Tue, 6 Dec 2016 16:57:32 +0900 Subject: [PATCH] Block display on poweroff Change-Id: Ic63fa968e4bfb187d6374ef155555ef2be317b1e --- CMakeLists.txt | 1 + packaging/boot-animation.spec | 1 + src/animation.c | 42 +++++++++++++++++++++++------------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e018377..3ec6636 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ pkg_check_modules(pkgs REQUIRED capi-appfw-preference capi-system-info capi-system-system-settings + capi-ui-efl-util ) FOREACH(flag ${pkgs_CFLAGS}) diff --git a/packaging/boot-animation.spec b/packaging/boot-animation.spec index 5f5c0d9..5d8ec05 100644 --- a/packaging/boot-animation.spec +++ b/packaging/boot-animation.spec @@ -28,6 +28,7 @@ BuildRequires: pkgconfig(mm-bootsound) BuildRequires: pkgconfig(capi-appfw-preference) BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(capi-system-system-settings) +BuildRequires: pkgconfig(capi-ui-efl-util) Requires(post): /usr/bin/vconftool diff --git a/src/animation.c b/src/animation.c index 5a57db7..da21d5e 100644 --- a/src/animation.c +++ b/src/animation.c @@ -28,12 +28,11 @@ #include #include - #include +#include -#include -#include - +#include "boot.h" +#include "animation.h" #include "log.h" #define OVER_COUNT 19 @@ -59,11 +58,25 @@ static void win_del(void *data, Evas_Object * obj, void *event_info) static Eina_Bool _end_cb(void *data) { + int type = (int) data; _D("_end_cb is invoked"); - printf("_end_cb is invoked\n"); - if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) + + if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) { _E("Failed to set finished set"); - elm_exit(); + } + if (type == TYPE_ON) { + _D("EXIT on BOOTING"); + elm_exit(); + } else { + /* Delete Previous Layout */ + if (s_animation.layout) evas_object_del(s_animation.layout); + + Evas_Object *disp_block = NULL; + disp_block = evas_object_rectangle_add(evas_object_evas_get(s_animation.win)); + elm_win_resize_object_add(s_animation.win, disp_block); + evas_object_color_set(disp_block, 0, 0, 0, 255); + evas_object_show(disp_block); + } return ECORE_CALLBACK_CANCEL; } @@ -98,10 +111,10 @@ static void _edje_cb(void *d, Evas_Object * obj, const char *e, const char *s) (s_animation.h - h) >> 1); evas_object_show(s_animation.txt); } - ecore_timer_add(1, _end_cb, NULL); + ecore_timer_add(1, _end_cb, (void *)TYPE_OFF); } else { _D("TYPE_ON"); - _end_cb(NULL); + _end_cb((void *)TYPE_ON); } } @@ -195,8 +208,8 @@ static int create_window(void) } if (s_animation.state == TYPE_OFF || s_animation.state == TYPE_OFF_WITH_MSG) { _D("We are turning off the Tizen"); - elm_win_alpha_set(s_animation.win, EINA_TRUE); } + efl_util_set_notification_window_level(s_animation.win, EFL_UTIL_NOTIFICATION_LEVEL_HIGH); evas_object_smart_callback_add(s_animation.win, "delete-request", win_del, NULL); s_animation.evas = evas_object_evas_get(s_animation.win); @@ -210,15 +223,6 @@ static int create_window(void) elm_win_borderless_set(s_animation.win, 1); elm_win_indicator_mode_set(s_animation.win, ELM_WIN_INDICATOR_HIDE); evas_object_move(s_animation.win, 0, 0); - -/* if (s_animation.w > s_animation.h) { - int t; - elm_win_rotation_with_resize_set(s_animation.win, 90); - t = s_animation.w; - s_animation.w = s_animation.h; - s_animation.h = t; - }*/ - evas_object_show(s_animation.win); s_animation.ee = ecore_evas_ecore_evas_get(s_animation.evas); -- 2.7.4