Remove CEC Plugin Activation/Deactivation from CEC Control Setting [RDKEAPPRT-879]#224
Open
SudarsananComcast wants to merge 10 commits into
Open
Remove CEC Plugin Activation/Deactivation from CEC Control Setting [RDKEAPPRT-879]#224SudarsananComcast wants to merge 10 commits into
SudarsananComcast wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to remove direct Thunder plugin activation/deactivation side effects from the “CEC Control” setting, shifting the control flow toward toggling the CEC enabled state instead of activating/deactivating the org.rdk.HdmiCecSource plugin.
Changes:
- Commented out CEC plugin activation logic in
_init(). - Refactored
toggleCEC()to compute a target enabled state and callsetEnabled(...), then update the toggle icon accordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+218
to
+221
| // get the current state and toggle it | ||
| const newEnabledState = !res.enabled | ||
| this.cecApi.setEnabled({ enabled: newEnabledState }) | ||
| .then(() => { |
Comment on lines
+207
to
+214
| const newEnabledState = !(res && res.enabled) | ||
| this.cecApi.setEnabled(newEnabledState) | ||
| .then(() => { | ||
| const imageSrc = newEnabledState | ||
| ? 'images/settings/ToggleOnOrange.png' | ||
| : 'images/settings/ToggleOffWhite.png' | ||
| this.tag('CECControl.Button').src = Utils.asset(imageSrc) | ||
| }) |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+228
to
+238
| this.cecApi.setEnabled(newEnabledState) | ||
| .then(() => { | ||
| // Update UI based on new state | ||
| const imageSrc = newEnabledState | ||
| ? 'images/settings/ToggleOnOrange.png' | ||
| : 'images/settings/ToggleOffWhite.png' | ||
| this.tag('CECControl.Button').src = Utils.asset(imageSrc) | ||
| if (newEnabledState) { | ||
| this.performOTPAction() | ||
| } | ||
| }) |
added 2 commits
July 14, 2026 15:38
Comment on lines
+230
to
+240
| this.cecApi.setEnabled(newEnabledState) | ||
| .then(() => { | ||
| // Update UI based on new state | ||
| const imageSrc = newEnabledState | ||
| ? 'images/settings/ToggleOnOrange.png' | ||
| : 'images/settings/ToggleOffWhite.png' | ||
| this.tag('CECControl.Button').src = Utils.asset(imageSrc) | ||
| if (newEnabledState) { | ||
| this.performOTPAction() | ||
| } | ||
| }) |
Comment on lines
+188
to
+190
| const isEnabled = !!(res && res.enabled) | ||
| console.log(`CEC initial status: ${isEnabled}`) | ||
|
|
Comment on lines
+228
to
+240
| // get the current state and toggle it. | ||
| const newEnabledState = !(res && res.enabled) | ||
| this.cecApi.setEnabled(newEnabledState) | ||
| .then(() => { | ||
| // Update UI based on new state | ||
| const imageSrc = newEnabledState | ||
| ? 'images/settings/ToggleOnOrange.png' | ||
| : 'images/settings/ToggleOffWhite.png' | ||
| this.tag('CECControl.Button').src = Utils.asset(imageSrc) | ||
| if (newEnabledState) { | ||
| this.performOTPAction() | ||
| } | ||
| }) |
Comment on lines
+188
to
+189
| const isEnabled = !!(res && res.enabled) | ||
| console.log(`CEC initial status: ${isEnabled}`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.