Skip to content

Commit 512b5a4

Browse files
committed
Update branch to release
2 parents e574a43 + c576162 commit 512b5a4

20 files changed

Lines changed: 146 additions & 107 deletions

File tree

examples/js/hello-sdl/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/js/hello-sdl/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@
169169
.setMainField2('')
170170
.setMainField3('');
171171

172-
this._sdlManager.sendRpc(showCountdown); // don't wait for a response
172+
this._sdlManager.sendRpcResolve(showCountdown); // don't wait for a response
173173

174174
await this._sleep();
175175
}
176176

177177
// tear down the app
178-
await this._sdlManager.sendRpc(new SDL.rpc.messages.UnregisterAppInterface());
178+
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());
179179

180180
this._sdlManager.dispose();
181181
}

examples/node/hello-sdl-tcp/SDL.min.js

Lines changed: 30 additions & 18 deletions
Large diffs are not rendered by default.

examples/node/hello-sdl-tcp/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ class AppClient {
164164
.setMainField2('')
165165
.setMainField3('');
166166

167-
this._sdlManager.sendRpc(showCountdown); // don't wait for a response
167+
this._sdlManager.sendRpcResolve(showCountdown); // don't wait for a response
168168

169169
await this._sleep();
170170
}
171171

172172
// tear down the app
173-
await this._sdlManager.sendRpc(new SDL.rpc.messages.UnregisterAppInterface());
173+
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());
174174

175175
this._sdlManager.dispose();
176176
}

examples/node/hello-sdl/SDL.min.js

Lines changed: 30 additions & 18 deletions
Large diffs are not rendered by default.

examples/webengine/hello-sdl/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/webengine/hello-sdl/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@
163163
.setMainField2('')
164164
.setMainField3('');
165165

166-
this._sdlManager.sendRpc(showCountdown); // don't wait for a response
166+
this._sdlManager.sendRpcResolve(showCountdown); // don't wait for a response
167167

168168
await this._sleep();
169169
}
170170

171171
// tear down the app
172-
await this._sdlManager.sendRpc(new SDL.rpc.messages.UnregisterAppInterface());
172+
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());
173173

174174
this._sdlManager.dispose();
175175
}

lib/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,6 @@ const SDL = {
950950
},
951951
};
952952

953-
console.log('SDL JavaScript library version 1.0.0');
953+
console.log('SDL JavaScript library version 1.1.0');
954954

955955
export default SDL;

lib/js/dist/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/src/manager/SdlManager.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ class SdlManager extends _SdlManagerBase {
184184
// Icon not uploaded yet
185185
const uploadResult = await this._fileManager.uploadArtwork(this._lifecycleConfig.getAppIcon());
186186
if (uploadResult) {
187-
await this.sendRpc(
187+
await this.sendRpcResolve(
188188
new SetAppIcon().setFileName(this._lifecycleConfig.getAppIcon().getName())
189189
);
190190
}
191191
} else {
192192
// Icon already uploaded
193-
await this.sendRpc(
193+
await this.sendRpcResolve(
194194
new SetAppIcon().setFileName(this._lifecycleConfig.getAppIcon().getName())
195195
);
196196
}
@@ -235,10 +235,13 @@ class SdlManager extends _SdlManagerBase {
235235
.setHmiDisplayLanguage(actualLanguage)
236236
.setAppName(lifecycleConfigUpdate.getAppName())
237237
.setNgnMediaScreenAppName(lifecycleConfigUpdate.getShortAppName())
238-
.setTtsName(lifecycleConfigUpdate.getTtsName())
239238
.setVrSynonyms(lifecycleConfigUpdate.getVoiceRecognitionCommandNames());
240239

241-
this.sendRpc(changeRegistration)
240+
if (lifecycleConfigUpdate.getTtsName() !== null) {
241+
changeRegistration.setTtsName(lifecycleConfigUpdate.getTtsName());
242+
}
243+
244+
this.sendRpcResolve(changeRegistration)
242245
.then((response) => {
243246
this._lifecycleConfig.setLanguageDesired(actualLanguage);
244247
this._lifecycleConfig.setHmiDisplayLanguageDesired(actualLanguage);
@@ -441,7 +444,9 @@ class SdlManager extends _SdlManagerBase {
441444
return this.sendRpcResolve(message)
442445
.then(result => {
443446
messagesRemaining--;
444-
onUpdate(result, messagesRemaining);
447+
if (typeof onUpdate === 'function') {
448+
onUpdate(result, messagesRemaining);
449+
}
445450
return result;
446451
});
447452
});
@@ -477,7 +482,9 @@ class SdlManager extends _SdlManagerBase {
477482
const result = await this.sendRpcResolve(message)
478483
.then(result => {
479484
messagesRemaining--;
480-
onUpdate(result, messagesRemaining);
485+
if (typeof onUpdate === 'function') {
486+
onUpdate(result, messagesRemaining);
487+
}
481488
return result;
482489
});
483490
resolvedRpcs.push(result);

0 commit comments

Comments
 (0)