TizenRefApp-6828 Incorrect launching mode was fixed 70/88170/2 submit/tizen/20160914.135347
authorDmytro Dragan <dm.dragan@samsung.com>
Wed, 14 Sep 2016 08:07:11 +0000 (11:07 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Wed, 14 Sep 2016 13:05:05 +0000 (06:05 -0700)
Change-Id: Ia9dac72b026353f93351e9d0cc40ad071d822f6b
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
13 files changed:
Build/basedef.mk
Build/build_edc.mk
Build/build_po.mk
Build/makefile.mk
Build/platform.mk [new file with mode: 0644]
Build/tooldef.mk
CMakeLists.txt
inc/wallpaper-ui-service.h
org.tizen.wallpaper-ui-service.xml
packaging/org.tizen.wallpaper-ui-service.spec
project_def.prop
src/wallpaper-ui-service.c
tizen-manifest.xml

index 8812624..64fbf82 100644 (file)
@@ -1,24 +1,34 @@
 # Add inputs and outputs from these tool invocations to the build variables
 
-C_DEPS +=
 
-USES_EFL = yes
-USES_USR_INC = yes
+OS_NAME := $(shell $(UNAME))
 
-SYSROOT = $(SBI_SYSROOT)
 
-USR_INCS := $(addprefix -I $(SYSROOT),$(PLATFORM_INCS_EX))
-EFL_INCS = 
+#ifeq ($(origin BUILD_CONFIG), undefined)
+BUILD_CONFIG ?= Debug
+#endif
 
-ifeq ($(strip $(PLATFORM_LIB_PATHS)),)
-RS_LIB_PATHS := "$(SYSROOT)/usr/lib"
-else
-RS_LIB_PATHS := $(addprefix -L$(SYSROOT),$(PLATFORM_LIB_PATHS))
-endif
+#ifeq ($(origin ARCH), undefined)
+ARCH ?= i386
+#endif
 
-RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX))
+#ifeq ($(origin PROJPATH), undefined)
+PROJPATH ?= .
+#endif
 
-PLATFORM_INCS = $(USR_INCS) $(EFL_INCS) \
-     -I"$(SDK_PATH)/library"
 
-OS_NAME := $(shell $(UNAME))
+#ifeq ($(origin PROJ_PATH), undefined)
+PROJ_PATH ?= $(PROJPATH)
+#endif
+
+#ifeq ($(strip $(OUTPUT_DIR)),)
+OUTPUT_DIR ?= $(PROJ_PATH)/$(BUILD_CONFIG)
+#endif
+
+#ifeq ($(strip $(BUILD_ARCH)),)
+BUILD_ARCH ?= $(ARCH)
+#endif
+
+#ifeq ($(strip $(ENVENTOR_PATH)),)
+ENVENTOR_PATH ?= $(SDK_TOOLPATH)/enventor
+#endif
index 8485bb2..6f85fdd 100644 (file)
@@ -58,9 +58,9 @@ ifneq ($$(strip $$(_ALL_SRCS)),)
 
 _ENC_SRCS := $$(call ENCODE_4MAKE,$$(_ALL_SRCS)) 
 
-_COMPILER_FLAGS := -id "$$(_OUTPUT_DIR)" -id "$$(SDK_TOOLPATH)/enventor/share/enventor/images"
-_COMPILER_FLAGS += -sd "$$(_OUTPUT_DIR)" -sd "$$(SDK_TOOLPATH)/enventor/share/enventor/sounds"
-_COMPILER_FLAGS += -fd "$$(_OUTPUT_DIR)" -fd "$$(SDK_TOOLPATH)/enventor/share/enventor/fonts"
+_COMPILER_FLAGS := -id "$$(ENVENTOR_SHARED_RES_PATH)/images"
+_COMPILER_FLAGS += -sd "$$(ENVENTOR_SHARED_RES_PATH)/sounds"
+_COMPILER_FLAGS += -fd "$$(ENVENTOR_SHARED_RES_PATH)/fonts"
 
 ifneq ($$(strip $$(_IMAGE_DIRS)),)
 _COMPILER_FLAGS += $$(addprefix -id ,$$(_IMAGE_DIRS))
index 23eb0df..d88d71a 100644 (file)
@@ -37,7 +37,7 @@ endef
 
 define MO_PROC_RAW
 
-_PROJ_ROOT := $(1)
+_OUTPUT_DIR := $(1)
 _SRCS := $(2)
 _APPNAME := $(3)
 
index 7384d24..c95b4b4 100644 (file)
@@ -1,8 +1,8 @@
-# 
-# Usege : make -f <proj_root>/Build/makefile -C <proj_root> 
 #
-BUILD_SCRIPT_VERSION := 1.2.2
+# Usege : make -f <proj_root>/Build/makefile -C <proj_root>
+#
+
+BUILD_SCRIPT_VERSION := 1.2.3
 
 .PHONY : app_version app_clean build_version
 
@@ -14,18 +14,20 @@ clean : app_clean
 version : build_version
 
 
-#PROJ_ROOT := $(call BSLASH2SLASH,$(PROJPATH))
+#PROJ_ROOT := $(call BSLASH2SLASH,$(PROJ_PATH))
 PROJ_ROOT := .
 BUILD_ROOT := $(PROJ_ROOT)/Build
 
+include $(BUILD_ROOT)/basedef.mk
+
 include $(PROJ_ROOT)/project_def.prop
 -include $(PROJ_ROOT)/build_def.prop
 
 include $(BUILD_ROOT)/funcs.mk
 
--include $(BUILD_ROOT)/basedef.mk
 -include $(BUILD_ROOT)/tooldef.mk
 -include $(BUILD_ROOT)/flags.mk
+-include $(BUILD_ROOT)/platform.mk
 
 
 APPTYPE := $(type)
@@ -67,7 +69,7 @@ C_OPT := $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) $(EXT_OP) --sy
 CPP_OPT := $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) $(EXT_OP) --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT)
 C_OPT_FILE := $(PLATFORM_INCS_FILE)
 
-OBJS := # 
+OBJS := #
 
 # Global C/C++
 ifeq ($(strip $(USER_ROOT)),)
@@ -107,7 +109,7 @@ $(APPFILE) : $(OBJS) $(UOBJS)
        @echo '  Building target: $@'
        @echo '  Invoking: C/C++ Linker'
        $(call MAKEDIRS,$(@D))
-       $(CXX) -o $(APPFILE) $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_ROOT)/.exportMap" $(RS_LIB_PATHS) $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration
+       $(CXX) -o $(APPFILE) $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_ROOT)/.exportMap" $(RS_LIB_PATHS) $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration
        @echo '  Finished building target: $@'
 endif
 ifeq ($(strip $(APPTYPE)),staticLib)
@@ -134,7 +136,7 @@ $(OBJ_OUTPUT) :
 $(OUTPUT_DIR) :
        $(call MAKEDIRS,$@)
 
-  
+
 ifneq ($(strip $(PLATFORM_INCS)),)
 $(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT)
        @echo '  Building inc file: $@'
@@ -143,7 +145,7 @@ ifneq ($(findstring 3.82,$(MAKE_VERSION)),)
        $(file > $@,$(PLATFORM_INCS))
 else
        @echo $(PLATFORM_INCS) > $@
-endif    
+endif
 else
        @echo $(PLATFORM_INCS) > $@
 endif
@@ -151,7 +153,11 @@ endif
 
 
 include $(BUILD_ROOT)/build_edc.mk
+
+#ifeq ($(strip $(ENVENTOR_SHARED_RES_PATH)),)
+ENVENTOR_SHARED_RES_PATH ?= $(ENVENTOR_PATH)/share/enventor
+#endif
+
 EDJ_FILES :=
 
 # Global EDCs
diff --git a/Build/platform.mk b/Build/platform.mk
new file mode 100644 (file)
index 0000000..294a38a
--- /dev/null
@@ -0,0 +1,15 @@
+# Add inputs and outputs from these tool invocations to the build variables
+
+SYSROOT = $(SBI_SYSROOT)
+
+USR_INCS := $(addprefix -I $(SYSROOT),$(PLATFORM_INCS_EX))
+
+ifeq ($(strip $(PLATFORM_LIB_PATHS)),)
+RS_LIB_PATHS := "$(SYSROOT)/usr/lib"
+else
+RS_LIB_PATHS := $(addprefix -L$(SYSROOT),$(PLATFORM_LIB_PATHS))
+endif
+
+RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX))
+
+PLATFORM_INCS = $(USR_INCS) -I"$(SDK_PATH)/library"
index 9df2a39..fded35b 100644 (file)
@@ -1,17 +1,5 @@
 # Add inputs and outputs from these tool invocations to the build variables
 
-ifeq ($(strip $(BUILD_CONFIG)),)
-BUILD_CONFIG = Debug
-endif
-
-ifneq ($(strip $(PROJROOT)),)
-PROJPATH := $(PROJROOT)
-endif
-
-ifeq ($(strip $(OUTPUT_DIR)),)
-OUTPUT_DIR := $(PROJPATH)/$(BUILD_CONFIG)
-endif
-
 ifneq ($(strip $(SHELL_BIN)),)
 SHELL = $(SHELL_BIN)
 else
@@ -73,4 +61,3 @@ MSGFMT = $(MSGFMT_BIN)
 else
 MSGFMT = msgfmt
 endif
-
index 505144a..b47f9a9 100644 (file)
@@ -45,7 +45,6 @@ pkg_check_modules(pkgs REQUIRED
        capi-content-media-content
        wallpaper-service
        core-samsung-log-client
-       edbus
        storage
 )
 ELSE()
@@ -62,7 +61,6 @@ pkg_check_modules(pkgs REQUIRED
        ui-gadget-1
        notification
        capi-content-media-content
-       edbus
        storage
 )
 ENDIF()
index 636f1f7..240392b 100644 (file)
@@ -26,7 +26,6 @@
 #include <Eina.h>
 #include <Evas.h>
 #include "wallpaper-ui-service-debug.h"
-#include <E_DBus.h>
 
 #define PKGNAME "wallpaper-ui-service"
 
@@ -68,10 +67,6 @@ typedef struct _wallpaper_ui_service_appdata {
        int preview_image_type;       /**< Image type from wallpaper_img_type */
     Evas_Object *gengrid;         /**< Gengrid object */
 
-    // DBus doesn't work any more in this case. Replace this in scope of TizenRefApp-6828
-       E_DBus_Connection *dbus_conn; /**< DBus connection handler */
-       E_DBus_Signal_Handler *dbus_home_button_handler; /**< DBus signal handler */
-
     char* last_preview_img_path;  /**< Path to last previewed image */
     char current_preview_img_path[MAX_LENGTH_LINE]; /**< Path to current system wallpaper */
        char saved_img_path[MAX_LENGTH_LINE]; /**< Path to new selected wallpaper */
index 8241984..29d6adb 100644 (file)
@@ -3,7 +3,7 @@
        <label>Wallpapers</label>\r
        <author email="sung1103.park@samsung.com" href="www.samsung.com">Sung park</author>\r
        <description>Wallpapers</description>\r
-       <ui-application appid="org.tizen.wallpaper-ui-service" exec="/usr/apps/org.tizen.wallpaper-ui-service/bin/wallpaper-ui-service" launch_mode="group" nodisplay="true" multiple="false" type="capp" taskmanage="false" process-pool="true" hw-acceleration="on">\r
+       <ui-application appid="org.tizen.wallpaper-ui-service" exec="/usr/apps/org.tizen.wallpaper-ui-service/bin/wallpaper-ui-service" launch_mode="single" nodisplay="true" multiple="false" type="capp" taskmanage="true" process-pool="true" hw-acceleration="on">\r
                <label>Wallpapers</label>\r
                <label xml:lang="as-in">ৱালপেপাৰসমূহ</label>\r
                <label xml:lang="bn-in">ওয়ালপেপারগুলি</label>\r
index ece28fc..04087df 100644 (file)
@@ -29,7 +29,6 @@ BuildRequires: pkgconfig(feedback)
 BuildRequires: pkgconfig(ui-gadget-1)
 BuildRequires: pkgconfig(notification)
 BuildRequires: pkgconfig(capi-content-media-content)
-BuildRequires: pkgconfig(edbus)
 BuildRequires: pkgconfig(storage)
 BuildRequires: cmake
 BuildRequires: edje-tools
index 56459da..f236e75 100644 (file)
@@ -9,13 +9,13 @@ type = app
 profile = mobile-3.0
 
 # C/CPP Sources
-USER_SRCS = src/wallpaper-ui-service.c src/wallpaper-ui-service-main.c 
+USER_SRCS = src/wallpaper-ui-service-main.c src/wallpaper-ui-service.c 
 
 # EDC Sources
 USER_EDCS =  
 
 # PO Sources
-USER_POS = res/po_sdk/en_US.po res/po_sdk/kk.po res/po_sdk/hi.po res/po_sdk/az.po res/po_sdk/pt_PT.po res/po_sdk/pt_BR.po res/po_sdk/ar.po res/po_sdk/ro.po res/po_sdk/ca.po res/po_sdk/hr.po res/po_sdk/ka.po res/po_sdk/sv.po res/po_sdk/is.po res/po_sdk/bg.po res/po_sdk/mk.po res/po_sdk/zh_TW.po res/po_sdk/fr.po res/po_sdk/lt.po res/po_sdk/en.po res/po_sdk/ru_RU.po res/po_sdk/uk.po res/po_sdk/hu.po res/po_sdk/gl.po res/po_sdk/nb.po res/po_sdk/it_IT.po res/po_sdk/en_PH.po res/po_sdk/fr_CA.po res/po_sdk/sr.po res/po_sdk/zh_HK.po res/po_sdk/el_GR.po res/po_sdk/ja_JP.po res/po_sdk/hy.po res/po_sdk/tr_TR.po res/po_sdk/de.po res/po_sdk/sl.po res/po_sdk/nl.po res/po_sdk/zh_CN.po res/po_sdk/da.po res/po_sdk/sk.po res/po_sdk/lv.po res/po_sdk/pl.po res/po_sdk/ga.po res/po_sdk/es_US.po res/po_sdk/ko_KR.po res/po_sdk/uz.po res/po_sdk/fi.po res/po_sdk/et.po res/po_sdk/cs.po res/po_sdk/es_ES.po res/po_sdk/eu.po 
+USER_POS = res/po_sdk/en_PH.po res/po_sdk/lt.po res/po_sdk/mk.po res/po_sdk/nb.po res/po_sdk/sl.po res/po_sdk/tr_TR.po res/po_sdk/ca.po res/po_sdk/fr.po res/po_sdk/nl.po res/po_sdk/sk.po res/po_sdk/az.po res/po_sdk/pt_PT.po res/po_sdk/sr.po res/po_sdk/ko_KR.po res/po_sdk/is.po res/po_sdk/ka.po res/po_sdk/fi.po res/po_sdk/eu.po res/po_sdk/kk.po res/po_sdk/es_ES.po res/po_sdk/uz.po res/po_sdk/hr.po res/po_sdk/uk.po res/po_sdk/zh_CN.po res/po_sdk/ro.po res/po_sdk/da.po res/po_sdk/en.po res/po_sdk/es_US.po res/po_sdk/hi.po res/po_sdk/ja_JP.po res/po_sdk/et.po res/po_sdk/ga.po res/po_sdk/lv.po res/po_sdk/ar.po res/po_sdk/hu.po res/po_sdk/de.po res/po_sdk/en_US.po res/po_sdk/it_IT.po res/po_sdk/ru_RU.po res/po_sdk/zh_HK.po res/po_sdk/el_GR.po res/po_sdk/bg.po res/po_sdk/zh_TW.po res/po_sdk/pt_BR.po res/po_sdk/sv.po res/po_sdk/cs.po res/po_sdk/fr_CA.po res/po_sdk/pl.po res/po_sdk/gl.po res/po_sdk/hy.po 
 
 # User Defines
 USER_DEFS = 
@@ -52,7 +52,7 @@ USER_EDCS_FONT_DIRS = ${OUTPUT_DIR} edje/fonts
 # EDC Flags
 USER_EXT_EDC_KEYS = EDC0 
 
-USER_EXT_EDC0_EDCS = res/edje/popup-wallpaper-macro.edc res/edje/button_customized_theme.edc res/edje/popup-wallpaper.edc res/edje/popup-wallpaper-main-view.edc res/edje/mutiple-wallpaper.edc res/edje/color_classes.edc 
+USER_EXT_EDC0_EDCS = res/edje/color_classes.edc res/edje/popup-wallpaper.edc res/edje/mutiple-wallpaper.edc res/edje/button_customized_theme.edc res/edje/popup-wallpaper-macro.edc res/edje/popup-wallpaper-main-view.edc 
 USER_EXT_EDC0_EDCS_IMAGE_DIRS = ${OUTPUT_DIR} edje/images 
 USER_EXT_EDC0_EDCS_SOUND_DIRS = ${OUTPUT_DIR} edje/sounds 
 USER_EXT_EDC0_EDCS_FONT_DIRS = ${OUTPUT_DIR} edje/fonts 
index a95d7aa..343c9c5 100644 (file)
 
 static bool flag_view_exist = false;
 
-#define DBUS_HOME_BUS_NAME "org.tizen.coreapps.home"
-#define DBUS_HOME_RAISE_PATH "/Org/Tizen/Coreapps/home/raise"
-#define DBUS_HOME_RAISE_INTERFACE DBUS_HOME_BUS_NAME".raise"
-#define DBUS_HOME_RAISE_MEMBER "homeraise"
 #define DEF_WALLPAPERS_PATH "/opt/share/settings/Wallpapers/"
 
 static bool _g_is_system_init = false;
@@ -244,91 +240,6 @@ HAPI int wallpaper_ui_service_copy_wallpaper_file(const char *source, char *dest
        return 1;
 }
 
-static void _wallpaper_dbus_destroy(void *data)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
-       ret_if(ad == NULL);
-
-       if (ad->dbus_conn) {
-               if (ad->dbus_home_button_handler) {
-                       e_dbus_signal_handler_del(ad->dbus_conn, ad->dbus_home_button_handler);
-                       ad->dbus_home_button_handler = NULL;
-               }
-               e_dbus_connection_close(ad->dbus_conn);
-               e_dbus_shutdown();
-
-               ad->dbus_conn = NULL;
-       }
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _wallpaper_dbus_init(void)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       e_dbus_init();
-
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _wallpaper_set_dbus_handler(void *data)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
-       ret_if(ad == NULL);
-
-
-       E_DBus_Connection *conn = NULL;
-
-       conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-       if (conn == NULL) {
-               WALLPAPERUI_ERR("e_dbus_bus_get() failed");
-               return;
-       }
-
-       ad->dbus_conn = conn;
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _home_button_clicked_cb(void *data, DBusMessage *msg)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
-       ret_if(ad == NULL);
-
-       WALLPAPERUI_ERR("Destroy wallpaper");
-       ui_app_exit();
-
-       WALLPAPERUI_TRACE_END;
-}
-
-static void _wallpaper_register_home_button_cb(void *data)
-{
-       WALLPAPERUI_TRACE_BEGIN;
-
-       wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
-       ret_if(ad == NULL);
-       ret_if(ad->dbus_conn == NULL);
-
-       E_DBus_Signal_Handler *handler = NULL;
-
-       handler = e_dbus_signal_handler_add(ad->dbus_conn, NULL, "/Org/Tizen/Coreapps/home/raise",
-                                       "org.tizen.coreapps.home.raise", "homeraise",
-                                       _home_button_clicked_cb, ad);
-       if (handler == NULL) {
-               WALLPAPERUI_ERR("e_dbus_signal_handler_add() failed");
-               _wallpaper_dbus_destroy(ad);
-               return;
-       }
-       ad->dbus_home_button_handler = handler;
-
-       WALLPAPERUI_TRACE_END;
-}
-
 void *_register_view(app_control_h service, void *data)
 {
        WALLPAPERUI_TRACE_BEGIN;
@@ -353,7 +264,6 @@ static void _app_terminate(void *data)
        wallpaper_ui_service_appdata *ad = data;
 
 
-       _wallpaper_dbus_destroy(data);
        _essential_system_db_destroy();
        WALLPAPERUI_DBG("fingerprint_manager_terminate!");
        _wallpaper_db_destroy();
@@ -465,10 +375,6 @@ static void _app_control(app_control_h service, void *data)
                flag_view_exist = true;
        }
 
-       _wallpaper_dbus_init();
-       _wallpaper_set_dbus_handler(ad);
-       _wallpaper_register_home_button_cb(ad);
-
        WALLPAPERUI_TRACE_END;
 }
 
index bf3e123..c1def6d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.wallpaper-ui-service" version="1.0.0">
     <profile name="mobile"/>
-    <ui-application appid="org.tizen.wallpaper-ui-service" exec="wallpaper-ui-service" hw-acceleration="on" launch_mode="group" multiple="false" nodisplay="true" taskmanage="false" type="capp" process-pool="true">
+    <ui-application appid="org.tizen.wallpaper-ui-service" exec="wallpaper-ui-service" hw-acceleration="on" launch_mode="single" multiple="false" nodisplay="true" process-pool="true" taskmanage="true" type="capp">
         <label>Wallpapers</label>
         <label xml:lang="as-in">ৱালপেপাৰসমূহ</label>
         <label xml:lang="bn-in">ওয়ালপেপারগুলি</label>
         <icon>wallpaper-ui-service.png</icon>
     </ui-application>
     <privileges>
-        <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
-        <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
         <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
         <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
         <privilege>http://tizen.org/privilege/externalstorage</privilege>
     </privileges>
 </manifest>