switch (element.commandID) {
case -1: {
- FFW.BasicCommunication.ExitApplication(SDL.SDLAppController.model.appID);
+ FFW.BasicCommunication.ExitApplication(SDL.SDLAppController.model.appID, "DRIVER_DISTRACTION_VIOLATION");
+ break;
+ }
+ case -2: {
+ FFW.BasicCommunication.ExitApplication(SDL.SDLAppController.model.appID, "USER_EXIT");
break;
}
default: {
}
return;
- }
+ } else {
- FFW.UI.onCommand(element.commandID, this.model.appID);
- SDL.OptionsView.deactivate();
+ FFW.UI.onCommand(element.commandID, this.model.appID);
+ SDL.OptionsView.deactivate();
+ }
},
/**
if ( SDL.SliderView.active
|| SDL.InteractionChoicesView.active
|| SDL.ScrollableMessage.active
- || SDL.AudioPassThruPopUp.activate) {
+ || SDL.SDLModel.AudioPassThruState) {
return 'HMI_OBSCURED';
}
}
}.property('SDL.OptionsView.active',
'SDL.SliderView.active',
+ 'SDL.SDLModel.AudioPassThruState',
'SDL.VRPopUp.VRActive',
'SDL.AlertPopUp.active',
'SDL.States.info.nonMedia.active',
'SDL.States.navigationApp.baseNavigation.active',
'SDL.ScrollableMessage.active',
'SDL.InteractionChoicesView.active',
- 'SDL.VRHelpListView.active',
- 'SDL.AudioPassThruPopUp.activate'),
+ 'SDL.VRHelpListView.active'),
/**
* List of SDL application models
"params": {
"menuParams":{
"parentID": 0,
- "menuName": "Exit",
+ "menuName": "Exit 'DRIVER_DISTRACTION_VIOLATION'",
"position": 0
},
cmdID: -1
};
SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
+
+ exitCommand = {
+ "id": -10,
+ "params": {
+ "menuParams":{
+ "parentID": 0,
+ "menuName": "Exit 'USER_EXIT'",
+ "position": 0
+ },
+ cmdID: -2
+ }
+ };
+
+ SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
},
/**
* Unregister application
resultStruct: {},
- /**
+ /**
+ * Validate method for request UpdateAppList
+ *
+ * @param {Object}
+ * params
+ */
+ UpdateAppList: function(params) {
+
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
+ };
+
+ return this.resultStruct;
+ },
+
+ /**
* Validate method for request UpdateDeviceList
*
* @param {Object}
return this.resultStruct;
}
if ("nextTurnIcon" in params
- && ((params.turnIcon.imageType !== "DYNAMIC") && (params.turnIcon.imageType !== "STATIC"))) {
+ && ((params.nextTurnIcon.imageType !== "DYNAMIC") && (params.nextTurnIcon.imageType !== "STATIC"))) {
this.resultStruct = {
"resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
"resultMessage": "Unsupported image type!"
return this.resultStruct;
}
- if (params.duration == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'duration' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.duration != 'number') {
+ if ('duration' in params && typeof params.duration != 'number') {
this.resultStruct = {
"resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
"fuelLevel": "VEHICLEDATA_FUELLEVEL",
"fuelLevel_State": "VEHICLEDATA_FUELLEVEL_STATE",
"instantFuelConsumption": "VEHICLEDATA_FUELCONSUMPTION",
- "externalTemperature": "VEHICLEDATA_EXTERNTEMP",
"prndl": "VEHICLEDATA_PRNDL",
"tirePressure": "VEHICLEDATA_TIREPRESSURE",
"odometer": "VEHICLEDATA_ODOMETER",
},
'avgFuelEconomy': 0.1,
'batteryVoltage': 12.5,
- 'externalTemperature': 40.0,
'vin': '52-452-52-752',
'prndl': 'PARK',
'odometer': 23,
/**
* Deactivate PopUp
*/
- deactivate: function() {
+ deactivate: function(reason) {
this.set('active', false);
clearTimeout(this.timer);
this.set('content2', '');
this.set('content3', '');
- SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['SUCCESS'], this.alertRequestId);
+ if (reason == 'timeout' && this.softbuttons.buttons._childViews.length > 0) {
+ SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['ABORTED'], this.alertRequestId);
+ } else {
+ SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['SUCCESS'], this.alertRequestId);
+ }
SDL.SDLController.onSystemContextChange();
},
clearTimeout(this.timer);
this.timer = setTimeout(function() {
- self.deactivate();
- }, message.duration);
+ self.deactivate('timeout');
+ }, message.duration ? message.duration : 30000); //default timeout defined for Alert popUp
}
});
\ No newline at end of file
this.timer = setTimeout(function() {
self.DeactivateTTS();
- }, 2000); // 2 second timeout for TTS popUp
+ }, 5000); // timeout for TTS popUp in milliseconds
FFW.TTS.Started();
},
//FFW.TTS.set('isReady', true);
}
-});
\ No newline at end of file
+});
break;
}
case "Search": {
- this.target.set('value', "");
+ if (this.target.value == null) {
+ this.target.set('value', "");
+ }
this.target.search();
this.deactivate();
break;
request.method);
}
if (request.method == "BasicCommunication.UpdateAppList") {
- if (SDL.States.info.active) {
- SDL.SDLController.onGetAppList(request.params.applications);
- }
+
+ var message = "Was found " + request.params.applications.length + " apps";
+
+ SDL.PopUp.popupActivate(message);
+// if (SDL.States.info.active) {
+// SDL.SDLController.onGetAppList(request.params.applications);
+// }
this.sendBCResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
request.method);
}
if (request.method == "BasicCommunication.ActivateApp") {
- if ( SDL.SDLAppController.model && SDL.SDLAppController.model.appID != request.params.appID) {
+ if ((SDL.SDLAppController.model && SDL.SDLAppController.model.appID != request.params.appID) || (request.params.level == "NONE" || request.params.level == "BACKGROUND")) {
SDL.States.goToStates('info.apps');
}
*
* @params {Number}
*/
- ExitApplication: function(appID) {
+ ExitApplication: function(appID, reason) {
Em.Logger.log("FFW.BasicCommunication.OnExitApplication");
"jsonrpc": "2.0",
"method": "BasicCommunication.OnExitApplication",
"params": {
+ "reason": reason,
"appID": appID
}
};