RDKEAPPRT-394 Adopt to New APIs for deprecated ones if not yet#151
RDKEAPPRT-394 Adopt to New APIs for deprecated ones if not yet#151astolcenburg merged 3 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the UI to use newer Thunder/System APIs for device “friendly name” handling (replacing deprecated Xcast APIs) and bumps the app version.
Changes:
- Added
getFriendlyName()/setFriendlyName()wrappers toAppApiusingorg.rdk.System. - Updated
App.jsto fetch/set friendly name viaappApi(includingfriendlyNamecasing changes). - Bumped
settings.jsonversion from5.0.22to5.0.23.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| accelerator-home-ui/src/api/AppApi.js | Adds System-plugin friendly-name getters/setters. |
| accelerator-home-ui/src/App.js | Switches friendly-name usage from Xcast APIs to AppApi/System APIs. |
| accelerator-home-ui/settings.json | Version bump to 5.0.23. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
accelerator-home-ui/src/App.js:713
cecApi.getOSDName()runs independently of the precedingappApi.getFriendlyName()call, but this block usesgetfriendlynameimmediately. IfgetOSDNameresolves first,getfriendlynamecan still beundefined, causingcecApi.setOSDName(undefined).
Consider sequencing the calls (e.g., wait for getFriendlyName before calling getOSDName, or use Promise.all) and only calling setOSDName when a valid friendly name is available.
cecApi.getOSDName().then(result => {
getosdname = result.name;
this.LOG("CECApi getOSDName :" + JSON.stringify(getosdname));
if (getfriendlyname !== getosdname) {
cecApi.setOSDName(getfriendlyname);
accelerator-home-ui/src/App.js:737
- Same race as above:
cecApi.getOSDName()can resolve beforeappApi.getFriendlyName(), leavinggetfriendlynameunset and potentially callingcecApi.setOSDName(undefined).
Please chain/await these calls (or use Promise.all) and guard against missing friendly name before setting the OSD name.
cecApi.getOSDName().then(result => {
getosdname = result.name;
this.LOG("CECApi getOSDName :" + JSON.stringify(getosdname));
if (getfriendlyname !== getosdname) {
cecApi.setOSDName(getfriendlyname);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.