Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 50 additions & 3 deletions accelerator-home-ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,13 @@ export default class App extends Router.App {
RDKShellApis.removeKeyIntercept({"keyCode": 173, "modifiers": [],"client": data.callsign }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 174, "modifiers": [],"client": data.callsign }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 175, "modifiers": [],"client": data.callsign }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({
"keyCode": 115,
"modifiers": [],
"client": data.callsign
}).then(res => {
console.warn(JSON.stringify(res))
})
Comment thread
suryag23 marked this conversation as resolved.
}
if(data.success)
{
Expand All @@ -955,7 +962,7 @@ export default class App extends Router.App {
console.warn("[RDKSHELLEVT] onRestored:", data);
if(data.callsign.startsWith('YouTube') )
{
RDKShellApis.addKeyIntercepts({"intercepts":[{"keys":[{"keyCode":173,"modifiers":[]},{"keyCode":174,"modifiers":[]},{"keyCode":175,"modifiers":[]}],"client": data.callsign }]}).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.addKeyIntercepts({"intercepts":[{"keys":[{"keyCode":173,"modifiers":[]},{"keyCode":174,"modifiers":[]},{"keyCode":175,"modifiers":[]}, {"keyCode": 115,"modifiers": []}],"client": data.callsign }]}).then(res=>{console.warn(JSON.stringify(res))})
}
});
thunder.on('org.rdk.RDKShell', 'onDestroyed', data => {
Expand All @@ -966,6 +973,13 @@ export default class App extends Router.App {
RDKShellApis.removeKeyIntercept({"keyCode": 173, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 174, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 175, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({
"keyCode": 115,
"modifiers": [],
"client": data.client
}).then(res => {
console.warn(JSON.stringify(res))
})
}
if ((GLOBALS.topmostApp === data.client)
&& (GLOBALS.selfClientName === "ResidentApp"|| GLOBALS.selfClientName === "FireboltMainApp-refui")) {
Expand All @@ -981,7 +995,7 @@ export default class App extends Router.App {
// Change (Tracked TopMost) UI's visibility to false only for other apps.
if(data.client.startsWith('YouTube') )
{
RDKShellApis.addKeyIntercepts({"intercepts":[{"keys":[{"keyCode":173,"modifiers":[]},{"keyCode":174,"modifiers":[]},{"keyCode":175,"modifiers":[]}],"client": data.client }]}).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.addKeyIntercepts({"intercepts":[{"keys":[{"keyCode":173,"modifiers":[]},{"keyCode":174,"modifiers":[]},{"keyCode":175,"modifiers":[]}, {"keyCode": 115,"modifiers": []}],"client": data.client }]}).then(res=>{console.warn(JSON.stringify(res))})
}
if ((data.client != GLOBALS.selfClientName)
&& ((GLOBALS.topmostApp === "ResidentApp")
Expand All @@ -1004,6 +1018,13 @@ export default class App extends Router.App {
RDKShellApis.removeKeyIntercept({"keyCode": 173, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 174, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 175, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({
"keyCode": 115,
"modifiers": [],
"client": data.client
}).then(res => {
console.warn(JSON.stringify(res))
})
}
if ((GLOBALS.topmostApp === data.client)
&& (GLOBALS.selfClientName === "ResidentApp")) {
Expand All @@ -1021,6 +1042,13 @@ export default class App extends Router.App {
RDKShellApis.removeKeyIntercept({"keyCode": 173, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 174, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 175, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({
"keyCode": 115,
"modifiers": [],
"client": data.client
}).then(res => {
console.warn(JSON.stringify(res))
})
}
if ((GLOBALS.topmostApp === data.client)
&& (GLOBALS.selfClientName === "ResidentApp" || GLOBALS.selfClientName === "FireboltMainApp-refui")) {
Expand All @@ -1039,6 +1067,13 @@ export default class App extends Router.App {
RDKShellApis.removeKeyIntercept({"keyCode": 173, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 174, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({"keyCode": 175, "modifiers": [],"client": data.client }).then(res=>{console.warn(JSON.stringify(res))})
RDKShellApis.removeKeyIntercept({
"keyCode": 115,
"modifiers": [],
"client": data.client
}).then(res => {
console.warn(JSON.stringify(res))
})
}
if ((GLOBALS.topmostApp === data.client)
&& (GLOBALS.selfClientName === "ResidentApp" || GLOBALS.selfClientName === "FireboltMainApp-refui")) {
Expand Down Expand Up @@ -1381,7 +1416,19 @@ export default class App extends Router.App {
}
Router.navigate('menu');
}

else if (notification.powerState === "LIGHT_SLEEP" && notification.currentPowerState === "DEEP_SLEEP") {
// DEEP_SLEEP → LIGHT_SLEEP is not a valid user-facing state; force the device fully ON.
console.log("onSystemPowerStateChanged Notification: Received DEEP_SLEEP to LIGHT_SLEEP transition, setting power state to ON.")
appApi.setPowerState("ON").then(res => {
if (res && res.success) {
console.log("onSystemPowerStateChanged Notification: Successfully set power state to ON after DEEP_SLEEP to LIGHT_SLEEP transition, response: " + JSON.stringify(res));
} else {
console.error("onSystemPowerStateChanged Notification: Failed to set power state to ON after DEEP_SLEEP to LIGHT_SLEEP transition, response: " + JSON.stringify(res));
}
}).catch(err => {
console.error("onSystemPowerStateChanged Notification: Exception while setting power state to ON after DEEP_SLEEP to LIGHT_SLEEP transition, error: " + JSON.stringify(err));
Comment thread
suryag23 marked this conversation as resolved.
})
}
else if (notification.powerState === "ON" && notification.currentPowerState !== "ON") {
//TURNING ON THE DEVICE
Storage.remove('SLEEPING')
Expand Down
7 changes: 7 additions & 0 deletions accelerator-home-ui/src/api/AppApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ export default class AppApi {
}
url += "launch=" + launchLocation
}
const utmContentMap = { "menu": "m", "guide": "g" }
if (utmContentMap[launchLocation] && !url.includes("utm_content=")) {
if (!url.endsWith("&")) {
url += "&"
}
url += "utm_content=" + utmContentMap[launchLocation]
}
if ((launchLocation === "voice") && !url.includes("vs=")) {
if (!url.endsWith("&")) {
url += "&"
Expand Down
Loading