Modify animation in Iot profile for resolution 1280x720
[apps/native/boot-animation.git] / src / animation.c
index a222386..17ce775 100755 (executable)
@@ -99,9 +99,9 @@ static Eina_Bool __end_cb(void *data)
                __block_display();
        } else {
                __D("EXIT on BOOTING");
-               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");
-               }
+
                boot_exit();
        }
        return ECORE_CALLBACK_CANCEL;
@@ -111,9 +111,9 @@ static void __animation_finished_cb(void *d, Evas_Object * obj, const char *e, c
 {
        if (s_animation.animation_type == TYPE_OFF) {
                __D("TYPE OFF");
-               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");
-               }
+
                ecore_timer_add(1, __end_cb, (void *)TYPE_OFF);
        } else {
                __D("TYPE_ON");
@@ -160,26 +160,26 @@ static char * __get_layout_file_name(int animation_type, int w, int h)
        char file_name[1024];
        int ret = 0;
 
-       if (animation_type == TYPE_OFF) {
+       if (animation_type == TYPE_OFF)
                snprintf(file_name, sizeof(file_name), FILE_PATH"%dx%d_PowerOff.edj", w, h);
-       } else {
+       else
                snprintf(file_name, sizeof(file_name), FILE_PATH"%dx%d_PowerOn.edj", w, h);
-       }
+
        __D("File name for Animation is: %s", file_name);
 
        ret = access(file_name, 0);
-       if (ret == 0) {
-       } else {
+       if (ret != 0) {
                __E("There's no Image same with [%s], So set Default[720x1280] image", file_name);
-               if (animation_type == TYPE_OFF) {
+               __D("There's no Image same with [%s], So set Default[720x1280] image", file_name);
+               if (animation_type == TYPE_OFF)
                        snprintf(file_name, sizeof(file_name), "%s", DEFAULT_OFF);
-               } else {
+               else
                        snprintf(file_name, sizeof(file_name), "%s", DEFAULT_ON);
-               }
 
                ret = access(file_name, 0);
                if (ret) {
                        __E("There's no Image file[%s] on target", file_name);
+                       __D("There's no Image file[%s] on target", file_name);
                        return NULL;
                }
        }
@@ -192,11 +192,10 @@ static Eina_Bool __is_layout_file_exist(const char *file_name)
        int ret = 0;
 
        ret = access(file_name, 0);
-       if (ret == 0) {
+       if (ret == 0)
                return EINA_TRUE;
-       } else {
+       else
                return EINA_FALSE;
-       }
 }
 
 int animation_init(int animation_type)