Bug fix for TIVI-1002 62/3962/1 2.0alpha-wayland
authorNakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
Wed, 12 Jun 2013 07:38:38 +0000 (16:38 +0900)
committerNakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
Wed, 12 Jun 2013 07:39:38 +0000 (16:39 +0900)
Change-Id: I55601cedf0b4cf3c1366c202f841d9deaca158c8
Signed-off-by: Nakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
13 files changed:
apps_controller/ico_syc_apc_control.c
apps_controller/ico_syc_apc_regulation.c
ico-app-framework/ico_uxf_init.c
ico-app-framework/ico_uxf_launcher.c
ico-app-framework/ico_uxf_private.h
ico-app-framework/ico_uxf_window.c
include/ico_uxf_proto.h
packaging/ico-uxf-HomeScreen.changes
packaging/ico-uxf-HomeScreen.spec
res/config/system.conf
src/home_screen_main.c
start_homescreen_appcore
test/ico_set_vehicleinfo.c

index 9193b59..1abf43c 100644 (file)
@@ -2204,7 +2204,10 @@ request_timer(void *user_data)
         p = soundzone[i].req;
         while (p)   {
             if (p->timer > 0)   {
-                p->timer --;
+                if (p->timer >= ICO_APC_REQREPLY_INTERVAL)
+                    p->timer -= ICO_APC_REQREPLY_INTERVAL;
+                else
+                    p->timer = 0;
                 apfw_trace("request_timer: soundzone[%d] timer(%d)", i, p->timer);
                 if (p->timer == 0)  {
                     apfw_trace("request_timer: sound timedout(%s %d %d prio=%08x)",
index 3a11a4a..24d67aa 100644 (file)
@@ -358,10 +358,11 @@ rule_engine_wake(void *user_data)
             break;
         case ICO_UXF_POLICY_SHIFT_PARKING:
             if ((VehicleSpeed < ICO_SYC_APC_REGULATION_SPEED_RUNNING) &&
-                (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING))
-                wkcontrol[idx].display = ICO_SYC_APC_REGULATION_REGULATION;
-            else
+                ((ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING) ||
+                 (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_NEUTRALS)))
                 wkcontrol[idx].display = ICO_SYC_APC_REGULATION_NOREGULATION;
+            else
+                wkcontrol[idx].display = ICO_SYC_APC_REGULATION_REGULATION;
             break;
         case ICO_UXF_POLICY_SHIFT_REVERSES:
             if (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_REVERSES)
@@ -406,7 +407,9 @@ rule_engine_wake(void *user_data)
                 wkcontrol[idx].sound = ICO_SYC_APC_REGULATION_NOREGULATION;
             break;
         case ICO_UXF_POLICY_SHIFT_PARKING:
-            if (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING)
+            if ((VehicleSpeed < ICO_SYC_APC_REGULATION_SPEED_RUNNING) &&
+                ((ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING) ||
+                 (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_NEUTRALS)))
                 wkcontrol[idx].sound = ICO_SYC_APC_REGULATION_NOREGULATION;
             else
                 wkcontrol[idx].sound = ICO_SYC_APC_REGULATION_REGULATION;
@@ -454,7 +457,9 @@ rule_engine_wake(void *user_data)
                 wkcontrol[idx].input = ICO_SYC_APC_REGULATION_NOREGULATION;
             break;
         case ICO_UXF_POLICY_SHIFT_PARKING:
-            if (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING)
+            if ((VehicleSpeed < ICO_SYC_APC_REGULATION_SPEED_RUNNING) &&
+                ((ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_PARKING) ||
+                 (ShiftPosition == ICO_SYC_APC_REGULATION_SHIFT_NEUTRALS)))
                 wkcontrol[idx].input = ICO_SYC_APC_REGULATION_NOREGULATION;
             else
                 wkcontrol[idx].input = ICO_SYC_APC_REGULATION_REGULATION;
index 8f892ae..aa2a46a 100644 (file)
@@ -156,6 +156,8 @@ ico_uxf_init(const char *name)
     gIco_Uxf_Api_Mng.WaylandFd = -1;
     gIco_Uxf_Api_Mng.Wayland_Display = NULL;
     gIco_Uxf_Api_Mng.InitTimer = ICO_UXF_SUSP_INITTIME;
+    gIco_Uxf_Api_Mng.Win_Show_Anima = 1;
+    gIco_Uxf_Api_Mng.Win_Hide_Anima = 1;
 
     /* read configurations */
     sysconf = (Ico_Uxf_Sys_Config *)ico_uxf_getSysConfig();
index 902cf9f..9b931ed 100644 (file)
@@ -47,7 +47,6 @@ ico_uxf_process_execute(const char *name)
 {
     Ico_Uxf_Mng_Process *proc;              /* process management table         */
     int         hash;
-    bundle      *appBundle = NULL;
     Ico_Uxf_conf_application    *apptbl = NULL;
 
     uifw_trace("ico_uxf_process_execute: Enter(%s)", name);
@@ -83,29 +82,8 @@ ico_uxf_process_execute(const char *name)
     proc->attr.status = ICO_UXF_PROCSTATUS_INIT;
     ico_uxf_leave_critical();               /* leave critical section           */
 
-    /* setup option */
-    appBundle = bundle_create();
-    apptbl = (Ico_Uxf_conf_application *)ico_uxf_getAppByAppid(name);
-    if ((appBundle != NULL) && (apptbl != NULL))    {
-        char *opt = strdup(apptbl->exec);
-        char *key = strtok(opt, " ");
-        char *val = NULL;
-        while (key != NULL) {
-            key = strtok(NULL, " ");
-            val = strtok(NULL, " ");
-            if ((key != NULL) && (val != NULL))    {
-                bundle_add(appBundle, key, val);
-                uifw_trace("ico_uxf_process_execute: option(key=%s, val=%s)", key, val);
-            }
-        }
-        free(opt);
-    }
-
     /* execute program                      */
-    proc->attr.internalid = aul_launch_app(name ,appBundle);
-    if (appBundle != NULL) {
-        bundle_free(appBundle);
-    }
+    proc->attr.internalid = aul_launch_app(name , NULL);
     if (proc->attr.internalid < 0)  {
         uifw_error("ico_uxf_process_execute: Leave(ENOSYS), Launch App Error(%d)",
                    proc->attr.internalid);
index 191a964..2a2949e 100644 (file)
@@ -114,6 +114,8 @@ typedef struct  _Ico_Uxf_Api_Mng    {
     int                     EventMask;      /* receive event                        */
     unsigned int            LastEvent;      /* last receive event(end synchronization)*/
     int                     AppsCtlVisible; /* Tempolary visible all windows        */
+    short                   Win_Show_Anima; /* Window animation at show             */
+    short                   Win_Hide_Anima; /* Window animation at hide             */
     int                     NeedTimer;      /* need timer control                   */
     int                     InitTimer;      /* initial timer                        */
 
index 49c8a26..8e39616 100644 (file)
@@ -683,11 +683,20 @@ ico_uxf_window_control(const char *appid, const int winidx,
                         else                                            newcontrol = 1;
                     }
                     /* request to Weston(Multi Window Manager)  */
-                    ico_uxf_window_visible_control(
-                            winmng,
-                            (newcontrol != 0) ? ICO_WINDOW_MGR_VISIBLE_HIDE_ANIMATION :
-                                                ICO_WINDOW_MGR_VISIBLE_SHOW_ANIMATION,
-                            ICO_WINDOW_MGR_RAISE_NOCHANGE);
+                    if (newcontrol == 0)    {
+                        if (gIco_Uxf_Api_Mng.Win_Show_Anima)
+                            i = ICO_WINDOW_MGR_VISIBLE_SHOW_ANIMATION;
+                        else
+                            i = ICO_WINDOW_MGR_VISIBLE_SHOW;
+                    }
+                    else    {
+                        if (gIco_Uxf_Api_Mng.Win_Hide_Anima)
+                            i = ICO_WINDOW_MGR_VISIBLE_HIDE_ANIMATION;
+                        else
+                            i = ICO_WINDOW_MGR_VISIBLE_HIDE;
+                    }
+                    ico_uxf_window_visible_control(winmng, i,
+                                                   ICO_WINDOW_MGR_RAISE_NOCHANGE);
                 }
             }
             uifw_trace("ico_uxf_window_control: Leave(EOK) control=%x(%d) visible=%d",
@@ -700,6 +709,28 @@ ico_uxf_window_control(const char *appid, const int winidx,
 
 /*--------------------------------------------------------------------------*/
 /**
+ * @brief   ico_uxf_window_control: target window control from AppsController
+ *
+ * @param[in]   control     Control Target(0=Hide/1=Show)
+ * @param[in]   animation   Animation(0=Without Animation/1=With Animation)
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+ICO_APF_API void
+ico_uxf_window_animation_control(const int control, const int animation)
+{
+    uifw_trace("ico_uxf_window_animation_control: %s to %s",
+        control ? "Show" : "Hide", animation ? "Animation" : "No Animation");
+    if (control)    {
+        gIco_Uxf_Api_Mng.Win_Show_Anima = animation;
+    }
+    else    {
+        gIco_Uxf_Api_Mng.Win_Hide_Anima = animation;
+    }
+}
+
+/*--------------------------------------------------------------------------*/
+/**
  * @brief   ico_uxf_window_show: show a target window
  *          if target window's state is visible, do nothing and return success
  *
index c03063e..6e6a298 100644 (file)
@@ -81,6 +81,8 @@ int ico_uxf_window_active(const int window, const int target);
                                         /* Activate window                      */
 int ico_uxf_window_animation(const int window, const char *animation, const int time);
                                         /* Set window animation                 */
+void ico_uxf_window_animation_control(const int control, const int animation);
+                                        /* Set animation control                */
 int ico_uxf_window_control(const char *appid, const int winidx,
                            const int control, const int onoff);
                                         /* Window visible control from AppsController*/
index 51d68e3..64fdd83 100644 (file)
@@ -1,3 +1,14 @@
+* Wed Jun 12 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/2.0alpha-wayland/20130612.051552@7006a0f
+- 0.3.07 release
+- Fix for TIVI-1002 - [WLD] Entertainment.Visual APP doesn't stop the audio play and show the window while vehicle speed>=4
+  The spelling of the category name that defined in configuration file(/opt/apps/org.tizen.ico.homescreen/res/config/system.conf) was wrong with "Entertainment.visiual".
+  A judgment logic had an error about the control of the sound by the run regulation.
+- fix for - Run regulation was it in an error in a judgment logic of the run regulation about shift_back (e.g., a application category of Camera.back).
+- fix for - A definition of category CarSetting was wrong in configuration.
+- Add an transition of the fading at the time of a change of the application screen.
+- Appoint that more than ico-uxf-weston-plugin-0.5.06 are necessary for spec file.
+- Delete logic of setting argment when Homescreen launch a application
+
 * Wed Jun 12 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130606.173158@c36bbb6
 - 0.3.06 release
 - Fix for TIVI-840 - [WLD] Nothing rendered when launching Contacts app 
index f8ceb0a..e22bb81 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ico-uxf-HomeScreen
 Summary:    sample homescreen
-Version:    0.3.06
+Version:    0.3.07
 Release:    1.1
 Group:         TO_BE/FILLED_IN
 License:    Apache License, Version 2.0
index f50eeae..5759918 100644 (file)
@@ -108,9 +108,9 @@ soundpluginport=8088
 3.priority=2
 4=CarSetting
 4.type=maker
-4.view=parked
-4.sound=parked
-4.input=parked
+4.view=shift_park
+4.sound=shift_park
+4.input=shift_park
 4.priority=2
 5=Camera.Back
 5.type=maker
@@ -142,7 +142,7 @@ soundpluginport=8088
 9.sound=always
 9.input=always
 9.priority=0
-10=Entertainment.visiual
+10=Entertainment.visual
 10.type=unknown
 10.view=always
 10.sound=parked
@@ -163,7 +163,7 @@ soundpluginport=8088
 3=SysApp.audio
 3.privilege=system.audio
 3.priority=3
-4=SysApp.visiual
+4=SysApp.visual
 4.privilege=system.visible
 4.priority=3
 5=Maker
index 19c84e6..ac15142 100644 (file)
@@ -467,6 +467,18 @@ hs_show_appscreen(const char *appid)
     int sid;
 
     uifw_trace("hs_show_appscreen: Enter(appid=%s)", appid ? appid : "(NULL)");
+
+    if (hs_stat_touch == ICO_HS_TOUCH_IN_HIDE)  {
+        /* if it is the transition from an application screen to        */
+        /* an other application screen, perform animation at hide screen*/
+        ico_uxf_window_animation_control(0, 1);
+    }
+    else    {
+        /* if it is the transition from menu to an application screen,  */
+        /* do not perform animation at hide appllication screen         */
+        ico_uxf_window_animation_control(0, 0);
+    }
+
     /* change to noraml mode for AppsControler  */
     ico_uxf_window_control(NULL, -1, ICO_UXF_APPSCTL_TEMPVISIBLE, 0);
 
@@ -615,6 +627,7 @@ hs_show_appscreen(const char *appid)
         }
     }
     hs_stat_touch = ICO_HS_TOUCH_IN_HIDE;
+    ico_uxf_window_animation_control(0, 1);     /* change hide animation to default */
     ico_uxf_main_loop_iterate();
 
     uifw_trace("hs_show_appscreen: Leave");
index e68f40d..c86a240 100755 (executable)
@@ -50,9 +50,9 @@ if [ "$?" = "1" ] ; then
 fi
 
 # 5 start sample wayland client for display cursor
-sync;sync
-/usr/bin/nice -19 /usr/bin/wayland-smoke &
-sleep 0.3
+#sync;sync
+#/usr/bin/nice -19 /usr/bin/wayland-smoke &
+#sleep 0.3
 
 # 6 start app core daemon
 /bin/ps ax | /bin/grep launchpad_preloading_preinitializing_daemon | /bin/grep -v grep > /dev/null
index f55fda5..bdc93d7 100644 (file)
@@ -39,6 +39,7 @@
 #define TYPE_UINT32 6
 #define TYPE_DOUBLE 7
 #define TYPE_STRING 8
+#define TYPE_SHIFT  12
 
 #if     LWS_INTERFACE > 0               /* WebSocket Interface              */
 #define LWS_DEFAULTIP       "127.0.0.1" /* websockets default ip(localhost) */
@@ -59,8 +60,8 @@ static const struct {
     { "Direction", "DIRECTION", {TYPE_DOUBLE, TYPE_NULL, 0,0} },
     { "EngineSpeed", "ENGINE_SPEED", {TYPE_INT32, TYPE_NULL, 0, 0} },
     { "Engine", "ENGINE_SPEED", {TYPE_INT32, TYPE_NULL, 0, 0} },
-    { "Shift", "SHIFT", {TYPE_BYTE, TYPE_BYTE, TYPE_NULL, 0} },
-    { "ShiftPosition", "SHIFT", {TYPE_BYTE, TYPE_BYTE, TYPE_NULL, 0} },
+    { "Shift", "SHIFT", {TYPE_SHIFT, TYPE_BYTE, TYPE_NULL, 0} },
+    { "ShiftPosition", "SHIFT", {TYPE_SHIFT, TYPE_BYTE, TYPE_NULL, 0} },
     { "Break_Signal", "BRAKE_SIGNAL", {TYPE_BOOL, TYPE_NULL, 0,0} },
     { "BreakSignal", "BRAKE_SIGNAL", {TYPE_BOOL, TYPE_NULL, 0,0} },
     { "Break", "BRAKE_SIGNAL", {TYPE_BOOL, TYPE_NULL, 0,0} },
@@ -291,9 +292,35 @@ set_vehicleinfo(const char *cmd)
             if (value[j] != 0)  {
                 value[j++] = 0;
             }
-            switch (vehicleinfo_key[key].datatype[idx]) {
+            switch (vehicleinfo_key[key].datatype[idx] % 10) {
             case TYPE_BOOL:
             case TYPE_BYTE:
+                if (vehicleinfo_key[key].datatype[idx] == TYPE_SHIFT)   {
+                    if ((strcasecmp(&value[i], "sp") == 0) ||
+                        (strcasecmp(&value[i], "s0") == 0)) {
+                        strcpy(&value[i], "0");
+                    }
+                    else if (strcasecmp(&value[i], "sr") == 0)  {
+                        strcpy(&value[i], "1");
+                    }
+                    else if (strcasecmp(&value[i], "sn") == 0)  {
+                        strcpy(&value[i], "2");
+                    }
+                    else if ((strcasecmp(&value[i], "sd") == 0) ||
+                             (strcasecmp(&value[i], "s4") == 0))    {
+                        strcpy(&value[i], "4");
+                    }
+                    else if ((strcasecmp(&value[i], "s1") == 0) ||
+                             (strcasecmp(&value[i], "sl") == 0))    {
+                        strcpy(&value[i], "5");
+                    }
+                    else if (strcasecmp(&value[i], "s2") == 0)  {
+                        strcpy(&value[i], "6");
+                    }
+                    else if (strcasecmp(&value[i], "s3") == 0)  {
+                        strcpy(&value[i], "7");
+                    }
+                }
                 msg.msg.data.status[pt++] = strtoul(&value[i], (char **)0, 0);
                 msgsize += 1;
                 break;