Adding code to get the app ID from tizen.application for the center tiles rather... 15/26515/2 accepted/tizen/ivi/20140826.175733 submit/tizen_ivi/20140825.215805
authorBrian Jones <brian.j.jones@intel.com>
Mon, 25 Aug 2014 21:49:19 +0000 (14:49 -0700)
committerBrian Jones <brian.j.jones@intel.com>
Mon, 25 Aug 2014 21:50:51 +0000 (14:50 -0700)
Change-Id: Idbf8ecca0d8861dec3d1f7fffc4c62528f83c412

js/main.js
js/predefAppModel.js
packaging/modello-homescreen.changes

index 1c397c6..b058062 100644 (file)
@@ -45,6 +45,8 @@ var animationOngoing = false;
 var init = function() {
     "use strict";
 
+    setPieAppIDs();
+
     bootstrap = new Bootstrap(function(status) {
         $('#dateTime').ClockPlugin('init', 60);
         $('#dateTime').ClockPlugin('startTimer');
@@ -233,4 +235,4 @@ window.intelIVI.corpus = (window.intelIVI.corpus || {
         wrapper.appendChild(viewPort);
         return wrapper;
     }
-});
\ No newline at end of file
+});
index 62ed157..4f6983b 100644 (file)
@@ -69,6 +69,7 @@ var centerPoint = {x: 360, y: 675};
  * @property la
  * @type int
  **/
+
 var areasDefinitions = [ {
        name: 'center',
        id: null,
@@ -81,7 +82,6 @@ var areasDefinitions = [ {
        shape: 'cenerCircle'
 }, {
        name: 'navigation',
-       id: 'Modello008.Nav',
        iconPath: '../icons/Navigation_icon.png',
        sectorId: 1,
        sc: 104,
@@ -91,7 +91,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: "airconditioning",
-       id: 'Modello006.Hvac',
        iconPath: '../icons/Dashboard_icon.png',
        sectorId: 2,
        sc: 94,         //small circle border
@@ -101,7 +100,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: 'MultimediaPlayer',
-       id: 'Modello007.Multimediaplayer',
        iconPath: '../icons/Multimedia_Player_icon.png',
        sectorId: 3,
        sc: 80,
@@ -111,7 +109,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: 'SmartDeviceLink',
-       id: 'Modello010.SDL',
        iconPath: '../icons/SmartDeviceLink_icon.png',
        sectorId: 4,
        sc: 80,
@@ -121,7 +118,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: 'phone',
-       id: 'Modello009.Phone',
        iconPath: '../apps/Phone_icon.png',
        sectorId: 5,
        sc: 82,
@@ -131,7 +127,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: 'store',
-       id: 'Modello003.AppManager',
        iconPath: '../icons/AppManager_icon.png',
        sectorId: 6,
        sc: 82,
@@ -141,7 +136,6 @@ var areasDefinitions = [ {
        shape: 'pieWithoutCenter'
 }, {
        name: 'dashboard',
-       id: 'Modello004.Dashboard',
        iconPath: '../icons/Dashboard_icon.png',
        sectorId: 7,
        sc: 105,
@@ -150,3 +144,51 @@ var areasDefinitions = [ {
        la:     160,
        shape: 'pieWithoutCenter'
 } ];
+
+function fillAppIDs (appList)
+{
+    for (i = 0; i < appList.length; i++)
+    {
+        var app = appList[i];
+        if (app.name.indexOf('Modello') >= 0)
+        {
+            switch (app.name)
+            {
+                case "Modello Navigation":
+                    areasDefinitions[1].id = app.id;
+                break;
+
+                case "Modello HVAC":
+                    areasDefinitions[2].id = app.id;
+                break;
+
+                case "Modello Multimedia Player":
+                    areasDefinitions[3].id = app.id;
+                break;
+
+                case "Modello SmartDeviceLink":
+                    areasDefinitions[4].id = app.id;
+                break;
+
+                case "Modello Phone":
+                    areasDefinitions[5].id = app.id;
+                break;
+
+                case "Modello AppManager":
+                    areasDefinitions[6].id = app.id;
+                break;
+
+                case "Modello Dashboard":
+                    areasDefinitions[7].id = app.id;
+                break;
+            }
+        }
+    }
+}
+
+function setPieAppIDs ()
+{
+    tizen.application.getAppsInfo(fillAppIDs, function(err) {
+        console.log("Modello failed to get app IDs for center icons");
+    });
+}
index 9fa6109..630b12c 100644 (file)
@@ -1,3 +1,9 @@
+* Mon Aug 25 2014 Brian Jones <brian.j.jones@intel.com> accepted/tizen/ivi/20140821.133919-1-geec5ebe
+- Adding code to get the app ID from tizen.application for the center tiles rather than hardcode
+
+* Wed Aug 20 2014 Brian Jones <brian.j.jones@intel.com> submit/tizen_ivi/20140819.215807-1-g45081aa
+- Updating tizen api checks to avoid failure if they don't exist
+
 * Tue Aug 19 2014 Brian Jones <brian.j.jones@intel.com> submit/tizen_3.0.m14.2_ivi/20140723.000001-3-g1933e57
 - Matching config.xml icon name to the one in the .wgt file