merge differences between tizen and tizen_3.0 43/95243/1 accepted/tizen/3.0/common/20161114.081845 accepted/tizen/3.0/mobile/20161103.044559 accepted/tizen/3.0/tv/20161103.044620 accepted/tizen/3.0/wearable/20161103.044639 submit/tizen_3.0/20161103.005057 submit/tizen_3.0_common/20161110.084657
authorchangjoo.lee <changjoo.lee@samsung.com>
Wed, 2 Nov 2016 13:42:37 +0000 (22:42 +0900)
committerchangjoo.lee <changjoo.lee@samsung.com>
Wed, 2 Nov 2016 13:43:08 +0000 (22:43 +0900)
Change-Id: I720932e6567ca2ba3d5a235b7c5f7127acbd38ec
Signed-off-by: changjoo.lee <changjoo.lee@samsung.com>
CMakeLists.txt
src/power/power.c
src/powerkey/powerkey-wearable.c

index 77c3e72..0112867 100644 (file)
@@ -24,9 +24,6 @@ IF(PROFILE STREQUAL wearable)
        OPTION(PROFILE_WEARABLE "Wearable device" ON)
        ADD_DEFINITIONS("-DPROFILE_WEARABLE=\"${PROFILE_WEARABLE}\"")
 ENDIF()
-IF(PROFILE STREQUAL tv)
-       OPTION(PROFILE_TV "TV device" ON)
-ENDIF()
 
 SET(COMMON_DIR "${CMAKE_SOURCE_DIR}/src/common")
 SET(COMMON_SRCS
index 8f2ccff..b98986a 100755 (executable)
@@ -21,6 +21,8 @@
 #include "popup-common.h"
 
 #define APP_PID       "_APP_PID_"
+#define APP_COMM      "_APP_COMM_"
+#define REQ_ID        "_REQUEST_ID_"
 
 #define DBUS_POWER_PATH "/Org/Tizen/System/DeviceD/Power"
 #define DBUS_POWER_IFACE "org.tizen.system.deviced.power"
@@ -28,6 +30,7 @@
 
 static const struct popup_ops power_lock_expired_ops;
 static bool signal_broadcasted;
+static char *request_id;
 
 enum button_selected {
        ALLOW_APP,
@@ -38,19 +41,20 @@ static void send_result_dbus_signal(int result)
 {
        int ret;
        char buf[8];
-       char *param[1];
+       char *param[2];
 
        if (signal_broadcasted)
                return;
 
        signal_broadcasted = true;
 
+       param[0] = request_id;
        snprintf(buf, sizeof(buf), "%d", result);
-       param[0] = buf;
+       param[1] = buf;
        ret = broadcast_dbus_signal(DBUS_POWER_PATH,
                        DBUS_POWER_IFACE,
                        METHOD_POWER_LOCK_EXPIRED,
-                       "i", param);
+                       "si", param);
        if (ret < 0)
                _E("FAIL: broadcast_dbus_signal(%d)", ret);
 }
@@ -77,12 +81,21 @@ static int power_lock_expired_get_content(const struct popup_ops *ops, char *con
                return -ENOENT;
        }
 
+       request_id = (char *)bundle_get_val(obj->b, REQ_ID);
+       if (!request_id) {
+               _E("Failed to get request id");
+               return -ENOENT;
+       }
+
        pid = atoi(pid_str);
        ret = app_manager_get_app_id(pid, &name);
        if (ret != APP_MANAGER_ERROR_NONE) {
-               _E("Failed to get app name(%d)", ret);
+               name = (char *)bundle_get_val(obj->b, APP_COMM);
+               if (!name) {
+                       _E("Failed to get app command");
                return -ENOENT;
        }
+       }
 
        text = _("\"%s\" is using too much battery power. Close \"%s\" ?");
 
index aea74a7..f92c6f1 100755 (executable)
@@ -360,7 +360,7 @@ create_list_view(appdata_s *application_info, const struct popup_ops *ops)
        ptc->item_style = "padding";
        ptc->func.del = NULL;
 
-       utc->item_style = "1text.1icon.1";
+       utc->item_style = "1text.1icon";
        utc->func.text_get = _gl_menu_text_get_airplane;
        utc->func.content_get = _gl_menu_contents_get_airplane;
        utc->func.del = NULL;