e_policy_wl: provides tizen_launch_appinfo interface as default 73/218573/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Mon, 25 Nov 2019 23:27:33 +0000 (08:27 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Mon, 25 Nov 2019 23:28:51 +0000 (08:28 +0900)
Change-Id: I90efc2569d594ce38591963e77c452a6420f4873
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_policy_wl.c

index 8318e99262bd0247ceefb02938a232e88e45e93c..b091d268595d908c52f93c82aa8597305cb4ac38 100644 (file)
@@ -6725,23 +6725,28 @@ _tzlaunch_appinfo_iface_cb_set_appid(struct wl_client *client, struct wl_resourc
         return;
      }
 
-   // 1. send HOOK with pid
-   _e_policy_wl_hook_call(E_POLICY_WL_HOOK_BASE_OUTPUT_RESOLUTION_GET, pid);
-   // 2. module must set the base_output_resolution.
-   if (!e_appinfo_base_output_resolution_get(epai, &width, &height))
+   /* about base  output resolution */
+   if (e_config->configured_output_resolution.use)
      {
-        ELOGF("TZ_APPINFO", "failed to set base_output_resolution in module, pid:%u, appid:%s", NULL, pid, appid);
-        return;
-     }
-   // 3. server has to get the base_screern_resolution via e_appinfo_base_output_resolution_get.
-   //    3-1. if success, use the base_rescreen_resolution
-   //    3-2. if fail, get the base_output_resolution from the E_Comp_Wl_Output.
 
-   // 4. send output.
-   if (!e_comp_wl_pid_output_configured_resolution_send(pid, width, height))
-     {
-        ELOGF("TZ_APPINFO", "failed to send output_configured_resolution, pid:%u, appid:%s", NULL, pid, appid);
-        return;
+        // 1. send HOOK with pid
+        _e_policy_wl_hook_call(E_POLICY_WL_HOOK_BASE_OUTPUT_RESOLUTION_GET, pid);
+        // 2. module must set the base_output_resolution.
+        if (!e_appinfo_base_output_resolution_get(epai, &width, &height))
+          {
+             ELOGF("TZ_APPINFO", "failed to set base_output_resolution in module, pid:%u, appid:%s", NULL, pid, appid);
+             return;
+          }
+        // 3. server has to get the base_screern_resolution via e_appinfo_base_output_resolution_get.
+        //    3-1. if success, use the base_rescreen_resolution
+        //    3-2. if fail, get the base_output_resolution from the E_Comp_Wl_Output.
+
+        // 4. send output.
+        if (!e_comp_wl_pid_output_configured_resolution_send(pid, width, height))
+          {
+             ELOGF("TZ_APPINFO", "failed to send output_configured_resolution, pid:%u, appid:%s", NULL, pid, appid);
+             return;
+          }
      }
 
    return;
@@ -6898,24 +6903,26 @@ _tzlaunch_appinfo_iface_cb_ready_metadata(struct wl_client *client, struct wl_re
    e_appinfo_ready_metadata(epai, pid);
 
    /* about base  output resolution */
-
-   // 1. send HOOK with pid
-   _e_policy_wl_hook_call(E_POLICY_WL_HOOK_BASE_OUTPUT_RESOLUTION_GET, pid);
-   // 2. module must set the base_output_resolution.
-   if (!e_appinfo_base_output_resolution_get(epai, &width, &height))
+   if (e_config->configured_output_resolution.use)
      {
-        ELOGF("TZ_APPINFO", "failed to set base_output_resolution in module, pid:%u, appid:%s", NULL, pid, appid);
-        return;
-     }
-   // 3. server has to get the base_screern_resolution via e_appinfo_base_output_resolution_get.
-   //    3-1. if success, use the base_rescreen_resolution
-   //    3-2. if fail, get the base_output_resolution from the E_Comp_Wl_Output.
+        // 1. send HOOK with pid
+        _e_policy_wl_hook_call(E_POLICY_WL_HOOK_BASE_OUTPUT_RESOLUTION_GET, pid);
+        // 2. module must set the base_output_resolution.
+        if (!e_appinfo_base_output_resolution_get(epai, &width, &height))
+          {
+             ELOGF("TZ_APPINFO", "failed to set base_output_resolution in module, pid:%u, appid:%s", NULL, pid, appid);
+             return;
+          }
+        // 3. server has to get the base_screern_resolution via e_appinfo_base_output_resolution_get.
+        //    3-1. if success, use the base_rescreen_resolution
+        //    3-2. if fail, get the base_output_resolution from the E_Comp_Wl_Output.
 
-   // 4. send output.
-   if (!e_comp_wl_pid_output_configured_resolution_send(pid, width, height))
-     {
-        ELOGF("TZ_APPINFO", "failed to send output_configured_resolution, pid:%u, appid:%s", NULL, pid, appid);
-        return;
+        // 4. send output.
+        if (!e_comp_wl_pid_output_configured_resolution_send(pid, width, height))
+          {
+             ELOGF("TZ_APPINFO", "failed to send output_configured_resolution, pid:%u, appid:%s", NULL, pid, appid);
+             return;
+          }
      }
 }
 
@@ -7707,17 +7714,14 @@ e_policy_wl_defer_job(void)
         polwl->globals = eina_list_append(polwl->globals, global);
      }
 
-   if (e_config->configured_output_resolution.use)
-     {
-        global = wl_global_create(e_comp_wl->wl.disp,
-                                  &tizen_launch_appinfo_interface,
-                                  1,
-                                  NULL,
-                                  _tzlaunch_appinfo_cb_bind);
-        EINA_SAFETY_ON_NULL_GOTO(global, err);
+   global = wl_global_create(e_comp_wl->wl.disp,
+                             &tizen_launch_appinfo_interface,
+                             1,
+                             NULL,
+                             _tzlaunch_appinfo_cb_bind);
+   EINA_SAFETY_ON_NULL_GOTO(global, err);
 
-        polwl->globals = eina_list_append(polwl->globals, global);
-     }
+   polwl->globals = eina_list_append(polwl->globals, global);
 
    return EINA_TRUE;