@@ -230,25 +230,36 @@ public void onComplete(boolean success) {
230230 }
231231
232232 @ Override
233- protected void checkLifecycleConfiguration () {
234- final Language actualLanguage = lifecycleManager .getRegisterAppInterfaceResponse ().getLanguage ();
235-
236- if (actualLanguage != null && !actualLanguage .equals (hmiLanguage )) {
237-
238- final LifecycleConfigurationUpdate lcu = managerListener .managerShouldUpdateLifecycle (actualLanguage );
233+ protected void checkLifecycleConfiguration (){
234+ final Language actualLanguage = this .getRegisterAppInterfaceResponse ().getLanguage ();
235+ final Language actualHMILanguage = this .getRegisterAppInterfaceResponse ().getHmiDisplayLanguage ();
236+
237+ if ((actualLanguage != null && !actualLanguage .equals (language )) || (actualHMILanguage != null && !actualHMILanguage .equals (hmiLanguage ))) {
238+
239+ LifecycleConfigurationUpdate lcuNew = managerListener .managerShouldUpdateLifecycle (actualLanguage , actualHMILanguage );
240+ LifecycleConfigurationUpdate lcuOld = managerListener .managerShouldUpdateLifecycle (actualLanguage );
241+ final LifecycleConfigurationUpdate lcu ;
242+ ChangeRegistration changeRegistration ;
243+ if (lcuNew == null ) {
244+ lcu = lcuOld ;
245+ changeRegistration = new ChangeRegistration (actualLanguage , actualLanguage );
246+ } else {
247+ lcu = lcuNew ;
248+ changeRegistration = new ChangeRegistration (actualLanguage , actualHMILanguage );
249+ }
239250
240251 if (lcu != null ) {
241- ChangeRegistration changeRegistration = new ChangeRegistration (actualLanguage , actualLanguage );
242252 changeRegistration .setAppName (lcu .getAppName ());
243253 changeRegistration .setNgnMediaScreenAppName (lcu .getShortAppName ());
244254 changeRegistration .setTtsName (lcu .getTtsName ());
245255 changeRegistration .setVrSynonyms (lcu .getVoiceRecognitionCommandNames ());
246256 changeRegistration .setOnRPCResponseListener (new OnRPCResponseListener () {
247257 @ Override
248258 public void onResponse (int correlationId , RPCResponse response ) {
249- if (response .getSuccess ()) {
259+ if (response .getSuccess ()){
250260 // go through and change sdlManager properties that were changed via the LCU update
251- hmiLanguage = actualLanguage ;
261+ hmiLanguage = actualHMILanguage ;
262+ language = actualLanguage ;
252263
253264 if (lcu .getAppName () != null ) {
254265 appName = lcu .getAppName ();
@@ -631,8 +642,9 @@ public Builder setMinimumRPCVersion(final Version minimumRPCVersion) {
631642 * Sets the Language of the App
632643 * @param hmiLanguage the desired language to be used on the display/HMI of the connected module
633644 */
634- public Builder setLanguage (final Language hmiLanguage ){
645+ public Builder setLanguage (final Language hmiLanguage ) {
635646 sdlManager .hmiLanguage = hmiLanguage ;
647+ sdlManager .language = hmiLanguage ;
636648 return this ;
637649 }
638650
@@ -775,8 +787,9 @@ public SdlManager build() {
775787 sdlManager .isMediaApp = false ;
776788 }
777789
778- if (sdlManager .hmiLanguage == null ){
790+ if (sdlManager .hmiLanguage == null ) {
779791 sdlManager .hmiLanguage = Language .EN_US ;
792+ sdlManager .language = Language .EN_US ;
780793 }
781794
782795 if (sdlManager .minimumProtocolVersion == null ){
0 commit comments