Skip to content

RDKEAPPRT-394 Adopt to New APIs for deprecated ones if not yet#151

Merged
astolcenburg merged 3 commits intodevelopfrom
394
Jan 29, 2026
Merged

RDKEAPPRT-394 Adopt to New APIs for deprecated ones if not yet#151
astolcenburg merged 3 commits intodevelopfrom
394

Conversation

@suryag23
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to AppApi using org.rdk.System.
  • Updated App.js to fetch/set friendly name via appApi (including friendlyName casing changes).
  • Bumped settings.json version from 5.0.22 to 5.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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 preceding appApi.getFriendlyName() call, but this block uses getfriendlyname immediately. If getOSDName resolves first, getfriendlyname can still be undefined, causing cecApi.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 before appApi.getFriendlyName(), leaving getfriendlyname unset and potentially calling cecApi.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.

@astolcenburg astolcenburg merged commit 9ce0c0b into develop Jan 29, 2026
12 checks passed
@astolcenburg astolcenburg deleted the 394 branch January 29, 2026 09:38
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants