Skip to content

Commit fb1f122

Browse files
authored
Merge pull request #676 from smartdevicelink/release/5.7.0
Release 5.7.0
2 parents d3f750e + 31eed2d commit fb1f122

27 files changed

+528
-597
lines changed

app/controller/NavigationController.js

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -582,18 +582,12 @@ SDL.NavigationController = Em.Object.create(
582582
validateIcons: function(request) {
583583
var params = request.params;
584584
imageList = [];
585-
var nonPngCounter = 0;
586585

587586
if(params.turnList) {
588587
var countList=params.turnList.length;
589588
for(var i = 0; i < countList; i++) {
590589
if(params.turnList[i].turnIcon) {
591590
var icon = params.turnList[i].turnIcon;
592-
if(!this.isPng(icon.value)) {
593-
delete params.turnList[i].turnIcon;
594-
nonPngCounter++;
595-
continue;
596-
}
597591
imageList.push(icon);
598592
}
599593
}
@@ -603,39 +597,15 @@ SDL.NavigationController = Em.Object.create(
603597
for(var i=0;i<countButtons;i++) {
604598
if(params.softButtons[i].image) {
605599
var icon = params.softButtons[i].image;
606-
if(!this.isPng(icon.value)) {
607-
delete params.softButtons[i].image;
608-
nonPngCounter++;
609-
continue;
610-
}
611600
imageList.push(icon);
612601
}
613602
}
614603
}
615604
if(params.turnIcon) {
616-
if(!this.isPng(params.turnIcon.value)) {
617-
delete params.turnIcon;
618-
nonPngCounter++;
619-
} else {
620-
imageList.push(params.turnIcon);
621-
}
605+
imageList.push(params.turnIcon);
622606
}
623607
if(params.nextTurnIcon) {
624-
if(!this.isPng(params.nextTurnIcon.value)) {
625-
delete params.nextTurnIcon;
626-
nonPngCounter++;
627-
} else {
628-
imageList.push(params.nextTurnIcon);
629-
}
630-
}
631-
632-
if(nonPngCounter > 0) {
633-
FFW.Navigation.sendNavigationResult(
634-
SDL.SDLModel.data.resultCode.WARNINGS,
635-
request.id,
636-
request.method,
637-
);
638-
return;
608+
imageList.push(params.nextTurnIcon);
639609
}
640610

641611
var callback = function(failed, info) {
@@ -648,6 +618,24 @@ SDL.NavigationController = Em.Object.create(
648618
info);
649619
}
650620
SDL.SDLModel.validateImages(request.id, callback, imageList);
651-
}
621+
},
622+
623+
/**
624+
* SDL Navi AlertManeuver response handler show popup window
625+
* @param {Object} message message Object with incoming params from SDLCore
626+
*
627+
*/
628+
onNaviAlertManeuver: function(message) {
629+
if(SDL.AlertManeuverPopUp.activate) {
630+
FFW.Navigation.sendError(
631+
SDL.SDLModel.data.resultCode.REJECTED,
632+
message.id,
633+
message.method,
634+
'Another AlertManeuver is active.'
635+
);
636+
return;
637+
}
638+
SDL.AlertManeuverPopUp.AlertManeuverActive(message);
639+
}
652640
}
653641
);

app/controller/PhoneController.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ SDL.PhoneController = Em.Object.create({
5252
onEndCall: function() {
5353

5454
SDL.SDLController.onEventChanged('phoneCall', false);
55+
SDL.StreamAudio.setMuted(false);
5556
this.model.endCall();
5657
},
5758

@@ -61,6 +62,7 @@ SDL.PhoneController = Em.Object.create({
6162
onDialCall: function() {
6263

6364
SDL.SDLController.onEventChanged('phoneCall', true);
65+
SDL.StreamAudio.setMuted(true);
6466
this.model.dialCall();
6567
},
6668

app/controller/SettingsController.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ SDL.SettingsController = Em.Object.create(
116116
FFW.BasicCommunication.GetStatusUpdate();
117117
},
118118
phoneCall: function() {
119+
SDL.StreamAudio.setMuted(true);
119120
SDL.SDLController.onEventChanged('phoneCall', true);
120121
SDL.SDLModel.data.phoneCallActive = true;
121122
var appID = null;
@@ -128,15 +129,20 @@ SDL.SettingsController = Em.Object.create(
128129
setTimeout(
129130
function() {
130131
SDL.SDLController.onEventChanged('phoneCall', false);
131-
SDL.SDLController.getApplicationModel(appID).turnOnSDL(appID);
132132
SDL.SDLModel.data.phoneCallActive = false;
133+
SDL.StreamAudio.setMuted(false);
134+
if(SDL.SDLController.model && SDL.SDLController.model.appID !== appID) {
135+
return;
136+
}
137+
SDL.SDLController.getApplicationModel(appID).turnOnSDL(appID);
133138
}, 20000
134139
); //Magic number - 5 seconds timeout for emulating conversation call
135140
} else {
136141
setTimeout(
137142
function() {
138143
SDL.SDLController.onEventChanged('phoneCall', false);
139144
SDL.SDLModel.data.phoneCallActive = false;
145+
SDL.StreamAudio.setMuted(false);
140146
}, 20000
141147
); //Magic number - 5 seconds timeout for emulating conversation call
142148
}

app/controller/sdl/Abstract/Controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ SDL.SDLController = Em.Object.extend(
812812
SDL.SDLModel.data.interactionData.helpPrompt = null;
813813
SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction = null;
814814
SDL.SDLModel.data.set('VRActive', false);
815+
SDL.SDLModel.set('allowUIPerformInteraction', true);
815816
},
816817
/**
817818
* Method to sent notification for Alert
@@ -917,7 +918,8 @@ SDL.SDLController = Em.Object.extend(
917918
*/
918919
performAudioPassThruResponse: function(result) {
919920
SDL.SDLModel.data.set('AudioPassThruState', false);
920-
if (result === SDL.SDLModel.data.resultCode.SUCCESS) {
921+
if (result === SDL.SDLModel.data.resultCode.SUCCESS
922+
|| result === SDL.SDLModel.data.resultCode.RETRY) {
921923
FFW.UI.sendUIResult(
922924
result,
923925
FFW.UI.performAudioPassThruRequestID,

app/controller/sdl/RController.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -664,19 +664,6 @@ SDL.RController = SDL.SDLController.extend(
664664
}
665665

666666
return properties;
667-
},
668-
669-
/**
670-
* isEmptyObject function. Checks that the object is empty
671-
*/
672-
isEmptyObject: function(object) {
673-
var l = 0;
674-
for (var key in object) {
675-
if(object.hasOwnProperty(key)) {
676-
return false;
677-
}
678-
}
679-
return true;
680-
},
667+
}
681668
}
682669
);

app/controller/sdl/RPCController.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,19 +1131,6 @@ SDL.RPCController = Em.Object.create(
11311131
UI: Em.Object.create(
11321132
{
11331133
resultStruct: {},
1134-
/**
1135-
* Validate method for request SetDisplayLayout
1136-
*
1137-
* @param {Object}
1138-
* params
1139-
*/
1140-
SetDisplayLayout: function(params) {
1141-
this.resultStruct = {
1142-
'resultCode': SDL.SDLModel.data.resultCode.SUCCESS
1143-
};
1144-
return this.resultStruct;
1145-
},
1146-
11471134
/**
11481135
* @function CreateWindow
11491136
* @param {Object} params

app/controlls/MenuList.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ SDL.MenuList = Em.ContainerView.extend({
6262
)
6363
);
6464
}
65+
this.setMode(SDL.SDLModel.data.imageMode);
6566
}
6667
},
6768

app/model/HmiSettingsModel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ SDL.HmiSettingsModel = Em.Object.extend({
9797

9898
setHmiSettingsData: function(data){
9999
var result = {};
100-
if(data.displayMode && this.displayMode != data.displayMode) {
100+
if(data.displayMode) {
101101
this.set('displayMode',data.displayMode);
102102
result.displayMode = (data.displayMode === 'AUTO' ? this.defineAutoTimeValue() : data.displayMode);
103103
}
104-
if(data.temperatureUnit && this.temperatureUnit != data.temperatureUnit) {
104+
if(data.temperatureUnit) {
105105
this.set('temperatureUnit',data.temperatureUnit);
106106
if('CELSIUS' == data.temperatureUnit){
107107
SDL.RCModulesController.climateModels[this.ID].temperatureUnitCelsiusEnable();
@@ -110,7 +110,7 @@ SDL.HmiSettingsModel = Em.Object.extend({
110110
}
111111
result.temperatureUnit = data.temperatureUnit;
112112
}
113-
if(data.distanceUnit && this.distanceUnit != data.distanceUnit) {
113+
if(data.distanceUnit) {
114114
this.set('distanceUnit',data.distanceUnit);
115115
result.distanceUnit = data.distanceUnit;
116116
}

app/model/SeatModel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ SDL.SeatModel = Em.Object.extend({
328328

329329
var temp = Em.Object.create(this.dfs(SDL.deepCopy(this.tempSeatControlData),
330330
SDL.deepCopy(this.seatControlData)));
331-
if(SDL.SDLController.isEmptyObject(temp)) {
331+
332+
if($.isEmptyObject(temp)) {
332333
return
333334
}
334335

@@ -450,13 +451,13 @@ SDL.SeatModel = Em.Object.extend({
450451
}
451452

452453
var temp = this.dfs(from[key],to[key]);
453-
if (!SDL.SDLController.isEmptyObject(temp)) {
454+
if (!$.isEmptyObject(temp)) {
454455
result[key] = from[key];
455456
continue;
456457
}
457458
}
458459
var temp = this.dfs(from[key], to[key]);
459-
if (!SDL.SDLController.isEmptyObject(temp)) {
460+
if (!$.isEmptyObject(temp)) {
460461
result[key] = temp;
461462
} else {
462463
delete result[key];

app/model/sdl/Abstract/Model.js

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ SDL.SDLModel = Em.Object.extend({
6767
*/
6868
subscribedData: {},
6969

70+
allowUIPerformInteraction: true,
71+
vrRejectedCallback: null,
7072
applicationStatusBar: '',
7173
timeoutPromptCallback: undefined,
7274
promptTimeout: undefined,
@@ -173,9 +175,9 @@ SDL.SDLModel = Em.Object.extend({
173175

174176
if (event.originalEvent.changedTouches && (
175177
event.originalEvent.changedTouches[i].pageX >
176-
SDL.SDLVehicleInfoModel.vehicleData.displayResolution.width ||
178+
SDL.SDLVehicleInfoModel.displayResolution.width ||
177179
event.originalEvent.changedTouches[i].pageY >
178-
SDL.SDLVehicleInfoModel.vehicleData.displayResolution.height)) {
180+
SDL.SDLVehicleInfoModel.displayResolution.height)) {
179181
return;
180182
}
181183

@@ -615,6 +617,7 @@ SDL.SDLModel = Em.Object.extend({
615617
isTemplateSupported: function(model, template) {
616618
switch (template) {
617619
case 'MEDIA':
620+
case 'ONSCREEN_PRESETS':
618621
{
619622
return model.isMedia === true;
620623
}
@@ -1448,6 +1451,16 @@ SDL.SDLModel = Em.Object.extend({
14481451
*/
14491452
uiPerformInteraction: function(message) {
14501453

1454+
if(!this.allowUIPerformInteraction) {
1455+
FFW.UI.sendError(SDL.SDLModel.data.resultCode.REJECTED, message.id,
1456+
message.method, 'UI PerformInterection REJECTED on HMI'
1457+
);
1458+
if(this.vrRejectedCallback !== null) {
1459+
this.vrRejectedCallback();
1460+
this.vrRejectedCallback = null;
1461+
}
1462+
return false;
1463+
}
14511464
if (!message.params) {
14521465
FFW.UI.sendError(SDL.SDLModel.data.resultCode.INVALID_DATA, message.id,
14531466
message.method, 'Empty message was received for UI.PerformInteraction'
@@ -1477,6 +1490,7 @@ SDL.SDLModel = Em.Object.extend({
14771490
if(SDL.ResetTimeoutPopUp.includes('VR.PerformInteraction') && !SDL.ResetTimeoutPopUp.active) {
14781491
SDL.ResetTimeoutPopUp.resetTimeOutLabel();
14791492
SDL.ResetTimeoutPopUp.ActivatePopUp();
1493+
this.set('allowUIPerformInteraction', false);
14801494
}
14811495
return false;
14821496
}
@@ -1506,6 +1520,10 @@ SDL.SDLModel = Em.Object.extend({
15061520
FFW.UI.sendError(SDL.SDLModel.data.resultCode.REJECTED, message.id,
15071521
message.method, 'UI PerformInterection REJECTED on HMI'
15081522
);
1523+
if(this.vrRejectedCallback !== null) {
1524+
this.vrRejectedCallback();
1525+
this.vrRejectedCallback = null;
1526+
}
15091527
return false;
15101528
}
15111529
},
@@ -1527,9 +1545,11 @@ SDL.SDLModel = Em.Object.extend({
15271545
if (!SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction) {
15281546
SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction = message.id;
15291547
} else {
1530-
FFW.VR.sendError(SDL.SDLModel.data.resultCode.REJECTED, message.id,
1531-
message.method, 'VR PerformInterection REJECTED on HMI'
1532-
);
1548+
this.vrRejectedCallback = () => {
1549+
FFW.VR.sendError(SDL.SDLModel.data.resultCode.REJECTED, message.id,
1550+
message.method, 'VR PerformInterection REJECTED on HMI'
1551+
);
1552+
}
15331553
return;
15341554
}
15351555

0 commit comments

Comments
 (0)