@@ -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