Skip to content

Commit d3f750e

Browse files
authored
Merge pull request #626 from smartdevicelink/release/5.6.0
Release 5.6.0
2 parents a7e3835 + 4d7c0b5 commit d3f750e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2380
-1872
lines changed

app/AppViews.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ SDL.AppViews = Em.ContainerView.extend(
6969
SDL.TopControls,
7070
SDL.BottomControls,
7171
SDL.TTSPopUp,
72+
SDL.ResetTimeoutPopUp,
7273
SDL.AlertPopUp,
7374
SDL.SubtleAlertPopUp,
7475
SDL.ServiceUpdatePopUp,

app/controller/SettingsController.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ SDL.SettingsController = Em.Object.create(
101101
SDL.States.goToStates('settings.' + event.goToState);
102102
if('rpccontrol.rpcconfig' === event.goToState){
103103
SDL.RPCControlConfigView.set('appNameLabel.content',event.appName);
104+
SDL.RPCControlConfigView.SubscribeButton.initSubscribeButtonView();
105+
SDL.RPCControlConfigView.UnsubscribeButton.initUnsubscribeButtonView();
104106
FFW.RPCHelper.updateRpc(event.appID);
105107
}
106108
},
@@ -219,10 +221,12 @@ SDL.SettingsController = Em.Object.create(
219221
for (var i = 0; i < message.result.allowedFunctions.length; i++) {
220222
messageCodes.push(message.result.allowedFunctions[i].name);
221223
}
222-
FFW.BasicCommunication.GetUserFriendlyMessage(
223-
SDL.SettingsController.permissionsFriendlyMessageUpdate, appID,
224-
messageCodes
225-
);
224+
if (messageCodes.length > 0) {
225+
FFW.BasicCommunication.GetUserFriendlyMessage(
226+
SDL.SettingsController.permissionsFriendlyMessageUpdate, appID,
227+
messageCodes
228+
);
229+
}
226230
SDL.AppPermissionsView.update(message.result.allowedFunctions, appID);
227231
delete SDL.SDLModel.data.getListOfPermissionsPull[message.id];
228232
}

app/controller/sdl/Abstract/Controller.js

Lines changed: 84 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ SDL.SDLController = Em.Object.extend(
563563
FFW.TTS.requestId, 'TTS.Speak'
564564
);
565565
}
566+
SDL.ResetTimeoutPopUp.setContext('');
567+
SDL.ResetTimeoutPopUp.stopRpcProcessing('TTS.Speak');
568+
FFW.TTS.Stopped();
566569
FFW.TTS.requestId = null;
567570
FFW.TTS.aborted = false;
568571
}
@@ -611,25 +614,19 @@ SDL.SDLController = Em.Object.extend(
611614
}
612615
case 'ScrollableMessage':
613616
{
614-
SDL.ScrollableMessage.deactivate(true);
617+
SDL.ScrollableMessage.deactivate();
615618
break;
616619
}
617620
}
618621
},
619-
/**
620-
* SDL notification call function
621-
* to notify that SDL Core should reset timeout for some method
622-
*/
623-
onResetTimeout: function(appID, methodName) {
624-
FFW.UI.onResetTimeout(appID, methodName);
625-
},
622+
626623
/**
627624
* Action to show Voice Recognition PopUp
628625
*/
629626
activateVRPopUp: function() {
630627
if (FFW.TTS.requestId) {
631628
FFW.TTS.aborted = true;
632-
SDL.TTSPopUp.DeactivateTTS();
629+
SDL.ResetTimeoutPopUp.stopRpcProcessing('TTS.Speak', true);
633630
}
634631
if (SDL.AlertPopUp.active) {
635632
SDL.AlertPopUp.deactivate('ABORTED');
@@ -683,50 +680,26 @@ SDL.SDLController = Em.Object.extend(
683680
*/
684681
keepContextSoftButton: function(element) {
685682
switch (element.groupName) {
686-
case 'AlertPopUp':
687-
{
688-
clearTimeout(SDL.AlertPopUp.timer);
689-
SDL.AlertPopUp.timer = setTimeout(
690-
function() {
691-
SDL.AlertPopUp.deactivate();
692-
}, SDL.AlertPopUp.timeout
693-
);
694-
this.onResetTimeout(element.appID, 'UI.Alert');
695-
break;
696-
}
697683
case 'AlertManeuverPopUp':
698-
{
699-
clearTimeout(SDL.AlertManeuverPopUp.timer);
700-
SDL.AlertManeuverPopUp.timer = setTimeout(
701-
function() {
702-
SDL.AlertManeuverPopUp.deactivate();
703-
}, SDL.AlertManeuverPopUp.timeout
704-
);
705-
FFW.TTS.OnResetTimeout(element.appID, 'Navigation.AlertManeuver');
706-
break;
707-
}
708-
case 'SubtleAlertPopUp':
709-
{
710-
clearTimeout(SDL.SubtleAlertPopUp.timer);
711-
SDL.SubtleAlertPopUp.timer = setTimeout(
712-
function() {
713-
SDL.SubtleAlertPopUp.deactivate();
714-
}, SDL.SubtleAlertPopUp.timeout
715-
);
716-
this.onResetTimeout(element.appID, 'UI.SubtleAlert');
717-
break;
718-
}
684+
{
685+
SDL.ResetTimeoutPopUp.resetTimeoutSpecificRpc('Navigation.AlertManeuver');
686+
break;
687+
}
719688
case 'ScrollableMessage':
720-
{
721-
clearTimeout(SDL.ScrollableMessage.timer);
722-
SDL.ScrollableMessage.timer = setTimeout(
723-
function() {
724-
SDL.ScrollableMessage.deactivate();
725-
}, SDL.ScrollableMessage.timeout
726-
);
727-
this.onResetTimeout(element.appID, 'UI.ScrollableMessage');
728-
break;
729-
}
689+
{
690+
SDL.ResetTimeoutPopUp.resetTimeoutSpecificRpc('UI.ScrollableMessage');
691+
break;
692+
}
693+
case 'AlertPopUp':
694+
{
695+
SDL.ResetTimeoutPopUp.resetTimeoutSpecificRpc('UI.Alert');
696+
break;
697+
}
698+
case 'SubtleAlertPopUp':
699+
{
700+
SDL.ResetTimeoutPopUp.resetTimeoutSpecificRpc('UI.SubtleAlert');
701+
break;
702+
}
730703
}
731704
},
732705
/**
@@ -818,12 +791,11 @@ SDL.SDLController = Em.Object.extend(
818791
);
819792
SDL.SDLModel.data.set('interactionData.vrHelpTitle', null);
820793
SDL.SDLModel.data.set('interactionData.vrHelp', null);
794+
clearTimeout(SDL.SDLModel.promptTimeout);
795+
SDL.SDLModel.set('timeoutPromptCallback', undefined);
821796
SDL.SDLController.getApplicationModel(
822797
appID
823798
).activeRequests.uiPerformInteraction = null;
824-
if (SDL.TTSPopUp.active && FFW.TTS.requestId == null) {
825-
SDL.TTSPopUp.DeactivateTTS();
826-
}
827799
},
828800
/**
829801
* Method to sent notification ABORTED for VR PerformInteraction
@@ -833,10 +805,10 @@ SDL.SDLController = Em.Object.extend(
833805
SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction, result,
834806
choiceID
835807
);
836-
SDL.InteractionChoicesView.timerUpdate();
837-
if (choiceID && SDL.TTSPopUp.active && FFW.TTS.requestId == null) {
838-
SDL.TTSPopUp.DeactivateTTS();
808+
if(SDL.SDLModel.data.resultCode.TIMED_OUT !== result) {
809+
SDL.ResetTimeoutPopUp.stopRpcProcessing('VR.PerformInteraction', false, false);
839810
}
811+
SDL.ResetTimeoutPopUp.startCountTimeoutByRPCName('UI.PerformInteraction');
840812
SDL.SDLModel.data.interactionData.helpPrompt = null;
841813
SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction = null;
842814
SDL.SDLModel.data.set('VRActive', false);
@@ -1019,7 +991,6 @@ SDL.SDLController = Em.Object.extend(
1019991
appType: params.appType,
1020992
isMedia: 0,
1021993
disabledToActivate: params.greyOut ? true : false,
1022-
displayLayout: "DEFAULT",
1023994
dayColorScheme: isDayColorSchemeDefined ? params.dayColorScheme : SDL.SDLModelData.data.defaultColorScheme,
1024995
nightColorScheme: isNightColorSchemeDefined ? params.nightColorScheme : SDL.SDLModelData.data.defaultColorScheme,
1025996
policyAppID: params.policyAppID,
@@ -1039,7 +1010,6 @@ SDL.SDLController = Em.Object.extend(
10391010
isMedia: applicationType == 0 ? true : false,
10401011
initialized: true,
10411012
disabledToActivate: params.greyOut ? true : false,
1042-
displayLayout: "DEFAULT",
10431013
dayColorScheme: isDayColorSchemeDefined ? params.dayColorScheme : SDL.SDLModelData.data.defaultColorScheme,
10441014
nightColorScheme: isNightColorSchemeDefined ? params.nightColorScheme : SDL.SDLModelData.data.defaultColorScheme,
10451015
policyAppID: params.policyAppID,
@@ -1506,16 +1476,16 @@ SDL.SDLController = Em.Object.extend(
15061476
/**
15071477
* SetAudioStreamingIndicator notification handler
15081478
*
1509-
* @param {Object} params
1479+
* @param {Object} audioStreamingIndicator audioStreamingIndicator name
15101480
* @constructor
15111481
* @return {boolean}
15121482
*/
1513-
SetAudioStreamingIndicator: function(params) {
1483+
SetAudioStreamingIndicator: function(audioStreamingIndicator) {
15141484
if (SDL.SDLController.model) {
15151485
SDL.SDLController.model.set(
15161486
'mediaPlayerIndicator',
15171487
SDL.SDLModel.data.
1518-
mediaPlayerIndicatorEnum[params.audioStreamingIndicator]
1488+
mediaPlayerIndicatorEnum[audioStreamingIndicator]
15191489
);
15201490
return true;
15211491
}
@@ -1671,6 +1641,58 @@ SDL.SDLController = Em.Object.extend(
16711641

16721642
return windowCapability;
16731643
},
1644+
1645+
/**
1646+
* @function getDisplayCapability
1647+
* @param {Integer} appID
1648+
* @param {Integer} windowID
1649+
* @description returns string of system capabilities for selected app
1650+
*/
1651+
getDisplayCapability: function(appID, windowID){
1652+
const appModel = SDL.SDLController.getApplicationModel(appID);
1653+
const windowType = (windowID === undefined || windowID === 0) ? "MAIN" : "WIDGET";
1654+
const windowTypeSupported = SDL.SDLModelData.defaultWindowCapability[windowType].systemCapability.displayCapabilities[0].windowTypeSupported;
1655+
1656+
let template = appModel.templateConfiguration.template;
1657+
if(template === 'DEFAULT') {
1658+
if(appModel.appType.includes('WEB_VIEW')) {
1659+
template = 'WEB_VIEW';
1660+
} else if(appModel.appType.includes('NAVIGATION') || appModel.appType.includes('PROJECTION')) {
1661+
template = 'NAV_FULLSCREEN_MAP';
1662+
} else if(appModel.isMedia === true) {
1663+
template = 'MEDIA';
1664+
} else {
1665+
template = 'NON-MEDIA';
1666+
}
1667+
}
1668+
1669+
let templateCapabilities = SDL.deepCopy(SDL.templateCapabilities[template])
1670+
let displayCapability = {
1671+
displayName: templateCapabilities.displayCapabilities.displayName,
1672+
windowCapabilities: [{
1673+
textFields: templateCapabilities.displayCapabilities.textFields,
1674+
imageFields: templateCapabilities.displayCapabilities.imageFields,
1675+
imageTypeSupported: templateCapabilities.displayCapabilities.imageCapabilities,
1676+
templatesAvailable: templateCapabilities.displayCapabilities.templatesAvailable,
1677+
numCustomPresetsAvailable: templateCapabilities.displayCapabilities.numCustomPresetsAvailable,
1678+
buttonCapabilities: templateCapabilities.buttonCapabilities,
1679+
softButtonCapabilities: templateCapabilities.softButtonCapabilities
1680+
}],
1681+
windowTypeSupported: windowTypeSupported
1682+
};
1683+
1684+
if(windowType === "WIDGET") {
1685+
displayCapability.windowCapabilities[0].windowID = windowID;
1686+
}
1687+
1688+
return {
1689+
systemCapability: {
1690+
systemCapabilityType: "DISPLAYS",
1691+
displayCapabilities: [ displayCapability ]
1692+
},
1693+
appID: appID
1694+
}
1695+
},
16741696
/**
16751697
* @function isColorSchemesEqual
16761698
* @param {Object} left - color scheme object

0 commit comments

Comments
 (0)