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