Apply the latest codes for fota gui 76/150276/11
authorSunmin Lee <sunm.lee@samsung.com>
Fri, 8 Sep 2017 01:57:56 +0000 (10:57 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Tue, 10 Oct 2017 04:24:51 +0000 (13:24 +0900)
Current fota_gui codes are based on old tdm library.
This patch applies the lastest changes for fota gui.

Change-Id: I6b4334799fba12e306b89535a14014d08b0e7cfe
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
131 files changed:
fota_gui/CMakeLists.txt
fota_gui/fota_common.h [deleted file]
fota_gui/fota_fbinfo.h
fota_gui/fota_gr.h
fota_gui/fota_gr_direct.h
fota_gui/fota_gr_direct_tw1.c [moved from fota_gui/fota_gr_direct_wc1.c with 71% similarity]
fota_gui/fota_gui_common.h
fota_gui/fota_gui_log.h
fota_gui/fota_gui_main.c
fota_gui/fota_gui_test.c
fota_gui/fota_gui_util.c
fota_gui/fota_png.c
fota_gui/tdm-if.c
fota_gui/tdm-if.h
packaging/tota-ua.spec
res/tw1/images/tw1_fota_downloading_0.png [moved from res/tw1/images/wc_fota_downloading_0.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_1.png [moved from res/tw1/images/wc_fota_downloading_1.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_2.png [moved from res/tw1/images/wc_fota_downloading_2.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_3.png [moved from res/tw1/images/wc_fota_downloading_3.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_4.png [moved from res/tw1/images/wc_fota_downloading_4.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_5.png [moved from res/tw1/images/wc_fota_downloading_5.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_6.png [moved from res/tw1/images/wc_fota_downloading_6.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_7.png [moved from res/tw1/images/wc_fota_downloading_7.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_8.png [moved from res/tw1/images/wc_fota_downloading_8.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_9.png [moved from res/tw1/images/wc_fota_downloading_9.png with 100% similarity]
res/tw1/images/tw1_fota_downloading_percent.png [moved from res/tw1/images/wc_fota_downloading_percent.png with 100% similarity]
res/tw1/images/tw1_fota_progress_000.png
res/tw1/images/tw1_fota_progress_001.png
res/tw1/images/tw1_fota_progress_002.png
res/tw1/images/tw1_fota_progress_003.png
res/tw1/images/tw1_fota_progress_004.png
res/tw1/images/tw1_fota_progress_005.png
res/tw1/images/tw1_fota_progress_006.png
res/tw1/images/tw1_fota_progress_007.png
res/tw1/images/tw1_fota_progress_008.png
res/tw1/images/tw1_fota_progress_009.png
res/tw1/images/tw1_fota_progress_010.png
res/tw1/images/tw1_fota_progress_011.png
res/tw1/images/tw1_fota_progress_012.png
res/tw1/images/tw1_fota_progress_013.png
res/tw1/images/tw1_fota_progress_014.png
res/tw1/images/tw1_fota_progress_015.png
res/tw1/images/tw1_fota_progress_016.png
res/tw1/images/tw1_fota_progress_017.png
res/tw1/images/tw1_fota_progress_018.png
res/tw1/images/tw1_fota_progress_019.png
res/tw1/images/tw1_fota_progress_020.png
res/tw1/images/tw1_fota_progress_021.png
res/tw1/images/tw1_fota_progress_022.png
res/tw1/images/tw1_fota_progress_023.png
res/tw1/images/tw1_fota_progress_024.png
res/tw1/images/tw1_fota_progress_025.png
res/tw1/images/tw1_fota_progress_026.png
res/tw1/images/tw1_fota_progress_027.png
res/tw1/images/tw1_fota_progress_028.png
res/tw1/images/tw1_fota_progress_029.png
res/tw1/images/tw1_fota_progress_030.png
res/tw1/images/tw1_fota_progress_031.png
res/tw1/images/tw1_fota_progress_032.png
res/tw1/images/tw1_fota_progress_033.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_034.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_035.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_036.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_037.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_038.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_039.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_040.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_041.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_042.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_043.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_044.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_045.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_046.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_047.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_048.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_049.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_050.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_051.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_052.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_053.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_054.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_055.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_056.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_057.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_058.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_059.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_060.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_061.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_062.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_063.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_064.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_065.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_066.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_067.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_068.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_069.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_070.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_071.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_072.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_073.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_074.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_075.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_076.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_077.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_078.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_079.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_080.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_081.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_082.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_083.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_084.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_085.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_086.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_087.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_088.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_089.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_090.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_091.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_092.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_093.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_094.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_095.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_096.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_097.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_098.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_099.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_100.png [new file with mode: 0755]
res/tw1/images/tw1_fota_progress_bg.png
res/tw1/images/tw1_start_downloading.png [new file with mode: 0755]
res/tw1/images/wc_fota_start_downloading.png [deleted file]
scripts/tw1/41-tota-ua.list

index 51b1fe5..8f4e838 100755 (executable)
@@ -18,8 +18,6 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
 
-IF("${FOTA_PARTITION_TYPE}" STREQUAL "PART_TW1")
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(gui_pkgs REQUIRED
        libtbm
@@ -30,25 +28,9 @@ SET(GUI_SRCS
        fota_gui_main.c
        fota_gr.c
        fota_png.c
-       tdm-if.c
        fota_gui_util.c
-)
-ELSE()
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(gui_pkgs REQUIRED
-       libtbm
-       libtdm
-       libpng
-)
-SET(GUI_SRCS
-       fota_gui_main.c
-       fota_gr.c
-       fota_png.c
        tdm-if.c
-       fota_gui_util.c
 )
-ENDIF()
 
 FOREACH(flag ${gui_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
@@ -56,10 +38,7 @@ ENDFOREACH(flag)
 
 
 IF("${FOTA_PARTITION_TYPE}" STREQUAL "PART_TW1")
-       #ADD_DEFINITIONS("-DFEATURE_ROTATE")
-       SET(GUI_SRCS ${GUI_SRCS} fota_gr_direct_wc1.c)
-ELSE()
-       SET(GUI_SRCS ${GUI_SRCS} fota_gr_direct.c)
+       SET(GUI_SRCS ${GUI_SRCS} fota_gr_direct_tw1.c)
 ENDIF("${FOTA_PARTITION_TYPE}" STREQUAL "PART_TW1")
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
@@ -78,7 +57,7 @@ ADD_DEFINITIONS("-D${FOTA_PARTITION_TYPE}")
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed -pie")
 
 ADD_EXECUTABLE(${FOTA_GUI} ${GUI_SRCS})
-TARGET_LINK_LIBRARIES(${FOTA_GUI} ${gui_pkgs_LDFLAGS} ${LIBS})
+TARGET_LINK_LIBRARIES(${FOTA_GUI} ${gui_pkgs_LDFLAGS} ${LIBS} -lpthread)
 
 ADD_EXECUTABLE(${FOTA_GUI_TEST} fota_gui_test.c)
 
diff --git a/fota_gui/fota_common.h b/fota_gui/fota_common.h
deleted file mode 100755 (executable)
index b8de243..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * tota-ua
- *
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __FOTA_COMMON_H__
-#define __FOTA_COMMON_H__
-
-
-#include <stdio.h>
-#include "fota_log.h"
-
-typedef signed char s8;
-typedef unsigned char u8;
-
-typedef signed short s16;
-typedef unsigned short u16;
-
-typedef signed int s32;
-typedef unsigned int u32;
-typedef u32 size_t;
-
-typedef signed long sl32;
-typedef unsigned long ul32;
-
-typedef signed long long s64;
-typedef unsigned long long u64;
-
-#define UNUSED(x) (void)(x)
-
-#endif /* __FOTA_COMMON_H__ */
index 4b87fea..6b60e7f 100755 (executable)
 #define __FOTA_FBINFO_H__
 
 typedef struct _FbInfo {
-       unsigned char *buf;
-       unsigned sz;
+       unsigned char *buf[2];
+       unsigned int current_fb_id;
        int w;
        int h;
+       int sz;
+       int degree;
+       int full_flag;
 } FbInfo;
 
 #endif /* __FOTA_FBINFO_H__ */
index fff1337..85cfc0a 100755 (executable)
 #ifndef __FOTA_GR_H__
 #define __FOTA_GR_H__
 
-#include "fota_common.h"
-
 extern int fota_gr_init(void);
 extern void fota_gr_deinit(void);
 extern void fota_gr_update_progress(int percent);
-extern void fota_gr_clear_screen(u32 color);
-
+extern void fota_gr_clear_screen(unsigned int color);
 
+extern void fota_gr_direct_circular_progress(void);
 #endif /* __FOTA_GR_H__ */
 
index 9bfd890..e0e2cc0 100755 (executable)
@@ -19,7 +19,7 @@
 #ifndef __FOTA_GR_DIRECT_H__
 #define __FOTA_GR_DIRECT_H__
 
-#include "fota_common.h"
+#include "fota_gui_common.h"
 
 extern int fota_gr_direct_init(void);
 extern void fota_gr_direct_deinit(void);
similarity index 71%
rename from fota_gui/fota_gr_direct_wc1.c
rename to fota_gui/fota_gr_direct_tw1.c
index 9164bcb..b642719 100755 (executable)
@@ -19,6 +19,7 @@
 /*****************************************************************************
 ** header files
 *****************************************************************************/
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "fota_fbinfo.h"
 #include "tdm-if.h"
 
+#define UNUSED(x) (void)(x)
 
-
-#define COLOR_RED                      0xFF0000
-#define COLOR_GREEN                    0xFF00
-#define COLOR_BLUE                     0x00FF
-#define COLOR_WHITE                    0xFFFFFF
 #define COLOR_BLACK                    0x0000
-#define COLOR_GRAY                     0xAAAAAA
-#define COLOR_LIGHTGRAY                        0xDE39
 
 #define MAX_PATH 256
 #define MAX_FILE_PATH           512
 #endif
 #define IMG_BASE       RESDIR "/images/"
 
-#define POPUP_IMG_NAME         "wc_popup_line.png"
-#define MAIN_IMG_NAME          "wc_fota_start_downloading.png"
+#define MAIN_IMG_NAME          "tw1_start_downloading.png"
 #define MAIN_PG_IMG_NAME               "tw1_fota_progress_bg.png"
-#define PROGRESS_IMG_PREFIX    "wc_fota_progress_"
 #define PROGRESS_BAR_IMG_PREFIX        "tw1_fota_progress_"
-#define PROGRESS_NUM_PREFIX    "wc_fota_downloading_"
-#define PERCENT_IMG_NAME               "wc_fota_downloading_percent.png"
+#define PROGRESS_NUM_PREFIX    "tw1_fota_downloading_"
+#define PERCENT_IMG_NAME               "tw1_fota_downloading_percent.png"
 
 /*****************************************************************************
 ** global variables
 *****************************************************************************/
 FbInfo s_fbi;
+tdm_if_disp s_disp;
 
 int s_percent_to_draw = 0;
-#ifdef FEATURE_ROTATE
-int s_degree = 0;
-#endif
 int s_saved_percent = -1;
 
+/*-----------------------------------------------------------------------------
+  fb_open()
+ ----------------------------------------------------------------------------*/
+int fb_open(FbInfo *fbi)
+{
+       memset(&s_disp, 0x00, sizeof(struct _tdm_if_disp));
+
+       if (tdm_if_display_init(&s_disp)) {
+               LOGE("tdm_if_display_init fail!!\n");
+               return -1;
+       }
+
+       fbi->buf[FRONT_BUFFER] = s_disp.buffer[FRONT_BUFFER];
+       fbi->buf[BACK_BUFFER] = s_disp.buffer[BACK_BUFFER];
+       fbi->current_fb_id = s_disp.current_buf_id;
+       fbi->w = s_disp.width;
+       fbi->h = s_disp.height;
+       fbi->sz = s_disp.buffer_size;
+
+       return 0;
+}
+
+/*-----------------------------------------------------------------------------
+  fb_close()
+ ----------------------------------------------------------------------------*/
+void fb_close(FbInfo *fbi)
+{
+       UNUSED(fbi);
+       tdm_if_display_deinit(&s_disp);
+}
+
+/*------------------------------------------------------------------------------
+ fb_display()
+------------------------------------------------------------------------------*/
+int fb_display(FbInfo *fbi)
+{
+       s_disp.current_buf_id = fbi->current_fb_id;
+       LOG("current_fb_id : %d", fbi->current_fb_id);
+       tdm_if_display_update(&s_disp);
+
+       return 0;
+}
+
+/*-----------------------------------------------------------------------------
+  fb_draw_img_forced_update()
+ ----------------------------------------------------------------------------*/
+void fb_draw_img_forced_update(FbInfo *fbi)
+{
+       int ret = 0;
+       ret = fb_display(fbi);
+       LOG("current_fb_id : %d, ret : %d", fbi->current_fb_id, ret);
+}
+/*-----------------------------------------------------------------------------
+  fb_draw_img_check_lcd_on()
+ ----------------------------------------------------------------------------*/
+void fb_draw_img_check_lcd_on(FbInfo *fbi)
+{
+
+       int ret = 0;
+
+       fbi->current_fb_id = FRONT_BUFFER;
+
+       LOG("current_fb_id :%d", fbi->current_fb_id);
+
+       ret = fb_display(fbi);
+
+       LOG("%s - drawing... ret : %d", __func__, ret);
+}
+
+/*-----------------------------------------------------------------------------
+  fb_clear_screen()
+ ----------------------------------------------------------------------------*/
+void fb_clear_screen(FbInfo *fbi, unsigned int color)
+{
+       unsigned int *fb_buf_cur = NULL;
+       int loop_count = fbi->w * fbi->h;
+
+       fb_buf_cur = (unsigned int *)fbi->buf[FRONT_BUFFER];
+
+       if (fb_buf_cur == NULL) {
+               LOG("fb_buf_cur is null error...");
+               return;
+       }
+       while (loop_count--)
+               *(fb_buf_cur++) = color;
+
+}
 
 /*-----------------------------------------------------------------------------
   _gr_direct_fill_rect
@@ -83,7 +161,7 @@ static void _gr_direct_fill_rect(FbInfo *fbi, s32 x, s32 y, s32 w, s32 h, u32 co
        dy = h;
        wb = w * sizeof(u32);
 
-       fb_buf_int = (unsigned int *)fbi->buf;
+       fb_buf_int = (unsigned int *)fbi->buf[FRONT_BUFFER];
        fb_buf_int += y * fbi->w + x;
        fb_buf_cur = fb_buf_int;
 
@@ -118,7 +196,7 @@ static void _gr_direct_clear_screen(FbInfo *fbi, u32 color)
        dy = fbi->h;
        w = fbi->w * sizeof(u32);
 
-       fb_buf_int = (unsigned int *)fbi->buf;
+       fb_buf_int = (unsigned int *)fbi->buf[FRONT_BUFFER];
        fb_buf_cur = fb_buf_int;
 
        while (dx--)
@@ -243,57 +321,6 @@ static void _gr_direct_draw_main_img(FbInfo *fbi)
 
 }
 
-/*
-static void _gr_direct_draw_text_img(FbInfo *fbi)
-{
-       int img_x = 0;
-       int img_y = 0;
-
-       if (read_png_file("/system/opt/usr/data/fota/FotaBgImage.png") < 0) {
-               return;
-       }
-
-       img_x = 0;
-       img_y = 0;
-
-       draw_png_img_xy(fbi, img_x, img_y);
-       release_png_res();
-
-}
-*/
-
-static void _gr_direct_draw_last_buffer_text_img(FbInfo *fbi)
-{
-       int img_x = 0;
-       int img_y = 0;
-
-       if (read_png_file("/system/opt/usr/data/fota/FotaBgImage2.png") < 0)
-               return;
-
-       img_x = 0;
-       img_y = 0;
-
-       draw_png_img_xy(fbi, img_x, img_y);
-       release_png_res();
-
-}
-
-static void _gr_direct_draw_popup_img(FbInfo *fbi)
-{
-       int img_x = 0;
-       int img_y = 0;
-
-       if (read_png_file(IMG_BASE POPUP_IMG_NAME) < 0)
-               return;
-
-       img_x = 0;
-       img_y = 0;
-
-       draw_png_img_xy(fbi, img_x, img_y);
-       release_png_res();
-
-}
-
 /*-----------------------------------------------------------------------------
   __init_screen
  ----------------------------------------------------------------------------*/
@@ -325,39 +352,6 @@ static void _gr_direct_final_circle_progress_bar(FbInfo *fbi, int progress)
        release_png_res();
 }
 
-static void _gr_direct_circular_progress(FbInfo *fbi)
-{
-       char img_name[MAX_PATH];
-       static int prog_cnt = 0;
-       static int prev_prog_cnt = -1;
-
-       // delete previous progress image
-       if (prev_prog_cnt >= 0) {
-               snprintf(img_name, MAX_PATH, "%s%s%02d.png", IMG_BASE, PROGRESS_IMG_PREFIX, prev_prog_cnt+1);
-               if (read_png_file(img_name) < 0)
-                       return;
-
-               draw_png_mask_xy(fbi, 0, 0, 0, 0, 0);
-               release_png_res();
-       }
-
-       // draw current progress image
-       snprintf(img_name, MAX_PATH, "%s%s%02d.png", IMG_BASE, PROGRESS_IMG_PREFIX, prog_cnt+1);
-       if (read_png_file(img_name) < 0)
-               return;
-
-       draw_png_img_xy(fbi, 0, 0);
-       release_png_res();
-
-       _gr_direct_draw_popup_img(fbi);
-
-       prev_prog_cnt = prog_cnt;
-
-       prog_cnt++;
-       if (prog_cnt >= 30)
-               prog_cnt = 0;
-}
-
 static void _gr_direct_circle_progress_bar(FbInfo *fbi, int progress)
 {
        char img_name[MAX_PATH];
@@ -367,14 +361,12 @@ static void _gr_direct_circle_progress_bar(FbInfo *fbi, int progress)
        int prog_cnt = 0;
 
        if (progress <= 0)
-               progress = 0;
+               return;
 
        if (progress > 100)
                progress = 100;
 
-       prog_cnt = (int)(progress * 32 / 100);
-
-       LOG("prog_pre/prog_cnt : %d, %d \n", prog_pre , prog_cnt);
+       prog_cnt = progress;
 
        for (; prog_pre <= prog_cnt; prog_pre++) {
                LOG("prog_pre/prog_cnt : %d, %d \n", prog_pre , prog_cnt);
@@ -389,13 +381,13 @@ static void _gr_direct_circle_progress_bar(FbInfo *fbi, int progress)
                draw_png_img_xy(fbi, 0, 0);
                release_png_res();
 
+               s_saved_percent = prog_pre;
+
                count++;
 
                if (count > 3)
                        break;
        }
-
-       s_saved_percent = prog_pre;
 }
 
 /*-----------------------------------------------------------------------------
@@ -403,49 +395,16 @@ static void _gr_direct_circle_progress_bar(FbInfo *fbi, int progress)
  ----------------------------------------------------------------------------*/
 static void _gr_direct_update_screen()
 {
-       tdm_if_buffer_update(s_fbi.buf);
+       s_disp.current_buf_id = s_fbi.current_fb_id;
 
-#ifdef FEATURE_ROTATE
-       int battery_state = is_batt_status();
-
-       if ((s_degree != CHG_DEGREE_0) &&
-               (battery_state == BATT_STATE_CHARGING || battery_state == BATT_STATE_FULL)) {
-               fota_gr_direct_rotate_screen(s_degree);
-       } else
-#endif
-       {
-               tdm_if_display_update();
-       }
-}
-
-static void _gr_direct_set_last_buffer()
-{
-       _gr_direct_clear_screen(&s_fbi, COLOR_BLACK);
-       _gr_direct_draw_last_buffer_text_img(&s_fbi);
-       _gr_direct_draw_main_prog_img(&s_fbi, 0);
-       _gr_direct_draw_prog_text(&s_fbi, 0);
-       tdm_if_buffer_update(s_fbi.buf);
-}
-
-#ifdef FEATURE_ROTATE
-void fota_gr_direct_rotate_screen(int degree)
-{
-       tdm_if_rotate_screen(degree);
+       tdm_if_display_update(&s_disp);
 }
 
-void fota_gr_rotate_value(int rotate)
-{
-       s_degree = rotate;
-}
-#endif
-
 /*-----------------------------------------------------------------------------
   fota_gr_direct_update_progress
  ----------------------------------------------------------------------------*/
 void fota_gr_direct_circular_progress(void)
 {
-       _gr_direct_circular_progress(&s_fbi);
-
        if (s_saved_percent != s_percent_to_draw) {
 
                LOG("fota_gr_direct_circular_progress progress : %d \n", s_percent_to_draw);
@@ -484,32 +443,13 @@ void fota_gr_direct_clear_screen(u32 color)
  ----------------------------------------------------------------------------*/
 int fota_gr_direct_init(void)
 {
-       unsigned char *buf = NULL;
-
-       if (tdm_if_display_init() < 0)
-               return -1;
-
-#if !defined(FOTA_GUI_EMBEDDED)
-       tdm_if_lcd_off();
-#endif
-
-       s_fbi.w = tdm_if_display_width();
-       s_fbi.h = tdm_if_display_height();
-       s_fbi.sz = tdm_if_display_bufsize();
-
-       buf = malloc(s_fbi.sz);
-       if (NULL == buf) {
-               LOG("Not enough memory (s_fbi.sz = %d)\n", s_fbi.sz);
-               tdm_if_display_deinit();
-               return -1;
-       }
-       s_fbi.buf = buf;
+       /* open display interface */
+       if (fb_open(&s_fbi) < 0)
+               LOG("fb_open failed \n");
 
        __init_screen(&s_fbi);
 
-       _gr_direct_update_screen();
-
-       tdm_if_lcd_on();
+       tdm_if_lcd_on(&s_disp);
 
        return 0;
 }
@@ -519,12 +459,6 @@ int fota_gr_direct_init(void)
  ----------------------------------------------------------------------------*/
 void fota_gr_direct_deinit(void)
 {
-       _gr_direct_set_last_buffer();
-
-       if (s_fbi.buf) {
-               free(s_fbi.buf);
-               s_fbi.buf = NULL;
-       }
-       tdm_if_display_deinit();
+       fb_close(&s_fbi);
 }
 
index b5c8b81..bf3330a 100755 (executable)
@@ -39,29 +39,5 @@ typedef unsigned long ul32;
 typedef signed long long s64;
 typedef unsigned long long u64;
 
-#ifdef FEATURE_ROTATE
-enum {
-       CHG_DEGREE_0 = 0,
-       CHG_DEGREE_90 = 1,
-       CHG_DEGREE_180 = 2,
-       CHG_DEGREE_270 = 3,
-};
-
-enum {
-       BATT_STATE_CHARGING = 0,
-       BATT_STATE_FULL,
-       BATT_STATE_ERROR,
-       BATT_STATE_DISCONNECT,
-       BATT_STATE_LOWBATT,
-       BATT_STATE_OVERVOLTAGE,
-       BATT_STATE_OVERHEAT,
-       BATT_STATE_NOTCHARGE,
-       BATT_STATE_COLD
-};
-
-extern int is_batt_status(void);
-
-#endif
-
 
 #endif /* __FOTA_GUI_COMMON_H__ */
index 734b52e..5faa394 100755 (executable)
 
 #include <stdio.h>
 
-#define _DEBUG_LOG(fmt, args...)
-#define _DEBUG_INFO(fmt, args...)
-#define _DEBUG_WARNING(fmt, args...)
-#define _DEBUG_EXCEPTION(fmt, args...)
-#define _FUNC_ENTER
-#define _FUNC_EXIT
-
-/*
- * DEBUGGING FEATURE
- */
-
 extern unsigned int __log_level__;
 extern FILE *__log_out_file__;
 
index fea7fea..45cfce4 100755 (executable)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <error.h>
-
-#include "fota_common.h"
+#include <errno.h>
+#include <signal.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include "fota_gui_common.h"
+#include "fota_gui_util.h"
 #include "fota_gr.h"
 
-
 #define SERV_PATH "/tmp/FotaGuiSocket"
 
 
@@ -60,6 +64,9 @@ typedef struct {
 #define        MISSING_PARAM   -2
 
 int do_exit = 0;
+
+int s_pid = -1;
+
 int run_command(sock_cmd * recvbuff, sock_ack * sendbuff, int connfd)
 {
        char cmd[100];
@@ -109,7 +116,8 @@ int run_command(sock_cmd * recvbuff, sock_ack * sendbuff, int connfd)
                        strncpy(sendbuff->ack_desc, "Command recieved",
                                        sizeof(sendbuff->ack_desc) - 1);
                        ret = send(connfd, sendbuff, sizeof(sock_ack), 0);
-                       do_exit = 1;
+                       LOG("send() returned %d\n", ret);
+                       return -1;
                }
        } else {
                LOG("Command Not Found \n");
@@ -119,9 +127,25 @@ int run_command(sock_cmd * recvbuff, sock_ack * sendbuff, int connfd)
                ret = send(connfd, sendbuff, sizeof(sock_ack), 0);
        }
 
+       LOG("run_command() ret = %d\n", ret);
        return ret;
 }
 
+static void *__thread_draw_progress_img(void *arg)
+{
+       int delay = 20000;
+
+       if (setpriority(PRIO_PROCESS, getpid(), -11) < 0)
+               LOG("failed to setpriority\n");
+
+       while (do_exit != 1) {
+               usleep(delay);
+               fota_gr_direct_circular_progress();
+       }
+
+       return NULL;
+}
+
 int main(int argc, char **argv)
 {
        int connfd = 0, sockfd = 0;
@@ -131,41 +155,57 @@ int main(int argc, char **argv)
        sock_cmd *recvbuff = NULL;
        sock_ack *sendbuff = NULL;
 
+//     _init_stdio();
+
        if (fota_gr_init() < 0) {
                LOG("fota_gr_init() failed.\n");
+               _exit_stdio();
                return -1;
        }
 
        fota_gr_update_progress(s_prog_percent);
        s_last_prog_percent = s_prog_percent;
+       int error = 0;
+       pthread_t th_id = 0;
+
+       error = pthread_create(&th_id, NULL, __thread_draw_progress_img, NULL);
+       if (error != 0) {
+               LOG("Thread creation failed errno [%d]\n", errno);
+               _exit_stdio();
+               return -1;
+       }
 
        recvbuff = malloc(sizeof(sock_cmd));
        if (recvbuff == NULL) {
                LOG("memory allocation failed:\n");
+               _exit_stdio();
                return -1;
        }
 
        sendbuff = malloc(sizeof(sock_ack));
        if (sendbuff == NULL) {
                LOG("memory allocation failed:\n");
+               _exit_stdio();
                return -1;
        }
 
        sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (sockfd <= 0) {
                LOG("invalide sockfd\n");
+               _exit_stdio();
                return -1;
        }
 
        memset((char *)&saddr, 0, sizeof(saddr));
        saddr.sun_family = AF_UNIX;
-       strncpy(saddr.sun_path, SERV_PATH, sizeof(SERV_PATH) + 1);
-       saddr.sun_path[sizeof(SERV_PATH)] = '\0';
+       strncpy(saddr.sun_path, SERV_PATH,
+               sizeof(saddr.sun_path) - 1);
        slen = sizeof(saddr);
 
        unlink(SERV_PATH);
        if (bind(sockfd, (const struct sockaddr *)&saddr, slen) < 0) {
                LOG("bind fail\n");
+               _exit_stdio();
                return -1;
        }
 
@@ -174,6 +214,7 @@ int main(int argc, char **argv)
 
        if (listen(sockfd, 5) < 0) {
                LOG("listen fail\n");
+               _exit_stdio();
                return -1;
        }
 
@@ -181,7 +222,8 @@ int main(int argc, char **argv)
                clen = sizeof(caddr);
                connfd = accept(sockfd, (struct sockaddr *)&caddr, &clen);
                if (connfd < 0) {
-                       LOG("accept! \n");
+                       LOG("accept fail \n");
+                       _exit_stdio();
                        return -1;
                }
 
@@ -195,13 +237,16 @@ int main(int argc, char **argv)
                                if (cnt < 0)
                                        perror("recv!");
                                done = 1;
+                               LOG("recv() <= 0\n");
                        }
 
                        if (!done) {
-                               if (run_command(recvbuff, sendbuff, connfd) < 0)
+                               if (run_command(recvbuff, sendbuff, connfd) < 0) {
                                        done = 1;
+                                       do_exit = 1;
+                                       LOG("run_command() < 0\n");
+                               }
                        }
-
                } while (!done);
 
                close(connfd);
@@ -212,7 +257,17 @@ int main(int argc, char **argv)
 
        close(sockfd);
 
+       LOG("waiting for termination of thread((th_id) = %lu)\n", (th_id));
+       if (pthread_join(th_id, NULL) != 0) {
+               LOG("pthread_join failed for thread [%lu] errno [%d]\n",
+                       th_id, errno);
+               _exit_stdio();
+               return -1;
+       }
+
        fota_gr_deinit();
 
+       _exit_stdio();
+
        return 0;
 }
index dafe870..5ba53ff 100755 (executable)
@@ -28,7 +28,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#define LOG                    printf
+#define LOG(s, args...) do { printf("FOTA_GUI_TEST" "/(%s): " s, __func__, ##args); } while (0)
+
 
 #define SERV_PATH "/tmp/FotaGuiSocket"
 
@@ -57,7 +58,7 @@ int sock_init(void)
        int len, ret;
        struct sockaddr_un serv_addr;
 
-       LOG("\n sock_init \n");
+       LOG("%s\n", __func__);
        sendbuff = malloc(sizeof(sock_cmd));
        if (sendbuff == NULL) {
                LOG("memory allocation failed:%s\n", __FUNCTION__);
@@ -92,7 +93,7 @@ int sock_init(void)
 
 void sock_deinit(void)
 {
-       LOG("%s \n", __func__);
+       LOG("%s\n", __func__);
 
        close(sockfd);
        free(sendbuff);
@@ -170,7 +171,7 @@ int sock_cmd_end(void)
 
 int main(int argc, char **argv)
 {
-       int ret = -1;
+       int ret;
        int percent = 0;
 
        if (argc != 2) {
index 3459d93..6e762d2 100755 (executable)
@@ -26,6 +26,8 @@
 #include <unistd.h>
 #include <errno.h>
 
+#include "fota_gui_log.h"
+
 int s_fd_stdin = -1;
 int s_fd_stdout = -1;
 int s_fd_stderr = -1;
index dddbf80..7920ce5 100755 (executable)
@@ -18,7 +18,7 @@
 
 #include <stdlib.h>
 #include <png.h>
-#include "fota_common.h"
+#include "fota_gui_common.h"
 #include "fota_png.h"
 
 int png_img_width;
@@ -27,8 +27,8 @@ int png_img_height;
 //int png_img_width_batt_normal;
 //int png_img_height_batt_normal;
 
-png_byte color_type;
-png_byte bit_depth;
+png_byte png_color_type;
+png_byte png_bit_depth;
 
 png_structp png_ptr;
 png_infop info_ptr;
@@ -49,26 +49,29 @@ int read_png_file(char *file_name)
        if (!fp) {
                LOG("[read_png_file] File %s could not be opened"
                        " for reading \n", file_name);
+
+               LOG("Failed to open png file, path = [%s]", file_name);
                return -1;
        }
 
        rn = fread(header, 1, 8, fp);
        if (rn != 8)
                LOG("fread() read num mismatch\n");
-
        if (png_sig_cmp((png_bytep)header, 0, 8)) {
                fclose(fp);
                LOG("[read_png_file] File %s is not recognized"
                        " as a PNG file \n", file_name);
+               LOG("Failed to recognized PNG file\n");
                return -1;
        }
 
        /* initialize stuff */
-       png_ptr =
-           png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+       png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
        if (!png_ptr) {
                fclose(fp);
                LOG("[read_png_file] png_create_read_struct failed \n");
+
+               LOG("Failed png_create_read_struct()\n");
                return -1;
        }
 
@@ -77,6 +80,8 @@ int read_png_file(char *file_name)
                png_destroy_read_struct(&png_ptr, NULL, NULL);
                fclose(fp);
                LOG("[read_png_file] png_create_info_struct failed \n");
+
+               LOG("Failed png_create_info_struct()\n");
                return -1;
        }
 
@@ -84,17 +89,46 @@ int read_png_file(char *file_name)
                png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
                fclose(fp);
                LOG("[read_png_file] Error during init_io \n");
+
+               LOG("Failed png_destroy_read_struct()\n");
                return -1;
        }
 
+       int bit_depth, color_type;
+       png_uint_32 png_width;
+       png_uint_32 png_height;
+
        png_init_io(png_ptr, fp);
        png_set_sig_bytes(png_ptr, 8);
        png_read_info(png_ptr, info_ptr);
 
-       png_img_width = png_get_image_width(png_ptr, info_ptr);
-       png_img_height = png_get_image_height(png_ptr, info_ptr);
-       color_type = png_get_color_type(png_ptr, info_ptr);
-       bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+       int ret = png_get_IHDR(png_ptr, info_ptr, &png_width, &png_height, &bit_depth, &color_type, NULL, NULL, NULL);
+       if (ret == 0) {
+               LOGE("Failed png_get_IHDR(), ret = [%d]", ret);
+       } else if (ret == 1) {
+               LOG("color_type = [%d]", color_type);
+
+               if (color_type == PNG_COLOR_TYPE_RGB)
+                       LOG("png color type is PNG_COLOR_TYPE_RGB, color_type = [%d]\n", color_type);
+               else if (color_type == PNG_COLOR_TYPE_RGBA)
+                       LOG("png color type is PNG_COLOR_TYPE_RGBA, color_type = [%d]\n", color_type);
+               else if (color_type == PNG_COLOR_TYPE_PALETTE)
+                       LOG("png color type is PNG_COLOR_TYPE_PALETTE, color_type = [%d]\n", color_type);
+               else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+                       LOG("png color type is PNG_COLOR_TYPE_RGB_ALPHA, color_type = [%d]\n", color_type);
+               else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+                       LOG("png color type is PNG_COLOR_TYPE_GRAY_ALPHA, color_type = [%d]\n", color_type);
+               else if (color_type == PNG_COLOR_TYPE_GA)
+                       LOG("png color type is PNG_COLOR_TYPE_GA, color_type = [%d]\n", color_type);
+               else
+                       LOG("Unknown color type = [%d]\n", color_type);
+       }
+
+       png_img_width = png_width;
+       png_img_height = png_height;
+       png_color_type = color_type;
+       LOG("png_color_type = [%d]", png_color_type);
+       png_bit_depth = bit_depth;
 
        number_of_passes = png_set_interlace_handling(png_ptr);
        png_read_update_info(png_ptr, info_ptr);
@@ -104,12 +138,18 @@ int read_png_file(char *file_name)
                png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
                fclose(fp);
                LOG("[read_png_file] Error during read_image \n");
+
+               LOG("Failed png_destroy_read_struct()\n");
                return -1;
        }
 
+       png_size_t row_size = 0;
+
        row_pointers = (png_bytep *) malloc(sizeof(png_bytep)*png_img_height);
-       for (y = 0; y < png_img_height; y++)
-               row_pointers[y] = (png_byte *) malloc(png_get_rowbytes(png_ptr, info_ptr));
+       for (y = 0; y < png_img_height; y++) {
+               row_size = png_get_rowbytes(png_ptr, info_ptr);
+               row_pointers[y] = (png_byte *) malloc(row_size);
+       }
 
        png_read_image(png_ptr, row_pointers);
 
@@ -130,7 +170,7 @@ void draw_png_img_clip_xy(FbInfo *fbi, int x1, int y1, int cx, int cy, int cw, i
        int x, y;
        /* temp patch - lcd resoultion for qualcomm */
 
-       fb_buf_cur = (unsigned int *)fbi->buf;
+       fb_buf_cur = (unsigned int *)fbi->buf[0];
 
        /* check out range */
        if ((x1 + cw > fbi->w) ||
@@ -144,9 +184,9 @@ void draw_png_img_clip_xy(FbInfo *fbi, int x1, int y1, int cx, int cy, int cw, i
                return;
        }
 
-       if (color_type == PNG_COLOR_TYPE_RGB)
+       if (png_color_type == PNG_COLOR_TYPE_RGB)
                bpp = 3;
-       else if (color_type == PNG_COLOR_TYPE_RGBA)
+       else if (png_color_type == PNG_COLOR_TYPE_RGBA)
                bpp = 4;
        else {
                LOG("[draw_png_img_xy] png type does not match RGB or RGBA \n");
@@ -157,23 +197,23 @@ void draw_png_img_clip_xy(FbInfo *fbi, int x1, int y1, int cx, int cy, int cw, i
        fb_buf_cur += x1;
        for (y = 0; y < ch; y++) {
                png_byte *row = (png_byte *) row_pointers[cy + y];
-               if (bit_depth == 8)
+               if (png_bit_depth == 8)
                        row += (bpp * cx);
-               else if (bit_depth == 16)
+               else if (png_bit_depth == 16)
                        row += (bpp * 2 * cx);
                for (x = 0; x < cw; x++) {
                        if (bpp == 3) {
-                               if (bit_depth == 8) {
+                               if (png_bit_depth == 8) {
                                        (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                            (row[0] << 16) | (row[1] << 8) | (row[2]);
                                        row += bpp;
-                               } else if (bit_depth == 16) {
+                               } else if (png_bit_depth == 16) {
                                        (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                            (row[0] << 16) | (row[2] << 8) | (row[4]);
                                        row += bpp*2;
                                }
                        } else if (bpp == 4) {
-                               if (bit_depth == 8) {
+                               if (png_bit_depth == 8) {
                                        if (row[3] != 0) {
                                                char r1, g1, b1, a1;
                                                char r2, g2, b2, a2;
@@ -197,7 +237,7 @@ void draw_png_img_clip_xy(FbInfo *fbi, int x1, int y1, int cx, int cy, int cw, i
                                                    (r3 << 16) | (g3 << 8) | (b3);
                                        }
                                        row += bpp;
-                               } else if (bit_depth == 16) {
+                               } else if (png_bit_depth == 16) {
                                        if (row[6] != 0) {
                                                short r1, g1, b1, a1;
                                                short r2, g2, b2, a2;
@@ -241,23 +281,31 @@ void draw_png_img_xy(FbInfo *fbi, int x1, int y1)
        int x, y;
        /* temp patch - lcd resoultion for qualcomm */
 
-       fb_buf_cur = (unsigned int *)fbi->buf;
+       fb_buf_cur = (unsigned int *)fbi->buf[0];
 
        /* check out range */
        if ((x1 + png_img_width > fbi->w) ||
-           (y1 + png_img_height > fbi->h)) {
+               (y1 + png_img_height > fbi->h)) {
+               LOG("[draw_png_img_xy] output range exceeds frame buffer range \n");
+
                LOG("[draw_png_img_xy] output range exceeds frame buffer range \n");
                return;
        }
 
-       if (color_type == PNG_COLOR_TYPE_RGB)
+       LOG("png_color_type = [%d]", png_color_type);
+       if (png_color_type == PNG_COLOR_TYPE_RGB) {
                bpp = 3;
-       else if (color_type == PNG_COLOR_TYPE_RGBA)
+               LOG("png color type is PNG_COLOR_TYPE_RGB, png_color_type = [%d]", png_color_type);
+       } else if (png_color_type == PNG_COLOR_TYPE_RGBA) {
                bpp = 4;
-       else {
+               LOG("png color type is PNG_COLOR_TYPE_RGBA, png_color_type = [%d]", png_color_type);
+       } else {
                LOG("[draw_png_img_xy] png type does not match RGB or RGBA \n");
+
+               LOG("[draw_png_img_xy] png type does not match RGB or RGBA, png_color_type = [%d] \n", png_color_type);
                return;
        }
+
        /* temp patch - lcd resoultion for qualcomm */
        fb_buf_cur += (y1 * (fbi->w));
        fb_buf_cur += x1;
@@ -265,17 +313,17 @@ void draw_png_img_xy(FbInfo *fbi, int x1, int y1)
                png_byte *row = (png_byte *) row_pointers[y];
                for (x = 0; x < png_img_width; x++) {
                        if (bpp == 3) {
-                               if (bit_depth == 8) {
+                               if (png_bit_depth == 8) {
                                        (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                            (row[0] << 16) | (row[1] << 8) | (row[2]);
                                        row += bpp;
-                               } else if (bit_depth == 16) {
+                               } else if (png_bit_depth == 16) {
                                        (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                            (row[0] << 16) | (row[2] << 8) | (row[4]);
                                        row += bpp*2;
                                }
                        } else if (bpp == 4) {
-                               if (bit_depth == 8) {
+                               if (png_bit_depth == 8) {
                                        if (row[3] != 0) {
                                                char r1, g1, b1, a1;
                                                char r2, g2, b2, a2;
@@ -299,7 +347,7 @@ void draw_png_img_xy(FbInfo *fbi, int x1, int y1)
                                                    (r3 << 16) | (g3 << 8) | (b3);
                                        }
                                        row += bpp;
-                               } else if (bit_depth == 16) {
+                               } else if (png_bit_depth == 16) {
                                        if (row[6] != 0) {
                                                short r1, g1, b1, a1;
                                                short r2, g2, b2, a2;
@@ -344,7 +392,7 @@ void draw_png_mask_xy(FbInfo *fbi, int x1, int y1, char r, char g, char b)
        int x, y;
        /* temp patch - lcd resoultion for qualcomm */
 
-       fb_buf_cur = (unsigned int *)fbi->buf;
+       fb_buf_cur = (unsigned int *)fbi->buf[0];
 
        /* check out range */
        if ((x1 + png_img_width > fbi->w) ||
@@ -353,11 +401,11 @@ void draw_png_mask_xy(FbInfo *fbi, int x1, int y1, char r, char g, char b)
                return;
        }
 
-       if (color_type == PNG_COLOR_TYPE_RGB) {
+       if (png_color_type == PNG_COLOR_TYPE_RGB) {
                bpp = 3;
                LOG("[draw_png_img_xy] PNG_COLOR_TYPE_RGB : no mask channel \n");
                return;
-       } else if (color_type == PNG_COLOR_TYPE_RGBA)
+       } else if (png_color_type == PNG_COLOR_TYPE_RGBA)
                bpp = 4;
        else {
                LOG("[draw_png_img_xy] png type does not match RGB or RGBA \n");
@@ -370,13 +418,13 @@ void draw_png_mask_xy(FbInfo *fbi, int x1, int y1, char r, char g, char b)
                png_byte *row = (png_byte *) row_pointers[y];
                for (x = 0; x < png_img_width; x++) {
                        if (bpp == 4) {
-                               if (bit_depth == 8) {
+                               if (png_bit_depth == 8) {
                                        if (row[3] != 0) {
                                                (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                                        (r << 16) | (g << 8) | (b);
                                        }
                                        row += bpp;
-                               } else if (bit_depth == 16) {
+                               } else if (png_bit_depth == 16) {
                                        if (row[6] != 0) {
                                                (*fb_buf_cur) = ((*fb_buf_cur)&0xff000000) |
                                                        (r << 16) | (g << 8) | (b);
index e5491a5..1333de5 100755 (executable)
@@ -7,7 +7,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
 #include <fcntl.h>
 #include <sys/poll.h>
 #include <sys/time.h>
+#include <pthread.h>
+#include "fota_gui_common.h"
 #include "tdm-if.h"
-#include "fota_common.h"
-
-#define LOGD LOG
-
-tdm_if_disp s_st_disp;
 
 static void tdm_if_display_commit_handler_cb(tdm_output *output, unsigned int sequence,
-                                                                                                unsigned int tv_sec, unsigned int tv_usec,
-                                                                                                void *user_data)
+               unsigned int tv_sec, unsigned int tv_usec, void *user_data)
 {
-       LOGD("commit_handle_cb!!\n");
+       LOG("commit_handle_cb!!\n");
 
        return ;
 }
 
-int tdm_if_display_init(void)
+int tdm_if_display_init(tdm_if_disp *st_disp)
 {
        int color = 0;
        int buf_cnt;
-       tdm_if_disp *st_disp = &s_st_disp;
+
        tdm_error err = TDM_ERROR_NONE;
 
        tdm_output *output = NULL;
@@ -67,57 +63,58 @@ int tdm_if_display_init(void)
 
        int i = 0;
 
-       LOGD("start");
+       LOG("start\n");
 
        st_disp->disp = tdm_display_init(&err);
        if (!st_disp->disp) {
-               LOGD("failed to init tdm_display. error num = %d\n", err);
+               LOGE("failed to init tdm_display. error num = %d\n", err);
                goto exit;
        }
 
        err = tdm_display_get_fd(st_disp->disp, &st_disp->tdm_fd);
        if (err != TDM_ERROR_NONE) {
-               LOGD("failed to get tdm fd. error num = %d\n", err);
+               LOGE("failed to get tdm fd. error num = %d\n", err);
                goto exit;
        }
 
        st_disp->drm_fd = tdm_helper_get_fd("TDM_DRM_MASTER_FD");
        if (st_disp->drm_fd == -1) {
-               LOGD("failed to get tdm fd. error num = %d\n", err);
+               LOGE("failed to get tdm fd. error num = %d\n", err);
                goto exit;
        }
 
        err = tdm_display_get_output_count(st_disp->disp, &output_count);
        if (err != TDM_ERROR_NONE) {
-               LOGD("failed to get output count. error num = %d\n", err);
+               LOGE("failed to get output count. error num = %d\n", err);
                goto exit;
        }
 
        for (i = 0; i < output_count; i++) {
                output = tdm_display_get_output(st_disp->disp, i, &err);
                if (err != TDM_ERROR_NONE) {
-                       LOGD("failed to get outout. error num = %d\n", err);
+                       LOGE("failed to get outout. error num = %d\n", err);
                        goto exit;
                }
 
                err = tdm_output_get_output_type(output, &output_type);
                if (err != TDM_ERROR_NONE) {
-                       LOGD("failed to get output type. error num = %d\n", err);
+                       LOGE("failed to get output type. error num = %d\n", err);
                        goto exit;
                }
 
                err = tdm_output_get_conn_status(output, &conn_status);
                if (err != TDM_ERROR_NONE) {
-                       LOGD("failed to get output connection status. error num = %d\n", err);
+                       LOGE("failed to get output connection status. error num = %d\n", err);
                        goto exit;
                }
 
-               LOGD("output_type=%d  conn_status=%d\n", output_type, conn_status);
-               if ((output_type == TDM_OUTPUT_TYPE_LVDS) || (output_type == TDM_OUTPUT_TYPE_DSI)) {
+               LOG("output_type=%d  conn_status=%d\n", output_type, conn_status);
+               if ((output_type == TDM_OUTPUT_TYPE_LVDS || output_type == TDM_OUTPUT_TYPE_DSI) &&
+                               (conn_status == TDM_OUTPUT_CONN_STATUS_CONNECTED)) {
                        int cnt = 0;
                        err = tdm_output_get_available_modes(output, &output_mode, &cnt);
                        if (err != TDM_ERROR_NONE) {
-                               LOGD("failed to get output available modes. error num = %d\n", err);
+                               LOGE("failed to get output available modes. error num = %d\n", err);
                                goto exit;
                        }
 
@@ -129,7 +126,7 @@ int tdm_if_display_init(void)
                        unsigned int width_mm = 0;
                        unsigned int height_mm = 0;
                        err = tdm_output_get_physical_size(output, &width_mm, &height_mm);
-                       LOGD("TDM_OUTPUT_MODE:name[%s] mode:wh[%d %d] mm[%d %d]",
+                       LOG("TDM_OUTPUT_MODE:name[%s] mode:wh[%d %d] mm[%d %d]",
                                        output_mode->name, st_disp->width, st_disp->height, width_mm, height_mm);
 
                        break;
@@ -139,7 +136,7 @@ int tdm_if_display_init(void)
        /* MEMORY ALLOCATION */
        st_disp->bufmgr = tbm_bufmgr_init(st_disp->drm_fd);
        if (!st_disp->bufmgr) {
-               LOGD("failed to tbm_bufmgr_init\n");
+               LOGE("failed to tbm_bufmgr_init\n");
                goto exit;
        }
 
@@ -157,9 +154,9 @@ int tdm_if_display_init(void)
        surf_info.planes[0].stride = st_disp->stride;
 
        for (buf_cnt = 0; buf_cnt < MAX_BUF; buf_cnt++) {
-               st_disp->bo[buf_cnt] = tbm_bo_alloc(st_disp->bufmgr, st_disp->buffer_size, TBM_BO_SCANOUT);
+               st_disp->bo[buf_cnt] = tbm_bo_alloc(st_disp->bufmgr, st_disp->buffer_size, TBM_BO_NONCACHABLE);
                if (!st_disp->bo[buf_cnt]) {
-                       LOGD("failed to tbm_bo_alloc\n");
+                       LOGE("failed to tbm_bo_alloc\n");
                        goto exit;
                }
 
@@ -173,7 +170,7 @@ int tdm_if_display_init(void)
 
                st_disp->surf[buf_cnt] = tbm_surface_internal_create_with_bos(&surf_info, &st_disp->bo[buf_cnt], 1);
                if (!st_disp->surf[buf_cnt]) {
-                       LOGD("failed to create tbm_surface!!\n");
+                       LOGE("failed to create tbm_surface!!\n");
                        goto exit;
                }
        }
@@ -189,7 +186,7 @@ int tdm_if_display_init(void)
        }
 
        if (!tmp_layer) {
-               LOGD("failed to get output layer. error num = %d\n", err);
+               LOGE("failed to get output layer. error num = %d\n", err);
                goto exit;
        }
 
@@ -210,23 +207,21 @@ int tdm_if_display_init(void)
 
        err = tdm_layer_set_info(st_disp->layer, &layer_info);
        if (err != TDM_ERROR_NONE) {
-               LOGD("failed to get output layer. error num = %d\n", err);
+               LOGE("failed to get output layer. error num = %d\n", err);
                goto exit;
        }
 
        st_disp->current_buf_id = 0;
-
-       LOGD("done\n");
+       LOG("done\n");
        return 0;
 exit:
-       tdm_if_display_deinit();
+       tdm_if_display_deinit(st_disp);
        return -1;
 }
 
-void tdm_if_display_deinit(void)
+void tdm_if_display_deinit(tdm_if_disp *st_disp)
 {
        int buf_cnt = 0;
-       tdm_if_disp *st_disp = &s_st_disp;
 
        if (st_disp->disp != NULL) {
                /* RELEASE RESOURCE */
@@ -247,40 +242,13 @@ void tdm_if_display_deinit(void)
        }
 }
 
-int tdm_if_display_width(void)
-{
-       tdm_if_disp *st_disp = &s_st_disp;
-       return st_disp->width;
-}
-
-int tdm_if_display_height(void)
-{
-       tdm_if_disp *st_disp = &s_st_disp;
-       return st_disp->height;
-}
-
-int tdm_if_display_bufsize(void)
-{
-       tdm_if_disp *st_disp = &s_st_disp;
-       return st_disp->buffer_size;
-}
-
-void tdm_if_buffer_update(unsigned char *buffer)
-{
-       tdm_if_disp *st_disp = &s_st_disp;
-       int buf_cnt = st_disp->current_buf_id;
-       memcpy(st_disp->buffer[buf_cnt], buffer, st_disp->stride * st_disp->height);
-}
-
-void tdm_if_display_update(void)
+void tdm_if_display_update(tdm_if_disp *st_disp)
 {
        /* DISPLAY UPDATE */
        int buf_cnt = 0;
-       tdm_if_disp *st_disp = &s_st_disp;
 
        buf_cnt = st_disp->current_buf_id;
-       ++st_disp->current_buf_id;
-       st_disp->current_buf_id %= MAX_BUF;
+       //st_disp->current_buf_id = (++st_disp->current_buf_id)%MAX_BUF;
 
        tdm_layer_set_buffer(st_disp->layer, st_disp->surf[buf_cnt]);
 
@@ -289,23 +257,29 @@ void tdm_if_display_update(void)
 
        return ;
 }
-void tdm_if_lcd_on(void)
-{
-       tdm_if_disp *st_disp = &s_st_disp;
 
+void tdm_if_lcd_on(tdm_if_disp *st_disp)
+{
        /* SET DPMS ON */
-       LOGD("DPMS ON!\n");
+       LOG("DPMS ON!\n");
        tdm_output_set_dpms(st_disp->output, TDM_OUTPUT_DPMS_ON);
-
        return ;
 }
 
-void tdm_if_lcd_off(void)
+void tdm_if_lcd_suspend(tdm_if_disp *st_disp)
 {
-       tdm_if_disp *st_disp = &s_st_disp;
+       /* SET DPMS SUSPEND */
+       LOG("DPMS SUSPEND!\n");
+       tdm_output_set_dpms(st_disp->output, TDM_OUTPUT_DPMS_SUSPEND);
+
+       return ;
+}
 
+void tdm_if_lcd_off(tdm_if_disp *st_disp)
+{
        /* SET DPMS OFF */
-       LOGD("DPMS OFF!\n");
+       LOG("DPMS OFF!\n");
+
        tdm_output_set_dpms(st_disp->output, TDM_OUTPUT_DPMS_OFF);
 
        return ;
index 8693dba..fdc5dc6 100755 (executable)
@@ -36,13 +36,18 @@ typedef struct _tdm_if_disp {
        tdm_pp *pp;
        int tdm_fd;
        int drm_fd;
+
        tbm_surface_h surf[MAX_BUF];
        tbm_surface_h pp_surf[MAX_BUF];
        tbm_bufmgr bufmgr;
        unsigned int handle[MAX_BUF];
+       unsigned int pp_handle[MAX_BUF];
        tbm_bo bo[MAX_BUF];
        tbm_bo_handle bo_handle[MAX_BUF];
+       tbm_bo pp_bo[MAX_BUF];
+       tbm_bo_handle pp_bo_handle[MAX_BUF];
        void *buffer[MAX_BUF];
+       void *pp_buffer[MAX_BUF];
        int buffer_size;
        int width;
        int height;
@@ -57,16 +62,10 @@ typedef enum {
 
 extern tdm_if_disp s_disp;
 
-int tdm_if_display_init(void);
-void tdm_if_display_deinit(void);
-void tdm_if_display_update(void);
-int tdm_if_display_width(void);
-int tdm_if_display_height(void);
-int tdm_if_display_bufsize(void);
-
-void tdm_if_buffer_update(unsigned char *buffer);
-
-void tdm_if_lcd_on(void);
-void tdm_if_lcd_off(void);
-
+int tdm_if_display_init(tdm_if_disp *st_disp);
+void tdm_if_display_deinit(tdm_if_disp *st_disp);
+void tdm_if_display_update(tdm_if_disp *st_disp);
+void tdm_if_lcd_on(tdm_if_disp *st_disp);
+void tdm_if_lcd_suspend(tdm_if_disp *st_disp);
+void tdm_if_lcd_off(tdm_if_disp *st_disp);
 #endif /* __TDM_IF_H__ */
index ced84fe..166fb9a 100755 (executable)
@@ -1,7 +1,7 @@
 Name:          tota-ua
 Summary:       fota update agent
 ExclusiveArch:         %{arm}
-Version:       0.1.8
+Version:       0.1.9
 Release:       0
 Group:         System
 License:       Apache-2.0
index 823cc14..57c4167 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_000.png and b/res/tw1/images/tw1_fota_progress_000.png differ
index 96f7ecc..6ac35be 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_001.png and b/res/tw1/images/tw1_fota_progress_001.png differ
index a991089..ada29ef 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_002.png and b/res/tw1/images/tw1_fota_progress_002.png differ
index 0c5deeb..8d62ed9 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_003.png and b/res/tw1/images/tw1_fota_progress_003.png differ
index 4a0547d..b4cad03 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_004.png and b/res/tw1/images/tw1_fota_progress_004.png differ
index 418e74d..336dfd0 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_005.png and b/res/tw1/images/tw1_fota_progress_005.png differ
index eecd8c0..797aecc 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_006.png and b/res/tw1/images/tw1_fota_progress_006.png differ
index 308bef5..9b58022 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_007.png and b/res/tw1/images/tw1_fota_progress_007.png differ
index ff2f1d7..4276f1c 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_008.png and b/res/tw1/images/tw1_fota_progress_008.png differ
index bb903f9..c59beb5 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_009.png and b/res/tw1/images/tw1_fota_progress_009.png differ
index b22d512..160f583 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_010.png and b/res/tw1/images/tw1_fota_progress_010.png differ
index ebb6134..dc80fe8 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_011.png and b/res/tw1/images/tw1_fota_progress_011.png differ
index 628052f..9304d6c 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_012.png and b/res/tw1/images/tw1_fota_progress_012.png differ
index 545b56a..a158ad0 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_013.png and b/res/tw1/images/tw1_fota_progress_013.png differ
index cfcbece..2f975aa 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_014.png and b/res/tw1/images/tw1_fota_progress_014.png differ
index 23967d2..0f43b63 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_015.png and b/res/tw1/images/tw1_fota_progress_015.png differ
index 8061447..01e638b 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_016.png and b/res/tw1/images/tw1_fota_progress_016.png differ
index 0083e7c..0853460 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_017.png and b/res/tw1/images/tw1_fota_progress_017.png differ
index 6096166..00d776e 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_018.png and b/res/tw1/images/tw1_fota_progress_018.png differ
index 9de21f2..d9a4e8c 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_019.png and b/res/tw1/images/tw1_fota_progress_019.png differ
index e555006..9eb0486 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_020.png and b/res/tw1/images/tw1_fota_progress_020.png differ
index a2cdbe4..bc2cfeb 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_021.png and b/res/tw1/images/tw1_fota_progress_021.png differ
index e0807ab..ee2a978 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_022.png and b/res/tw1/images/tw1_fota_progress_022.png differ
index c58fe1d..4bd3f25 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_023.png and b/res/tw1/images/tw1_fota_progress_023.png differ
index 4839d13..50c1afe 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_024.png and b/res/tw1/images/tw1_fota_progress_024.png differ
index 361aa9e..20344af 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_025.png and b/res/tw1/images/tw1_fota_progress_025.png differ
index 52b228e..9efa47a 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_026.png and b/res/tw1/images/tw1_fota_progress_026.png differ
index 75aed04..20800fd 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_027.png and b/res/tw1/images/tw1_fota_progress_027.png differ
index dacce44..2022c64 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_028.png and b/res/tw1/images/tw1_fota_progress_028.png differ
index d7ca410..ce92083 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_029.png and b/res/tw1/images/tw1_fota_progress_029.png differ
index ae0384d..85eddd2 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_030.png and b/res/tw1/images/tw1_fota_progress_030.png differ
index 34ead42..fb5241f 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_031.png and b/res/tw1/images/tw1_fota_progress_031.png differ
index b725184..94dbf7b 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_032.png and b/res/tw1/images/tw1_fota_progress_032.png differ
diff --git a/res/tw1/images/tw1_fota_progress_033.png b/res/tw1/images/tw1_fota_progress_033.png
new file mode 100755 (executable)
index 0000000..8863cfd
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_033.png differ
diff --git a/res/tw1/images/tw1_fota_progress_034.png b/res/tw1/images/tw1_fota_progress_034.png
new file mode 100755 (executable)
index 0000000..6a152a9
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_034.png differ
diff --git a/res/tw1/images/tw1_fota_progress_035.png b/res/tw1/images/tw1_fota_progress_035.png
new file mode 100755 (executable)
index 0000000..4c04bfa
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_035.png differ
diff --git a/res/tw1/images/tw1_fota_progress_036.png b/res/tw1/images/tw1_fota_progress_036.png
new file mode 100755 (executable)
index 0000000..30a5da4
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_036.png differ
diff --git a/res/tw1/images/tw1_fota_progress_037.png b/res/tw1/images/tw1_fota_progress_037.png
new file mode 100755 (executable)
index 0000000..cd683f4
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_037.png differ
diff --git a/res/tw1/images/tw1_fota_progress_038.png b/res/tw1/images/tw1_fota_progress_038.png
new file mode 100755 (executable)
index 0000000..aa6cd07
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_038.png differ
diff --git a/res/tw1/images/tw1_fota_progress_039.png b/res/tw1/images/tw1_fota_progress_039.png
new file mode 100755 (executable)
index 0000000..aeeb890
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_039.png differ
diff --git a/res/tw1/images/tw1_fota_progress_040.png b/res/tw1/images/tw1_fota_progress_040.png
new file mode 100755 (executable)
index 0000000..2bdec30
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_040.png differ
diff --git a/res/tw1/images/tw1_fota_progress_041.png b/res/tw1/images/tw1_fota_progress_041.png
new file mode 100755 (executable)
index 0000000..219d64a
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_041.png differ
diff --git a/res/tw1/images/tw1_fota_progress_042.png b/res/tw1/images/tw1_fota_progress_042.png
new file mode 100755 (executable)
index 0000000..36f9890
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_042.png differ
diff --git a/res/tw1/images/tw1_fota_progress_043.png b/res/tw1/images/tw1_fota_progress_043.png
new file mode 100755 (executable)
index 0000000..380dac6
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_043.png differ
diff --git a/res/tw1/images/tw1_fota_progress_044.png b/res/tw1/images/tw1_fota_progress_044.png
new file mode 100755 (executable)
index 0000000..1567063
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_044.png differ
diff --git a/res/tw1/images/tw1_fota_progress_045.png b/res/tw1/images/tw1_fota_progress_045.png
new file mode 100755 (executable)
index 0000000..748edaf
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_045.png differ
diff --git a/res/tw1/images/tw1_fota_progress_046.png b/res/tw1/images/tw1_fota_progress_046.png
new file mode 100755 (executable)
index 0000000..3d3eff3
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_046.png differ
diff --git a/res/tw1/images/tw1_fota_progress_047.png b/res/tw1/images/tw1_fota_progress_047.png
new file mode 100755 (executable)
index 0000000..9771f49
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_047.png differ
diff --git a/res/tw1/images/tw1_fota_progress_048.png b/res/tw1/images/tw1_fota_progress_048.png
new file mode 100755 (executable)
index 0000000..d1c5350
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_048.png differ
diff --git a/res/tw1/images/tw1_fota_progress_049.png b/res/tw1/images/tw1_fota_progress_049.png
new file mode 100755 (executable)
index 0000000..e45b84b
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_049.png differ
diff --git a/res/tw1/images/tw1_fota_progress_050.png b/res/tw1/images/tw1_fota_progress_050.png
new file mode 100755 (executable)
index 0000000..c4ea519
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_050.png differ
diff --git a/res/tw1/images/tw1_fota_progress_051.png b/res/tw1/images/tw1_fota_progress_051.png
new file mode 100755 (executable)
index 0000000..127ea69
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_051.png differ
diff --git a/res/tw1/images/tw1_fota_progress_052.png b/res/tw1/images/tw1_fota_progress_052.png
new file mode 100755 (executable)
index 0000000..b0c51a3
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_052.png differ
diff --git a/res/tw1/images/tw1_fota_progress_053.png b/res/tw1/images/tw1_fota_progress_053.png
new file mode 100755 (executable)
index 0000000..2aed22b
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_053.png differ
diff --git a/res/tw1/images/tw1_fota_progress_054.png b/res/tw1/images/tw1_fota_progress_054.png
new file mode 100755 (executable)
index 0000000..6097e7c
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_054.png differ
diff --git a/res/tw1/images/tw1_fota_progress_055.png b/res/tw1/images/tw1_fota_progress_055.png
new file mode 100755 (executable)
index 0000000..b90df4c
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_055.png differ
diff --git a/res/tw1/images/tw1_fota_progress_056.png b/res/tw1/images/tw1_fota_progress_056.png
new file mode 100755 (executable)
index 0000000..8695306
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_056.png differ
diff --git a/res/tw1/images/tw1_fota_progress_057.png b/res/tw1/images/tw1_fota_progress_057.png
new file mode 100755 (executable)
index 0000000..405e6fe
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_057.png differ
diff --git a/res/tw1/images/tw1_fota_progress_058.png b/res/tw1/images/tw1_fota_progress_058.png
new file mode 100755 (executable)
index 0000000..21eaa87
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_058.png differ
diff --git a/res/tw1/images/tw1_fota_progress_059.png b/res/tw1/images/tw1_fota_progress_059.png
new file mode 100755 (executable)
index 0000000..217b3b5
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_059.png differ
diff --git a/res/tw1/images/tw1_fota_progress_060.png b/res/tw1/images/tw1_fota_progress_060.png
new file mode 100755 (executable)
index 0000000..97ffaa3
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_060.png differ
diff --git a/res/tw1/images/tw1_fota_progress_061.png b/res/tw1/images/tw1_fota_progress_061.png
new file mode 100755 (executable)
index 0000000..dc787a7
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_061.png differ
diff --git a/res/tw1/images/tw1_fota_progress_062.png b/res/tw1/images/tw1_fota_progress_062.png
new file mode 100755 (executable)
index 0000000..4ecbe80
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_062.png differ
diff --git a/res/tw1/images/tw1_fota_progress_063.png b/res/tw1/images/tw1_fota_progress_063.png
new file mode 100755 (executable)
index 0000000..05c28ee
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_063.png differ
diff --git a/res/tw1/images/tw1_fota_progress_064.png b/res/tw1/images/tw1_fota_progress_064.png
new file mode 100755 (executable)
index 0000000..4a538cb
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_064.png differ
diff --git a/res/tw1/images/tw1_fota_progress_065.png b/res/tw1/images/tw1_fota_progress_065.png
new file mode 100755 (executable)
index 0000000..c46965a
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_065.png differ
diff --git a/res/tw1/images/tw1_fota_progress_066.png b/res/tw1/images/tw1_fota_progress_066.png
new file mode 100755 (executable)
index 0000000..695620f
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_066.png differ
diff --git a/res/tw1/images/tw1_fota_progress_067.png b/res/tw1/images/tw1_fota_progress_067.png
new file mode 100755 (executable)
index 0000000..8e549da
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_067.png differ
diff --git a/res/tw1/images/tw1_fota_progress_068.png b/res/tw1/images/tw1_fota_progress_068.png
new file mode 100755 (executable)
index 0000000..2ba24f4
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_068.png differ
diff --git a/res/tw1/images/tw1_fota_progress_069.png b/res/tw1/images/tw1_fota_progress_069.png
new file mode 100755 (executable)
index 0000000..524caab
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_069.png differ
diff --git a/res/tw1/images/tw1_fota_progress_070.png b/res/tw1/images/tw1_fota_progress_070.png
new file mode 100755 (executable)
index 0000000..83fc829
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_070.png differ
diff --git a/res/tw1/images/tw1_fota_progress_071.png b/res/tw1/images/tw1_fota_progress_071.png
new file mode 100755 (executable)
index 0000000..722d775
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_071.png differ
diff --git a/res/tw1/images/tw1_fota_progress_072.png b/res/tw1/images/tw1_fota_progress_072.png
new file mode 100755 (executable)
index 0000000..9ace826
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_072.png differ
diff --git a/res/tw1/images/tw1_fota_progress_073.png b/res/tw1/images/tw1_fota_progress_073.png
new file mode 100755 (executable)
index 0000000..0c64d0d
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_073.png differ
diff --git a/res/tw1/images/tw1_fota_progress_074.png b/res/tw1/images/tw1_fota_progress_074.png
new file mode 100755 (executable)
index 0000000..e44c358
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_074.png differ
diff --git a/res/tw1/images/tw1_fota_progress_075.png b/res/tw1/images/tw1_fota_progress_075.png
new file mode 100755 (executable)
index 0000000..6840e50
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_075.png differ
diff --git a/res/tw1/images/tw1_fota_progress_076.png b/res/tw1/images/tw1_fota_progress_076.png
new file mode 100755 (executable)
index 0000000..7e7cb00
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_076.png differ
diff --git a/res/tw1/images/tw1_fota_progress_077.png b/res/tw1/images/tw1_fota_progress_077.png
new file mode 100755 (executable)
index 0000000..06006b4
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_077.png differ
diff --git a/res/tw1/images/tw1_fota_progress_078.png b/res/tw1/images/tw1_fota_progress_078.png
new file mode 100755 (executable)
index 0000000..2ea32ca
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_078.png differ
diff --git a/res/tw1/images/tw1_fota_progress_079.png b/res/tw1/images/tw1_fota_progress_079.png
new file mode 100755 (executable)
index 0000000..ba007b0
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_079.png differ
diff --git a/res/tw1/images/tw1_fota_progress_080.png b/res/tw1/images/tw1_fota_progress_080.png
new file mode 100755 (executable)
index 0000000..3965982
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_080.png differ
diff --git a/res/tw1/images/tw1_fota_progress_081.png b/res/tw1/images/tw1_fota_progress_081.png
new file mode 100755 (executable)
index 0000000..bce77f3
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_081.png differ
diff --git a/res/tw1/images/tw1_fota_progress_082.png b/res/tw1/images/tw1_fota_progress_082.png
new file mode 100755 (executable)
index 0000000..4c6e07f
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_082.png differ
diff --git a/res/tw1/images/tw1_fota_progress_083.png b/res/tw1/images/tw1_fota_progress_083.png
new file mode 100755 (executable)
index 0000000..e962e65
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_083.png differ
diff --git a/res/tw1/images/tw1_fota_progress_084.png b/res/tw1/images/tw1_fota_progress_084.png
new file mode 100755 (executable)
index 0000000..ad3c8da
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_084.png differ
diff --git a/res/tw1/images/tw1_fota_progress_085.png b/res/tw1/images/tw1_fota_progress_085.png
new file mode 100755 (executable)
index 0000000..efbe6bd
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_085.png differ
diff --git a/res/tw1/images/tw1_fota_progress_086.png b/res/tw1/images/tw1_fota_progress_086.png
new file mode 100755 (executable)
index 0000000..583dda4
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_086.png differ
diff --git a/res/tw1/images/tw1_fota_progress_087.png b/res/tw1/images/tw1_fota_progress_087.png
new file mode 100755 (executable)
index 0000000..5d67e0c
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_087.png differ
diff --git a/res/tw1/images/tw1_fota_progress_088.png b/res/tw1/images/tw1_fota_progress_088.png
new file mode 100755 (executable)
index 0000000..553146d
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_088.png differ
diff --git a/res/tw1/images/tw1_fota_progress_089.png b/res/tw1/images/tw1_fota_progress_089.png
new file mode 100755 (executable)
index 0000000..1ef9330
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_089.png differ
diff --git a/res/tw1/images/tw1_fota_progress_090.png b/res/tw1/images/tw1_fota_progress_090.png
new file mode 100755 (executable)
index 0000000..c37815d
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_090.png differ
diff --git a/res/tw1/images/tw1_fota_progress_091.png b/res/tw1/images/tw1_fota_progress_091.png
new file mode 100755 (executable)
index 0000000..5554045
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_091.png differ
diff --git a/res/tw1/images/tw1_fota_progress_092.png b/res/tw1/images/tw1_fota_progress_092.png
new file mode 100755 (executable)
index 0000000..88eae71
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_092.png differ
diff --git a/res/tw1/images/tw1_fota_progress_093.png b/res/tw1/images/tw1_fota_progress_093.png
new file mode 100755 (executable)
index 0000000..1ecd08a
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_093.png differ
diff --git a/res/tw1/images/tw1_fota_progress_094.png b/res/tw1/images/tw1_fota_progress_094.png
new file mode 100755 (executable)
index 0000000..68b555a
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_094.png differ
diff --git a/res/tw1/images/tw1_fota_progress_095.png b/res/tw1/images/tw1_fota_progress_095.png
new file mode 100755 (executable)
index 0000000..b5ebe82
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_095.png differ
diff --git a/res/tw1/images/tw1_fota_progress_096.png b/res/tw1/images/tw1_fota_progress_096.png
new file mode 100755 (executable)
index 0000000..340e683
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_096.png differ
diff --git a/res/tw1/images/tw1_fota_progress_097.png b/res/tw1/images/tw1_fota_progress_097.png
new file mode 100755 (executable)
index 0000000..9aa46b5
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_097.png differ
diff --git a/res/tw1/images/tw1_fota_progress_098.png b/res/tw1/images/tw1_fota_progress_098.png
new file mode 100755 (executable)
index 0000000..b056990
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_098.png differ
diff --git a/res/tw1/images/tw1_fota_progress_099.png b/res/tw1/images/tw1_fota_progress_099.png
new file mode 100755 (executable)
index 0000000..917a5ae
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_099.png differ
diff --git a/res/tw1/images/tw1_fota_progress_100.png b/res/tw1/images/tw1_fota_progress_100.png
new file mode 100755 (executable)
index 0000000..e8ecfec
Binary files /dev/null and b/res/tw1/images/tw1_fota_progress_100.png differ
index 10161e1..57c4167 100755 (executable)
Binary files a/res/tw1/images/tw1_fota_progress_bg.png and b/res/tw1/images/tw1_fota_progress_bg.png differ
diff --git a/res/tw1/images/tw1_start_downloading.png b/res/tw1/images/tw1_start_downloading.png
new file mode 100755 (executable)
index 0000000..b1ab5d2
Binary files /dev/null and b/res/tw1/images/tw1_start_downloading.png differ
diff --git a/res/tw1/images/wc_fota_start_downloading.png b/res/tw1/images/wc_fota_start_downloading.png
deleted file mode 100755 (executable)
index d757f53..0000000
Binary files a/res/tw1/images/wc_fota_start_downloading.png and /dev/null differ
index db9e593..2b0f041 100755 (executable)
@@ -1,16 +1,16 @@
 # ---- Target contents ----------------------------------------------------- #
 VERBATIMS="
-/usr/share/fota/res/images/wc_fota_downloading_0.png
-/usr/share/fota/res/images/wc_fota_downloading_1.png
-/usr/share/fota/res/images/wc_fota_downloading_2.png
-/usr/share/fota/res/images/wc_fota_downloading_3.png
-/usr/share/fota/res/images/wc_fota_downloading_4.png
-/usr/share/fota/res/images/wc_fota_downloading_5.png
-/usr/share/fota/res/images/wc_fota_downloading_6.png
-/usr/share/fota/res/images/wc_fota_downloading_7.png
-/usr/share/fota/res/images/wc_fota_downloading_8.png
-/usr/share/fota/res/images/wc_fota_downloading_9.png
-/usr/share/fota/res/images/wc_fota_downloading_percent.png
+/usr/share/fota/res/images/tw1_fota_downloading_0.png
+/usr/share/fota/res/images/tw1_fota_downloading_1.png
+/usr/share/fota/res/images/tw1_fota_downloading_2.png
+/usr/share/fota/res/images/tw1_fota_downloading_3.png
+/usr/share/fota/res/images/tw1_fota_downloading_4.png
+/usr/share/fota/res/images/tw1_fota_downloading_5.png
+/usr/share/fota/res/images/tw1_fota_downloading_6.png
+/usr/share/fota/res/images/tw1_fota_downloading_7.png
+/usr/share/fota/res/images/tw1_fota_downloading_8.png
+/usr/share/fota/res/images/tw1_fota_downloading_9.png
+/usr/share/fota/res/images/tw1_fota_downloading_percent.png
 /usr/share/fota/res/images/tw1_fota_progress_000.png
 /usr/share/fota/res/images/tw1_fota_progress_001.png
 /usr/share/fota/res/images/tw1_fota_progress_002.png
@@ -44,14 +44,84 @@ VERBATIMS="
 /usr/share/fota/res/images/tw1_fota_progress_030.png
 /usr/share/fota/res/images/tw1_fota_progress_031.png
 /usr/share/fota/res/images/tw1_fota_progress_032.png
+/usr/share/fota/res/images/tw1_fota_progress_033.png
+/usr/share/fota/res/images/tw1_fota_progress_034.png
+/usr/share/fota/res/images/tw1_fota_progress_035.png
+/usr/share/fota/res/images/tw1_fota_progress_036.png
+/usr/share/fota/res/images/tw1_fota_progress_037.png
+/usr/share/fota/res/images/tw1_fota_progress_038.png
+/usr/share/fota/res/images/tw1_fota_progress_039.png
+/usr/share/fota/res/images/tw1_fota_progress_040.png
+/usr/share/fota/res/images/tw1_fota_progress_041.png
+/usr/share/fota/res/images/tw1_fota_progress_042.png
+/usr/share/fota/res/images/tw1_fota_progress_043.png
+/usr/share/fota/res/images/tw1_fota_progress_044.png
+/usr/share/fota/res/images/tw1_fota_progress_045.png
+/usr/share/fota/res/images/tw1_fota_progress_046.png
+/usr/share/fota/res/images/tw1_fota_progress_047.png
+/usr/share/fota/res/images/tw1_fota_progress_048.png
+/usr/share/fota/res/images/tw1_fota_progress_049.png
+/usr/share/fota/res/images/tw1_fota_progress_050.png
+/usr/share/fota/res/images/tw1_fota_progress_051.png
+/usr/share/fota/res/images/tw1_fota_progress_052.png
+/usr/share/fota/res/images/tw1_fota_progress_053.png
+/usr/share/fota/res/images/tw1_fota_progress_054.png
+/usr/share/fota/res/images/tw1_fota_progress_055.png
+/usr/share/fota/res/images/tw1_fota_progress_056.png
+/usr/share/fota/res/images/tw1_fota_progress_057.png
+/usr/share/fota/res/images/tw1_fota_progress_058.png
+/usr/share/fota/res/images/tw1_fota_progress_059.png
+/usr/share/fota/res/images/tw1_fota_progress_060.png
+/usr/share/fota/res/images/tw1_fota_progress_061.png
+/usr/share/fota/res/images/tw1_fota_progress_062.png
+/usr/share/fota/res/images/tw1_fota_progress_063.png
+/usr/share/fota/res/images/tw1_fota_progress_064.png
+/usr/share/fota/res/images/tw1_fota_progress_065.png
+/usr/share/fota/res/images/tw1_fota_progress_066.png
+/usr/share/fota/res/images/tw1_fota_progress_067.png
+/usr/share/fota/res/images/tw1_fota_progress_068.png
+/usr/share/fota/res/images/tw1_fota_progress_069.png
+/usr/share/fota/res/images/tw1_fota_progress_070.png
+/usr/share/fota/res/images/tw1_fota_progress_071.png
+/usr/share/fota/res/images/tw1_fota_progress_072.png
+/usr/share/fota/res/images/tw1_fota_progress_073.png
+/usr/share/fota/res/images/tw1_fota_progress_074.png
+/usr/share/fota/res/images/tw1_fota_progress_075.png
+/usr/share/fota/res/images/tw1_fota_progress_076.png
+/usr/share/fota/res/images/tw1_fota_progress_077.png
+/usr/share/fota/res/images/tw1_fota_progress_078.png
+/usr/share/fota/res/images/tw1_fota_progress_079.png
+/usr/share/fota/res/images/tw1_fota_progress_080.png
+/usr/share/fota/res/images/tw1_fota_progress_081.png
+/usr/share/fota/res/images/tw1_fota_progress_082.png
+/usr/share/fota/res/images/tw1_fota_progress_083.png
+/usr/share/fota/res/images/tw1_fota_progress_084.png
+/usr/share/fota/res/images/tw1_fota_progress_085.png
+/usr/share/fota/res/images/tw1_fota_progress_086.png
+/usr/share/fota/res/images/tw1_fota_progress_087.png
+/usr/share/fota/res/images/tw1_fota_progress_088.png
+/usr/share/fota/res/images/tw1_fota_progress_089.png
+/usr/share/fota/res/images/tw1_fota_progress_090.png
+/usr/share/fota/res/images/tw1_fota_progress_091.png
+/usr/share/fota/res/images/tw1_fota_progress_092.png
+/usr/share/fota/res/images/tw1_fota_progress_093.png
+/usr/share/fota/res/images/tw1_fota_progress_094.png
+/usr/share/fota/res/images/tw1_fota_progress_095.png
+/usr/share/fota/res/images/tw1_fota_progress_096.png
+/usr/share/fota/res/images/tw1_fota_progress_097.png
+/usr/share/fota/res/images/tw1_fota_progress_098.png
+/usr/share/fota/res/images/tw1_fota_progress_099.png
+/usr/share/fota/res/images/tw1_fota_progress_100.png
 /usr/share/fota/res/images/tw1_fota_progress_bg.png
 /usr/share/fota/res/images/tw1_fota_progress_final.png
-/usr/share/fota/res/images/wc_fota_start_downloading.png
+/usr/share/fota/res/images/tw1_start_downloading.png
 "
 
 WITHLIBS="
 /usr/bin/fota_gui
 /usr/bin/fota_gui_test
 /usr/lib/libtdm-mgr.so
+/usr/lib/tdm/libtdm-default.so
+/usr/lib/tdm/libtdm-exynos.so
 /usr/lib/bufmgr/libtbm_default.so
 "