Change below packages for common profile 89/232489/6 accepted/tizen/unified/20200508.045048 accepted/tizen/unified/20200510.220435 submit/tizen/20200507.081208 submit/tizen/20200508.011754 submit/tizen/20200508.055810
authorlokilee73 <changjoo.lee@samsung.com>
Wed, 6 May 2020 01:36:20 +0000 (10:36 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Thu, 7 May 2020 09:40:18 +0000 (18:40 +0900)
1. Add system-syspopup
  - Add usb and cool-down image
2. Modify powerkey-popup
  - To compile and install properly
  - Distinguish images for mobile and common

Change-Id: I02c39ed782b75142892660aaed1c8955994717f7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
packaging/system-servant.spec
src/CMakeLists.txt
src/powerkey/CMakeLists.txt
src/powerkey/powerkey-mobile.c

index f59489c..6c57c7b 100644 (file)
@@ -50,6 +50,7 @@ and service file for dbus activation
 Summary:       System-servant configured for common profile
 Provides:      system-servant-compat = %{version}-%{release}
 Requires:      org.tizen.powerkey-syspopup.common
+Requires:      org.tizen.system-syspopup.common
 Conflicts:     system-servant-profile_mobile
 Conflicts:     system-servant-extension-rectangle-profile_wearable
 Conflicts:     system-servant-extension-circle-profile_wearable
@@ -192,6 +193,15 @@ Requires:   %{name} = %{version}-%{release}
 to inform user system information. It is activated
 when system event is happend
 
+%package -n org.tizen.system-syspopup.common
+Summary:    System popup application
+Group:      System/Utilities
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.system-syspopup.common
+to inform user system information. It is activated
+when system event is happend
+
 %prep
 %setup -q
 
@@ -355,7 +365,7 @@ pushd build_common
                -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
                -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
                -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
-               -DNOTIFICATION_SERVICE=off
+               -DNOTIFICATION_SERVICE=on
 
 make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
@@ -364,7 +374,16 @@ popd
 
 mkdir -p profile_common
 mkdir -p profile_common/%{_bindir}
+mkdir -p profile_common/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin
+mkdir -p profile_common/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res
+mkdir -p profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+mkdir -p profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin
 mv %{buildroot}/%{_bindir}/sysapp-launcher profile_common/%{_bindir}/sysapp-launcher.common
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.common
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj profile_common/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup profile_common/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.common
 
 %install
 pushd build_common
@@ -408,6 +427,11 @@ install -m 0755 cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/
 
 #for common profile
 install -m 0755 profile_common/%{_bindir}/* %{buildroot}/%{_bindir}
+mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
+install -m 0755 profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.common %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.common
+install -m 0755 profile_common/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.common %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.common
+install -m 0644 profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png
+install -m 0644 profile_common/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png
 
 # This is not used. (mobile/wearable has its own postfixed version)
 rm %{buildroot}%{_bindir}/sysapp-launcher
@@ -444,9 +468,10 @@ mv /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable /%{T
 # correct system-servant kept, you need to reinstall system-servant after
 # uninstalling profile_common
 mv /%{_bindir}/sysapp-launcher.common /%{_bindir}/sysapp-launcher
+mv /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.common /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
 
 %post -n org.tizen.powerkey-syspopup.common
-mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.common /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
 
 %post -n org.tizen.powerkey-syspopup.mobile
 mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
@@ -556,6 +581,8 @@ mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %{_bindir}/sysapp-launcher.common
+%{_datadir}/system-apps/res/icons/usb_icon.png
+%{_datadir}/system-apps/res/icons/noti_cooling_down.png
 
 %files -n org.tizen.crash-syspopup
 %manifest org.tizen.crash-syspopup.manifest
@@ -585,6 +612,14 @@ mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{
 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/circle_btn_delete.png
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
 
+%files -n org.tizen.system-syspopup.common
+%manifest org.tizen.system-syspopup.manifest
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.common
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
+%{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
+
 %files -n org.tizen.powerkey-syspopup.wearable
 %manifest org.tizen.powerkey-syspopup.manifest
 %license LICENSE.Apache-2.0
@@ -601,7 +636,7 @@ mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{
 %manifest org.tizen.powerkey-syspopup.manifest
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.common
 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png
 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.powerkey-syspopup.xml
index 2770a1f..8db0f22 100644 (file)
@@ -11,8 +11,10 @@ IF(PROFILE_WEARABLE)
        SET(SRCS ${SRCS} storage/lowstorage-wearable.c)
        SET(SRCS ${SRCS} cooldown/cooldown-wearable.c)
        SET(SRCS ${SRCS} power/power.c)
-ELSEIF(PROFILE_MOBILE)
-       SET(SRCS ${SRCS} battery/battery-mobile.c)
+ELSEIF(PROFILE_MOBILE OR PROFILE_COMMON)
+       IF(PROFILE STREQUAL mobile)
+               SET(SRCS ${SRCS} battery/battery-mobile.c)
+       ENDIF()
        SET(SRCS ${SRCS} storage/lowstorage-mobile.c)
        SET(SRCS ${SRCS} cooldown/cooldown-mobile.c)
        SET(SRCS ${SRCS} mmc/mmc-mobile.c)
@@ -70,7 +72,7 @@ ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
 ADD_DEFINITIONS("-DSYSTEM_RES=\"${SYSTEM_RES}\"")
 #USB POPUP
-IF(PROFILE_MOBILE)
+IF(PROFILE_MOBILE OR PROFILE_COMMON)
        ADD_DEFINITIONS("-DELM_USB_EDC=\"${SYSTEM_RES}/usb-popup.edj\"")
 ENDIF()
 #COOLDOWN POPUP
@@ -87,7 +89,7 @@ TARGET_LINK_LIBRARIES(${PACKAGE} syspopup ${system_pkgs_LDFLAGS})
 INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
 
 #USB POPUP
-IF(PROFILE_MOBILE)
+IF(PROFILE_MOBILE OR PROFILE_COMMON)
        ADD_CUSTOM_TARGET(usb-popup.edj
                COMMAND edje_cc -no-save ${CMAKE_SOURCE_DIR}/src/usb/usb-popup.edc ${CMAKE_BINARY_DIR}/usb-popup.edj
                DEPENDS ${CMAKE_SOURCE_DIR}/src/usb/usb-popup.edc
index fd13ba6..97773de 100644 (file)
@@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 IF(PROFILE_WEARABLE)
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-wearable.c)
-ELSEIF(PROFILE_MOBILE)
+ELSEIF(PROFILE_MOBILE OR PROFILE_COMMON)
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-mobile.c)
 ELSE()
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-tv.c)
@@ -75,7 +75,7 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/gear_device_options_bg.png DESTINATION ${
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/gear_device_options_power_off.png DESTINATION ${RESDIR})
 ENDIF()
 
-IF(PROFILE STREQUAL mobile)
+IF(PROFILE STREQUAL mobile OR PROFILE STREQUAL common)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/core_power_off.png DESTINATION ${RESDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/core_restart.png DESTINATION ${RESDIR})
 ENDIF()
index 44e4132..9502a8b 100644 (file)
@@ -131,6 +131,13 @@ static Evas_Object* gl_image_get_cb(void *data, Evas_Object *obj, const char *pa
        Evas_Object *check;
        int index = (int) data;
        Evas_Coord w, h;
+#ifdef PROFILE_MOBILE
+       const char *elm_icon = "elm.swallow.icon";
+       const char *elm_end = "elm.swallow.icon.end";
+#else
+       const char *elm_icon = "elm.icon";
+       const char *elm_end = "elm.end";
+#endif
 
        if (!img) {
                _E("BAD image.");
@@ -139,26 +146,26 @@ static Evas_Object* gl_image_get_cb(void *data, Evas_Object *obj, const char *pa
 
        switch (index) {
        case 0:
-               if (!strncmp(part, "elm.swallow.icon", sizeof("elm.swallow.icon"))) {
+               if (!strcmp(part, elm_icon)) {
                        elm_image_file_set(img, RESDIR"/core_power_off.png", NULL);
                        elm_image_object_size_get(img, &w, &h);
                        evas_object_size_hint_min_set(img, w, h);
                        _D("Power off img.");
                        return img;
-               } else if (!strncmp(part, "elm.swallow.icon.end", sizeof("elm.swallow.icon.end"))) {
+               } else if (!strcmp(part, elm_end)) {
                        check = elm_check_add(obj);
                        return check;
                } else
                        return NULL;
 
        case 1:
-               if (!strncmp(part, "elm.swallow.icon", sizeof("elm.swallow.icon"))) {
+               if (!strcmp(part, elm_icon)) {
                        elm_image_file_set(img, RESDIR"/core_restart.png", NULL);
                        elm_image_object_size_get(img, &w, &h);
                        evas_object_size_hint_min_set(img, w, h);
                        _D("Restart img.");
                        return img;
-               } else if (!strncmp(part, "elm.swallow.icon.end", sizeof("elm.swallow.icon.end"))) {
+               } else if (!strcmp(part, elm_end)) {
                        check = elm_check_add(obj);
                        return check;
                } else
@@ -231,7 +238,11 @@ int powerkey_list(bundle *b, const struct popup_ops *ops)
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
        itc = elm_genlist_item_class_new();
+#ifdef PROFILE_MOBILE
        itc->item_style = "type1";
+#else
+       itc->item_style = "1line";
+#endif
        itc->func.text_get = gl_text_get_cb;
        itc->func.content_get = gl_image_get_cb;
        itc->func.state_get = NULL;