device-automation-bus / dab-adapter-rs

Apache License 2.0
2 stars 8 forks source link

Refactor app state logic (launch and exit) #56

Closed arun-madhavan-013 closed 7 months ago

arun-madhavan-013 commented 7 months ago

This change tries to address the issues mentioned in https://github.com/device-automation-bus/dab-adapter-rs/issues/55

  1. There is a function get_app_state in get_state.rs file but there are also at least three copies of full implementations to get app state in exit.rs, luanch.rs and launch_with_content.rs with multiple strings manipulations beyond that. The suggestion is to have just one function for that purpose to get app state which returns enum value.

Changed the logic to map to DAB app state and used that to derive the required functionalities.

  1. Boolean variables app_created and is_suspended in those files are just emulation of tri-state app status we're getting from RDKShell. To get the correct state of the app the code in general should check both variables at the same time. Missing that creates problems like https://github.com/device-automation-bus/dab-adapter-rs/pull/54. Adding more apps will complicate logic even more.

Current DAB app state(BACKGROUND/FOREGROUND/STOPPED) and requested DAB App state(FOREGROUND & EXIT[BACKGROUND/STOPPED]) will not match perfectly with Thunder Plugin states(https://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#statechange-event). Added most apt logic to map them(https://github.com/device-automation-bus/dab-adapter-rs/compare/main...arun-madhavan-013:dab-adapter-rs:refactor-app-state-logic?expand=1#diff-96f97360a68b1faed52609b4a342f5c41d88d79e93546c12ac17a4fac2dfc694R57).

Ideally DAB states looks better as ( STOPPED, BACKGROUND, FOREGROUND), but FOREGROUND in DAB means resumed, visible, and in focus. RDKShell returning app state "resumed" doesn't assume that app is visible or in focus. Just that the app is running. Visibility and Focus are controlled and retrieved separately. So the code in get_state.rs is actually incorrect for returning something like FOREGROUND state. It probably works fine with just one app tests (like "YouTube") but with multiple apps it will produce difficult to find deviations.

When an app is "launched" using RDKShell; the best intention is to set it to "visible" and "focused". This is handled by luanch.rs and launch_with_content.rs. Modified the logic of get_state.rs to check if app is "visible" assuming launcher logic remains same.

arun-madhavan-013 commented 7 months ago

Hello @yulian5 ,

Hope this addresses most of the issues you pointed out. Could you please share the Netflix related test results with this PR change.

yulian5 commented 7 months ago

Hello @arun-madhavan-013,

Unfortunately it looks like not all your code has been tested: it's not possible to suspend any app or resume any app (including YouTube). Error for suspending any app:

processing: applications/exit
Publishing response: dab/_response/applications/exit "{\"status\":400,\"error\":\"expected value at line 1 column 11\"}"

Error for resuming any app:

RDK response: {"callsign":"Netflix","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/launch "{\"status\":500,\"error\":\"Require App specific deeplinking implementation.\"}"
arun-madhavan-013 commented 7 months ago

Hello @yulian5 , I just did a quick sanity of YouTube using ComplianceSuite and seems its functional. Adding respective logs below for reference. DAB Adapter logs:

d35@d35:~/Desktop/dab-works/dab-adapter-rs$ ./target/debug/dab-adapter -b $DIP -d $DIP --debug true
DAB<->RDK Adapter ("0.6.0" - "9df7290")
Using default values for app lifecycle timeouts.
youtube         - exit_to_destroy_timeout_ms     =  2500ms.
youtube         - resume_launch_timeout_ms       =  3000ms.
youtube         - exit_to_background_timeout_ms  =  2000ms.
youtube         - cold_launch_timeout_ms         =  6000ms.
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"02:AD:32:01:C8:35","success":true}}
DAB Device ID: 02AD3201C835
Ready to process DAB requests
processing: applications/list
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getAvailableTypes","params":"{}"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"types":["Amazon","Cobalt","HtmlApp","LightningApp","Peacock","ResidentApp","SearchAndDiscoveryApp","SmartScreen","WebKitBrowser","YouTube","YouTubeKids","YouTubeTV"],"success":true}}
Publishing response: dab/_response/applications/list {"applications":[{"appId":"PrimeVideo"},{"appId":"YouTube"}],"status":200}

processing: applications/launch
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":2,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":2,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/launch-with-content
RDK request: {"jsonrpc":"2.0","id":4,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":4,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=jfKfPfyJRdk"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":5,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":5,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch-with-content {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":6,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":6,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: input/key-press
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.injectKey","params":{"keyCode":36}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
Publishing response: dab/_response/input/key-press {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":7,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":7,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/launch
RDK request: {"jsonrpc":"2.0","id":8,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":8,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConsole=true"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":9,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":9,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":10,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":10,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":11,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":11,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":12,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":12,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":13,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":13,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":14,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":14,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"STOPPED","status":200}

processing: applications/launch
RDK request: {"jsonrpc":"2.0","id":15,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":15,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":16,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":16,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":17,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":17,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":18,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":18,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":19,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":19,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":false,"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":20,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":20,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":2,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":2,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"STOPPED","status":200}

^C
d35@d35:~/Desktop/dab-works/dab-adapter-rs$ 

ComplianceSuite logs:

d35@d35:~/Desktop/dab-compliance-suite$ git remote -v
origin  https://github.com/device-automation-bus/dab-compliance-suite.git (fetch)
origin  https://github.com/device-automation-bus/dab-compliance-suite.git (push)
d35@d35:~/Desktop/dab-compliance-suite$ git log | head -n 1
commit 5adf476229dd06975b83ef9048247a6f44796938
d35@d35:~/Desktop/dab-compliance-suite$
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsListConformance
testing applications/list   {} ... 
applications/list Latency, Expected: 200 ms, Actual: 59 ms
[ PASS ]
{
  "applications": [
    {
      "appId": "PrimeVideo"
    },
    {
      "appId": "YouTube"
    }
  ],
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchConformance
testing applications/launch   {"appId": "YouTube"} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 4688 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 133 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithContentConformance
testing applications/launch-with-content   {"appId": "YouTube", "contentId": "jfKfPfyJRdk"} ... App started with playback?(Y/N)
[y]
applications/launch-with-content Latency, Expected: 10000 ms, Actual: 6737 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 174 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest InputKeyPressKeyHome
testing input/key-press   {"keyCode": "KEY_HOME"} ... {"keyCode": "KEY_HOME"} key initiated?(Y/N)
[y]
input/key-press Latency, Expected: 1000 ms, Actual: 54 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 134 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithParameters
testing applications/launch   {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 7127 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 184 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube"} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 3217 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 102 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ git diff 
diff --git a/conformance.py b/conformance.py
index bf94f55..2caeac8 100644
--- a/conformance.py
+++ b/conformance.py
@@ -20,12 +20,12 @@ CONFORMANCE_TEST_CASE = [
     ("applications/launch",f'{{"appId": "{config.apps["youtube"]}", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}}', dab.applications.launch, 10000, "with parameters"),
     ("applications/launch-with-content",f'{{"appId": "{config.apps["youtube"]}", "contentId": "jfKfPfyJRdk"}}', dab.applications.launch_with_content, 10000, "Conformance"),
     ("applications/get-state",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.get_state, 200, "Conformance"),
-    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.exit, 5000, "Conformance"),
+    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}","background":true}}', dab.applications.exit, 5000, "Conformance"),
     ("device/info",'{}', dab.device.info, 200, "Conformance"),
     ("system/settings/list",'{}', dab.system.list, 200, "Conformance"),
-    ("system/settings/get",'{}', dab.system.get, 200, "Conformance"),
+    ("system/settings/get",'{}', dab.system.get, 800, "Conformance"),
     ("system/settings/set",'{"language": "en-US"}', dab.system.set, 3000, "language"),
-    ("system/settings/set",'{"outputResolution": {"width": 3840, "height": 2160, "frequency": 60} }', dab.system.set, 3000, "outputResolution"),
+    ("system/settings/set",'{"outputResolution": {"width": 1920, "height": 1080, "frequency": 60.0} }', dab.system.set, 3000, "outputResolution"),
     ("system/settings/set",'{"memc": true}', dab.system.set, 3000, "memc"),
     ("system/settings/set",'{"cec": true}', dab.system.set, 3000, "cec"),
     ("system/settings/set",'{"lowLatencyMode": true}', dab.system.set, 3000, "lowLatencyMode"),
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ git checkout conformance.py
Updated 1 path from the index
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ git checkout conformance.py
Updated 1 path from the index
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ git diff 
diff --git a/conformance.py b/conformance.py
index bf94f55..45eb406 100644
--- a/conformance.py
+++ b/conformance.py
@@ -20,7 +20,7 @@ CONFORMANCE_TEST_CASE = [
     ("applications/launch",f'{{"appId": "{config.apps["youtube"]}", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}}', dab.applications.launch, 10000, "with parameters"),
     ("applications/launch-with-content",f'{{"appId": "{config.apps["youtube"]}", "contentId": "jfKfPfyJRdk"}}', dab.applications.launch_with_content, 10000, "Conformance"),
     ("applications/get-state",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.get_state, 200, "Conformance"),
-    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.exit, 5000, "Conformance"),
+    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}","background":true}}', dab.applications.exit, 5000, "Conformance"),
     ("device/info",'{}', dab.device.info, 200, "Conformance"),
     ("system/settings/list",'{}', dab.system.list, 200, "Conformance"),
     ("system/settings/get",'{}', dab.system.get, 200, "Conformance"),
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchConformance
testing applications/launch   {"appId": "YouTube"} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 4553 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 124 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2599 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 88 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ git diff 
diff --git a/conformance.py b/conformance.py
index bf94f55..3a23622 100644
--- a/conformance.py
+++ b/conformance.py
@@ -20,7 +20,7 @@ CONFORMANCE_TEST_CASE = [
     ("applications/launch",f'{{"appId": "{config.apps["youtube"]}", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}}', dab.applications.launch, 10000, "with parameters"),
     ("applications/launch-with-content",f'{{"appId": "{config.apps["youtube"]}", "contentId": "jfKfPfyJRdk"}}', dab.applications.launch_with_content, 10000, "Conformance"),
     ("applications/get-state",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.get_state, 200, "Conformance"),
-    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.exit, 5000, "Conformance"),
+    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}","background":false}}', dab.applications.exit, 5000, "Conformance"),
     ("device/info",'{}', dab.device.info, 200, "Conformance"),
     ("system/settings/list",'{}', dab.system.list, 200, "Conformance"),
     ("system/settings/get",'{}', dab.system.get, 200, "Conformance"),
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":false} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 3020 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 92 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$
d35@d35:~/Desktop/dab-compliance-suite$ 
arun-madhavan-013 commented 7 months ago

Logs specifically of launch with content & parameters from BACKGROUND DAB Adapter Logs:

d35@d35:~/Desktop/dab-works/dab-adapter-rs$ ./target/debug/dab-adapter -b $DIP -d $DIP --debug true
DAB<->RDK Adapter ("0.6.0" - "9df7290")
Using default values for app lifecycle timeouts.
youtube         - exit_to_destroy_timeout_ms     =  2500ms.
youtube         - exit_to_background_timeout_ms  =  2000ms.
youtube         - resume_launch_timeout_ms       =  3000ms.
youtube         - cold_launch_timeout_ms         =  6000ms.
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"02:AD:32:01:C8:35","success":true}}
DAB Device ID: 02AD3201C835
Ready to process DAB requests
processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":2,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":2,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"STOPPED","status":200}

processing: applications/launch
RDK request: {"jsonrpc":"2.0","id":4,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":4,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConsole=true\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":5,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":5,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":6,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":6,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":7,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":7,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":false,"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":8,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":8,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/launch-with-content
RDK request: {"jsonrpc":"2.0","id":9,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":9,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=jfKfPfyJRdk"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":10,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":10,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":11,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":11,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch-with-content {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":12,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":12,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":13,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":13,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":14,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":14,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":false,"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/launch
RDK request: {"jsonrpc":"2.0","id":15,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":15,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConsole=true"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":16,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":16,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":17,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":17,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":18,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":18,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

Compliance Suite logs:

d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 92 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ git diff 
diff --git a/conformance.py b/conformance.py
index bf94f55..3a23622 100644
--- a/conformance.py
+++ b/conformance.py
@@ -20,7 +20,7 @@ CONFORMANCE_TEST_CASE = [
     ("applications/launch",f'{{"appId": "{config.apps["youtube"]}", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}}', dab.applications.launch, 10000, "with parameters"),
     ("applications/launch-with-content",f'{{"appId": "{config.apps["youtube"]}", "contentId": "jfKfPfyJRdk"}}', dab.applications.launch_with_content, 10000, "Conformance"),
     ("applications/get-state",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.get_state, 200, "Conformance"),
-    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.exit, 5000, "Conformance"),
+    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}","background":false}}', dab.applications.exit, 5000, "Conformance"),
     ("device/info",'{}', dab.device.info, 200, "Conformance"),
     ("system/settings/list",'{}', dab.system.list, 200, "Conformance"),
     ("system/settings/get",'{}', dab.system.get, 200, "Conformance"),
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py ^C
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithParameters
testing applications/launch   {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 4360 ms

[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... 
App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2534 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 130 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithContentConformance
testing applications/launch-with-content   {"appId": "YouTube", "contentId": "jfKfPfyJRdk"} ... App started with playback?(Y/N)
[y]
applications/launch-with-content Latency, Expected: 10000 ms, Actual: 7155 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 118 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2587 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithParameters
testing applications/launch   {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 7173 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 163 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
yulian5 commented 7 months ago

Hello @arun-madhavan-013, That's strange. I see I have all your changes and I used latest code for tests:

commit 9df72904f95250571dee23d703ed8be64bbc82d8 (HEAD -> refactor-app-state-logic)
Author: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com>
Date:   Mon Apr 15 23:09:50 2024 -0400

    Deeplink first and then resume app to improve user experience.

commit 6f295c28b3f47b791980deccac13f51061481ba2
Author: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com>
Date:   Mon Apr 15 22:47:39 2024 -0400

    Refactor app exit logic

commit b65d014d87de52579a6bd951a7011164e9505e18
Author: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com>
Date:   Mon Apr 15 21:31:00 2024 -0400

    Refactor app launch & state implementations.

commit 64508ff20b2da82104561d72b52e12bc6fd157e3
Author: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com>
Date:   Mon Apr 15 14:21:29 2024 -0400

    Refactor launcher and app state APIs

commit fae37dd0d3bf845fd5d75f5b1fd32b488e4ed718 (origin/main, origin/HEAD, main)
Author: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com>
Date:   Thu Apr 11 18:47:17 2024 -0400

    Update DeviceTelemetry support but keep it off from operations/list since its optional. (#52)

Let me double check that.

yulian5 commented 7 months ago

Hi @arun-madhavan-013,

I found problem with my python scripts parameter for suspending apps. Sorry for that, suspending works fine for any app.

However, launch from BACKGROUND (resuming) works only for YouTube. For any other apps (Netflix, GravityApp, etc) there is an error:

testing applications/launch {"appId": "GravityApp"} ... ←[1;31m[ Error: self.dab_client.last_error_code() Internal error ]←[0m "status": 500, error": "Require App specific deeplinking implementation."

The same error as I reported above for Netflix.

You probably know that you can pass callsign for any existing app on your RDK system, not only for "supported" apps, as DAB adapter uses RDKShell calls, it works for simple tasks like lunch/suspend/resume/set visibility/etc for any app (except special parameters, for sure).

I'll submit test cases for Netflix for PR today.

arun-madhavan-013 commented 7 months ago

Hello @yulian5 , Could you please share the debug true log as well from dab-adapter. The problem seems that it's getting a "parameter" when trying to resume. Passing parameter seems failing which is why you are getting this error.

yulian5 commented 7 months ago

Hi @arun-madhavan-013 I have the fix for the issue but I do not have write access to your repo to commit.

yulian5 commented 7 months ago

@arun-madhavan-013 Another option is you can merge you change into main and I immediately create another PR to fix issue with resuming other apps.

arun-madhavan-013 commented 7 months ago

Making this PR to active assuming this change fixes the original github issue.

yulian5 commented 7 months ago

@arun-madhavan-013 noted:

Making this PR to active assuming this change fixes the original github issue.

That is very close to truth. I just created PR for Netflix test cases. Without them your code works just fine as you proved with Conformance tests.

arun-madhavan-013 commented 7 months ago

Hello @yulian5 ,

I've updated the logic with "plugin resume" action corrected. Please see test report below.

DAB Adapter Logs:

d35@d35:~/Desktop/dab-works/dab-adapter-rs$ ./target/debug/dab-adapter -b $DIP -d $DIP --debug true
DAB<->RDK Adapter ("0.6.0" - "9df7290")
Using default values for app lifecycle timeouts.
youtube         - cold_launch_timeout_ms         =  6000ms.
youtube         - exit_to_background_timeout_ms  =  2000ms.
youtube         - resume_launch_timeout_ms       =  3000ms.
youtube         - exit_to_destroy_timeout_ms     =  2500ms.
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"02:AD:32:01:C8:35","success":true}}
DAB Device ID: 02AD3201C835
Ready to process DAB requests
processing: applications/list
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getAvailableTypes","params":"{}"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"types":["Amazon","Cobalt","HtmlApp","LightningApp","Peacock","ResidentApp","SearchAndDiscoveryApp","SmartScreen","WebKitBrowser","YouTube","YouTubeKids","YouTubeTV"],"success":true}}
Publishing response: dab/_response/applications/list {"applications":[{"appId":"PrimeVideo"},{"appId":"YouTube"}],"status":200}

processing: applications/launch
param_list.len(): 0.
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":2,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":2,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":4,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":4,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":5,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":5,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":6,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":6,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/launch
param_list.len(): 0.
RDK request: {"jsonrpc":"2.0","id":7,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":7,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":8,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":8,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":9,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":9,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":10,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":10,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/launch
param_list.len(): 3.
RDK request: {"jsonrpc":"2.0","id":11,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":11,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConsole=true"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":12,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":12,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":13,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":13,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":14,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":14,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.suspend","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":15,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":15,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":false,"success":true}}
Publishing response: dab/_response/applications/exit {"state":"BACKGROUND","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":16,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":16,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"BACKGROUND","status":200}

processing: applications/launch-with-content
param_list.len(): 1.
RDK request: {"jsonrpc":"2.0","id":17,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":17,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"YouTube.1.deeplink","params":"https://www.youtube.com/tv?v=jfKfPfyJRdk"}
RDK response: {"jsonrpc":"2.0","id":3,"result":null}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"resume","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":18,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":18,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"suspended","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":19,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":19,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch-with-content {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":20,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":20,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":21,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":21,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":22,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":22,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":23,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":23,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"STOPPED","status":200}

processing: applications/launch-with-content
param_list.len(): 1.
RDK request: {"jsonrpc":"2.0","id":24,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":24,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?v=jfKfPfyJRdk\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":25,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":25,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch-with-content {"status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":26,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":26,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"FOREGROUND","status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":27,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":27,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":28,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":28,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/launch
param_list.len(): 3.
RDK request: {"jsonrpc":"2.0","id":29,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":29,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.launch","params":{"callsign":"YouTube","type":"Cobalt","configuration":"{\"url\":\"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConsole=true\"}"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"launchType":"activate","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.moveToFront","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"message":"failed to move front","success":false}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.1.setFocus","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":30,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":30,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
Publishing response: dab/_response/applications/launch {"status":200}

processing: applications/exit
RDK request: {"jsonrpc":"2.0","id":31,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":31,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0},{"callsign":"YouTube","state":"resumed","uri":"","lastExitReason":2}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getVisibility","params":{"client":"YouTube","callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"visible":true,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.destroy","params":{"callsign":"YouTube"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":true}}
RDK request: {"jsonrpc":"2.0","id":32,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":32,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/exit {"state":"STOPPED","status":200}

processing: applications/get-state
RDK request: {"jsonrpc":"2.0","id":33,"method":"org.rdk.RDKShell.getState"}
RDK response: {"jsonrpc":"2.0","id":33,"result":{"state":[{"callsign":"ResidentApp","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/lxresui\/index.html#menu","lastExitReason":0},{"callsign":"SmartScreen","state":"resumed","uri":"http:\/\/127.0.0.1:50050\/alexa-smart-screen\/","lastExitReason":0}],"success":true}}
Publishing response: dab/_response/applications/get-state {"state":"STOPPED","status":200}

^C
d35@d35:~/Desktop/dab-works/dab-adapter-rs$ 

ComplianceSuite Logs:

d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsListConformance
testing applications/list   {} ... 
applications/list Latency, Expected: 200 ms, Actual: 220 ms
applications/list took more time than expected.
[ FAILED ]
{
  "applications": [
    {
      "appId": "PrimeVideo"
    },
    {
      "appId": "YouTube"
    }
  ],
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchConformance
testing applications/launch   {"appId": "YouTube"} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 5016 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2855 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 245 ms
applications/get-state took more time than expected.
[ FAILED ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 121 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchConformance
testing applications/launch   {"appId": "YouTube"} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 6887 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2571 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithParameters
testing applications/launch   {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 7371 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":true} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 5000 ms, Actual: 2622 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 93 ms
[ PASS ]
{
  "state": "BACKGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithContentConformance
testing applications/launch-with-content   {"appId": "YouTube", "contentId": "jfKfPfyJRdk"} ... App started with playback?(Y/N)
[y]
applications/launch-with-content Latency, Expected: 10000 ms, Actual: 7122 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ git diff 
diff --git a/conformance.py b/conformance.py
index bf94f55..1729eee 100644
--- a/conformance.py
+++ b/conformance.py
@@ -20,7 +20,7 @@ CONFORMANCE_TEST_CASE = [
     ("applications/launch",f'{{"appId": "{config.apps["youtube"]}", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}}', dab.applications.launch, 10000, "with parameters"),
     ("applications/launch-with-content",f'{{"appId": "{config.apps["youtube"]}", "contentId": "jfKfPfyJRdk"}}', dab.applications.launch_with_content, 10000, "Conformance"),
     ("applications/get-state",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.get_state, 200, "Conformance"),
-    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}"}}', dab.applications.exit, 5000, "Conformance"),
+    ("applications/exit",f'{{"appId": "{config.apps["youtube"]}","background":false}}', dab.applications.exit, 3500, "Conformance"),
     ("device/info",'{}', dab.device.info, 200, "Conformance"),
     ("system/settings/list",'{}', dab.system.list, 200, "Conformance"),
     ("system/settings/get",'{}', dab.system.get, 200, "Conformance"),
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 230 ms
applications/get-state took more time than expected.
[ FAILED ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":false} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 3500 ms, Actual: 3242 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ vi conformance.py 
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 80 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithContentConformance
testing applications/launch-with-content   {"appId": "YouTube", "contentId": "jfKfPfyJRdk"} ... App started with playback?(Y/N)
[y]
applications/launch-with-content Latency, Expected: 10000 ms, Actual: 5284 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 134 ms
[ PASS ]
{
  "state": "FOREGROUND",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":false} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 3000 ms, Actual: 3151 ms
applications/exit took more time than expected.
[ FAILED ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsLaunchWithParameters
testing applications/launch   {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 4730 ms
[ PASS ]
{
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ 
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsExitConformance
testing applications/exit   {"appId": "YouTube","background":false} ... App exited?(Y/N)
[y]
applications/exit Latency, Expected: 3000 ms, Actual: 3356 ms
applications/exit took more time than expected.
[ FAILED ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$ dabSingleTest ApplicationsGetStateConformance
testing applications/get-state   {"appId": "YouTube"} ... 
applications/get-state Latency, Expected: 200 ms, Actual: 147 ms
[ PASS ]
{
  "state": "STOPPED",
  "status": 200
}
d35@d35:~/Desktop/dab-compliance-suite$