Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android TV 11 showing only Off, Idle or Standby, not recognizing running apps #271

Open
blakadder opened this issue Sep 22, 2021 · 90 comments

Comments

@blakadder
Copy link

I have a TCL TV with Android TV 11 installed running on latest release HA (2021.9.7) and I the only states HA receives are Off,Idle and Standby with adb response: null in Developer - States tab.

I ran the commands through adb shell and these are the results:

~$ adb shell dumpsys power | grep 'Display Power' | grep 'state=ON' || dumpsys power | grep 'mScreenOn=true'
Display Power: state=ON
~$ adb shell getprop ro.product.manufacturer
TCL
~$ adb shell getprop ro.product.model
Smart TV Pro
~$ adb shell getprop ro.build.version.release
11
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'

gives no response

this works

~$ adb shell dumpsys window windows | grep Window\ #1
  Window #1 Window{f978c53 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity}:
~$ adb shell ps -A | grep u0_a
u0_a39          410   4071       0      0 0                   0 Z [com.tcl.usercen]
u0_a72         1029    274 1270008  83388 0                   0 S com.android.systemui
u0_a78         1229    274 1237900  48308 0                   0 S com.google.android.ext.services
u0_a22         1279    274 1303284  39828 0                   0 S com.google.android.tv.remote.service
u0_a70         1302    274 1223912  39352 0                   0 S com.google.android.partnersetup
u0_a15         1361    274 1353364  75584 0                   0 S com.google.android.gms.persistent
u0_a37         1433    274 1266488  51476 0                   0 S com.google.android.inputmethod.latin
u0_a15         1566    274 1238860  41872 0                   0 S com.google.process.gservices
u0_a77         1628    274 1240776  39884 0                   0 S com.android.providers.media.module
u0_a23         1751    274 1277568  76200 0                   0 S com.google.android.tvrecommendations
u0_a27         1772    274 1318284  55712 0                   0 S com.google.android.tvlauncher
u0_a12         1912    274 1255744  42656 0                   0 S com.android.providers.tv
u0_a6          2106    274 1219396  37888 0                   0 S com.android.externalstorage
u0_a59         2593    274 1906136  49788 0                   0 S com.tcl.bi:service
u0_a16         2653    274 2034692  39224 0                   0 S com.google.android.katniss:search
u0_a55         2783    274 1900044  55384 0                   0 S com.netflix.ninja
u0_a80         2859    274 1265992  54496 0                   0 S tv.twitch.android.app
u0_a16         3028    274 1991444  38792 0                   0 S com.google.android.katniss:interactor
u0_a19         3090    274 1252588  41664 0                   0 S com.google.android.tungsten.setupwraith
u0_a15         3147    274 1296252 102184 0                   0 S com.google.android.gms
u0_a11         3218    274 1375284 107356 0                   0 S com.google.android.apps.mediashell
u0_a79         3630    274 1807528 341556 0                   0 S org.xbmc.kodi
u0_a39         4071    274 1278092  43744 0                   0 S com.tcl.usercenter
~$ CURRENT_APP=$(adb shell dumpsys activity a . | grep -E 'mResumedActivity' | cut -d ' ' -f 8) && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP
com.netflix.ninja
~$ CURRENT_APP=$(adb shell dumpsys activity a . | grep -E 'mResumedActivity' | cut -d ' ' -f 8) && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP
com.tcl.waterfall.overseas
~$ CURRENT_APP=$(adb shell dumpsys activity a . | grep -E 'mResumedActivity' | cut -d ' ' -f 8) && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP
com.android.vending
~$ CURRENT_APP=$(adb shell dumpsys activity a . | grep -E 'mResumedActivity' | cut -d ' ' -f 8) && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP
tv.twitch.android.app

Here's full output of dumpsys window and dumpsys activity starter in a gist link

@JeffLIrion
Copy link
Owner

To be honest, I have very little time to work on this package, and so it's mostly up to the community to contribute features and fixes.

This is something that needs to be done to unblock further development: #255

With that in place, it would be easier to tailor commands as needed for different devices.

blakadder added a commit to blakadder/home-assistant.io that referenced this issue Sep 23, 2021
In its current state integration does not work with Android 11 and will not be implemented soon JeffLIrion/python-androidtv#271 (comment)
blakadder added a commit to blakadder/home-assistant.io that referenced this issue Sep 23, 2021
In its current state integration does not work with Android 11 and will not be implemented soon JeffLIrion/python-androidtv#271 (comment)
@konrad300
Copy link

I just updated my Sony Bravia TV to Android 10 and there is the same issue - the integration stopped working correctly.

@rensenti
Copy link

I just updated my Sony Bravia TV to Android 10 and there is the same issue - the integration stopped working correctly.

Yes, me too. Wasn't expecting that Android 10 will not be compatible because only Android 11 had been mentioned in the issues / Home Assistant alert.

@barmazu
Copy link

barmazu commented Oct 19, 2021

Hi @blakadder and others, I have started working on Android 11 (maybe 10 as well) support; for starters very basic support is introduced here https://github.com/barmazu/python-androidtv/commit/c7b0a403cd3745f1e671ad63ad005da13f494d5e just by swapping commands that are send to ADB shell.
It seems to restored some basic functionality, surely not all, but (some) states and apps are now reported correctly.
Please note changes are not backward compatible (Android 9) yet. This is just test flight and I'm doing it on TCL C82 (A11).
Further testing on different devices is welcomed, especially Android 10. Thanks!

obraz

source_list:
  - com.android.systemui
  - com.google.android.ext.services
  - com.google.android.tvrecommendations
  - com.google.android.tv.remote.service
  - Play Store
  - com.android.providers.media.module
  - com.google.android.katniss:interactor
  - com.tcl.inputmethod.international
  - Android TV Launcher
  - Spotify
  - com.android.providers.tv
  - com.google.android.katniss:search
  - Google Cast
  - Netflix
  - com.tcl.system.server
  - com.dolby.android.audio.service
  - com.google.android.apps.nbu.smartconnect.tv
  - com.tcl.usercenter
  - '[com.tcl.usercen]'
  - com.google.android.partnersetup
  - com.google.android.apps.mediashell:privileged_process0
  - com.google.android.gms
  - com.google.android.gms.persistent
  - com.google.process.gservices
  - com.android.vending:instant_app_installer
  - com.android.vending:background
  - com.google.android.permissioncontroller
  - com.google.android.gms.unstable
volume_level: 0.1
is_volume_muted: false
app_id: com.netflix.ninja
app_name: Netflix
source: Netflix
adb_response: >-
  {'screen_on': True, 'awake': True, 'audio_state': 'paused', 'wake_lock_size':
  3, 'current_app': 'com.netflix.ninja', 'media_session_state': 3,
  'audio_output_device': 'speaker', 'is_volume_muted': False, 'volume': 10,
  'running_apps': ['com.android.systemui', 'com.google.android.ext.services',
  'com.google.android.tvrecommendations',
  'com.google.android.tv.remote.service', 'com.android.vending',
  'com.android.providers.media.module', 'com.google.android.katniss:interactor',
  'com.tcl.inputmethod.international', 'com.google.android.tvlauncher',
  'com.spotify.tv.android', 'com.android.providers.tv',
  'com.google.android.katniss:search', 'com.google.android.apps.mediashell',
  'com.netflix.ninja', 'com.tcl.system.server',
  'com.dolby.android.audio.service',
  'com.google.android.apps.nbu.smartconnect.tv', 'com.tcl.usercenter',
  '[com.tcl.usercen]', 'com.google.android.partnersetup',
  'com.google.android.apps.mediashell:privileged_process0',
  'com.google.android.gms', 'com.google.android.gms.persistent',
  'com.google.process.gservices', 'com.android.vending:instant_app_installer',
  'com.android.vending:background', 'com.google.android.permissioncontroller',
  'com.google.android.gms.unstable'], 'hdmi_input': None}
hdmi_input: null
friendly_name: TCL Smart TV
supported_features: 23997

@barmazu
Copy link

barmazu commented Nov 1, 2021

So I've updated constants.py file, it should work on both domains, ie Android 9 and 11, see here: https://github.com/JeffLIrion/python-androidtv/compare/master...barmazu:a11_support?expand=1
You may update this file in your HA installation ( /usr/local/lib/python3.9/site-packages/androidtv/constants.py), test it out, report any issues...
A few caveats though

  • HDMI input detection works on my TCL but will it work elsewhere (most likely it breaks Android 9 Sony TV)?
  • Volume slider does not work in Android 11 (it dropped media volume command support), service call does not work on TCL. Volume up / down buttons work.
  • Many other corner cases, depending on Android implementation, not covered - your mileage WILL vary :-)

I'll push PR here once I update the Unit Tests (HDMI Sony TV seems like a major break point now)

@JeffLIrion
Copy link
Owner

@barmazu my comments in this post still stand true: #271 (comment)

The get_properties method needs to use multiple ADB commands, rather than one giant ADB command. This would enable using different commands for different devices, OS versions, etc.

IMO, that is the right approach to resolving this issue, whereas modifying the existing commands is merely a band-aid fix that could introduce new issues.

I really don't have time to work on this myself, so I need someone to take on this effort of

  1. splitting theget_properties method into multiple ADB shell commands, each of which is its own method
  2. enabling the use of different ADB commands depending on the device properties

@barmazu
Copy link

barmazu commented Nov 1, 2021

Hi @JeffLIrion! Agreed, I'm willing to do it but this is not a one day task, and honestly I didn't have much time either (to work around A11 support). With current implementation its awful, does not scale up at all, you don't have to say anything, this is obvious it would be very hard to maintain it; with still growing Android TV base it will be impossible to keep up.

Dirty patch I made is just unblocks me, maybe some other will take advantage and by any means does not replace necessary code refactoring. This is also my first meet with ATV from this side of things so I'm just looking around. Mostly.

@ollo69
Copy link
Contributor

ollo69 commented Nov 3, 2021

Hey,

I will take a look to this on next days, may be next w.e., to see if I can help to split get_properties method into multiple ADB shell commands as suggested by @JeffLIrion. If you have some additional suggestion on expected implementation report it here, otherwise I will create a PR when I will have something ready to discuss on.

@jrousek
Copy link

jrousek commented Jan 9, 2022

I would like to test this on my android TV 10. I just don't know how to get it into my HA. Can anyone advise step by step installation?

@hillbicks
Copy link

I would like to test this on my android TV 10. I just don't know how to get it into my HA. Can anyone advise step by step installation?

Replace the file /usr/local/lib/python3.9/site-packages/androidtv/constants.py with this one.

Beware, the mentioned file is inside the homeassistant docker container though. I haven't tried it, but it seems that the android11 update for the nvidia shield is right around the corner.

@deviant-aut
Copy link
Contributor

deviant-aut commented Jan 12, 2022

Can confirm fork from @barmazu is working on Nvidia Shield TV 2017 with Android 11

It shows active app and state


source_list:
  - com.android.systemui
  - com.google.android.ext.services
  - com.nvidia.blakepairing
  - com.nvidia.shieldtech.accessoryui
  - com.nvidia.shield.remote.server
  - com.nvidia.osc
  - com.nvidia.app.messaging
  - com.android.providers.media.module
  - flar2.homebutton
  - net.dinglisch.android.taskerm
  - com.appgeneration.itunerfree
  - Spotify
  - com.nvidia.shield.ask
  - com.android.providers.tv
  - Google Cast
  - com.plexapp.mediaserver.smb:sambaserver
  - com.nvidia.tegrazone3:PersonalGridService
  - Kodi
  - com.google.android.gms.persistent
  - com.google.android.tv.remote.service
  - com.google.android.tvrecommendations
  - Android TV Launcher
  - Play Store
  - com.google.android.inputmethod.latin
  - com.google.android.gms
  - com.google.android.katniss:interactor
  - com.google.android.katniss:search
  - Netflix
  - com.plexapp.mediaserver.smb
  - com.google.process.gservices
volume_level: 0
is_volume_muted: false
app_id: com.netflix.ninja
app_name: Netflix
source: Netflix
adb_response: null
hdmi_input: null
friendly_name: Android TV 1
entity_picture: >-
  /api/media_player_proxy/media_player.android_tv_1?token=ac9bcf744cd043f64a3485120bd18537baad3e0b79fea408e726bc17f73a3ca8&cache=1642029753.262722
supported_features: 23997

grafik

@Mangomc
Copy link

Mangomc commented Jan 13, 2022

I would like to test this on my android TV 10. I just don't know how to get it into my HA. Can anyone advise step by step installation?

Replace the file /usr/local/lib/python3.9/site-packages/androidtv/constants.py with this one.

Beware, the mentioned file is inside the homeassistant docker container though. I haven't tried it, but it seems that the android11 update for the nvidia shield is right around the corner.

Do you know where i have to put the file in HassOS? The path u send doesnt exist :(

@deviant-aut
Copy link
Contributor

run "docker exec -it homeassistant bash" to launch terminal in container. There you will find the path.

@Moustik2002
Copy link

Moustik2002 commented Jan 13, 2022

I've logged into hassio through SSH and unfortunately i don't have a folder Pyhton inside lib only perl5 is available :
image

Do i have to create it ? (i've already Android TV integration though)

@Iceman248
Copy link

Iceman248 commented Jan 13, 2022

I figured out I needed to use "docker cp" command from outside the container to copy the new file over from the OS to within the docker. I use HA Core.

@tungmeister
Copy link
Contributor

This is 90% reliable for me with my Nvidia shield on Android 11. The only issue I'm encountering (for my needs) is that every so often the media player state will randomly change to standby resulting in my lighting increasing in brightness.

@barmazu
Copy link

barmazu commented Jan 13, 2022

@tungmeister wake_lock_size and/or media_session_state change when this happens?

@tungmeister
Copy link
Contributor

@tungmeister wake_lock_size and/or media_session_state change when this happens?

next time it happens I'll try and get the details.

@barmazu
Copy link

barmazu commented Jan 13, 2022

@barmazu here's the response when watching youtube, hopefully I timed this correctly.

Looks good, but how this is different when you see "playing" state? How often state shifts from "playing" to "standby"?
Does it stay for long in incorrect state? Have you tried to use custom state detection?
So far I haven't seen such case on my TCL TV but I'll try to update Shield and see how that goes.
Maybe this is specific to Android 11 implementation by Nvidia, who knows.

@tungmeister
Copy link
Contributor

@barmazu here's the response when watching youtube, hopefully I timed this correctly.

Looks good, but how this is different when you see "playing" state? How often state shifts from "playing" to "standby"? Does it stay for long in incorrect state? Have you tried to use custom state detection? So far I haven't seen such case on my TCL TV but I'll try to update Shield and see how that goes. Maybe this is specific to Android 11 implementation by Nvidia, who knows.

it lasts for about 10 seconds or so. The problem as as soon as I "GET_PROPERTIES" that returns the right wait lock and session state so the lights dim again. It's happened maybe 8 times this evening. (4-5 hours of playback)

@barmazu
Copy link

barmazu commented Jan 13, 2022

OK, that quite often I'd say.
Would you be so kind and check updated audio_state detection cmds? Maybe it help as it also takes part in state detection?
Comment out old CMD_AUDIO_STATE and paste below:

CMD_AUDIO_STATE_RAW = "CURRENT_AUDIO_STATE=$(dumpsys audio | sed -r -n '/[0-9]{2}-[0-9]{2}.*player piid:.*state:.*$/h; ${x;p;}') && "
CMD_AUDIO_STATE = CMD_AUDIO_STATE_RAW + r"echo $CURRENT_AUDIO_STATE | grep paused >/dev/null 2>&1 && echo -e '1\c' || { echo $CURRENT_AUDIO_STATE | grep started >/dev/null 2>&1 && echo '2\c' || echo '0\c' ; }"

It will evaluate the very last audio player state entry (as seen by logs) which should be most recent app playing audio...
Regarding PROPERTIES catching problem, just add adb_command to your dim automation :D

Thanks!

@Moustik2002
Copy link

Sorry to bother you guys but, could somebody explain me how to be able to see folder Pyhton inside lib ?

@Iceman248
Copy link

Sorry to bother you guys but, could somebody explain me how to be able to see folder Pyhton inside lib ?

Not sure if same for you, but I didn't have a "local" folder with the Core Docker install. I had to skip that directory.

@tungmeister
Copy link
Contributor

the response from the same command when it's 'behaving' :

source_list: com.google.android.ext.services, com.nvidia.shield.ask, nl.rogro82.pipup, Spotify, com.google.android.inputmethod.latin, flar2.homebutton, com.google.android.tv.remote.service, com.google.android.gms.persistent, com.nvidia.blakepairing, com.dolby.android.audio.service, com.nvidia.shieldtech.accessoryui, com.nvidia.shield.remote.server, com.android.providers.media.module, Plex, com.android.systemui
volume_level: 1
is_volume_muted: false
app_id: com.plexapp.android
app_name: Plex
source: Plex
adb_response: WINDOW MANAGER WINDOWS (dumpsys window windows)
  Window #0 Window{147391 u0 InputMethod}:
    mDisplayId=0 rootTaskId=1 mSession=Session{96c4021 6044:u0a10065} mClient=android.os.BinderProxy@c6859b8
    mOwnerUid=10065 showForAllUsers=false package=com.google.android.inputmethod.latin appop=NONE
    mAttrs={(0,0)(fillxfill) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=INPUT_METHOD fmt=TRANSPARENT wanim=0x1030056
      fl=NOT_FOCUSABLE LAYOUT_IN_SCREEN SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FIT_INSETS_CONTROLLED
      fitTypes=STATUS_BARS NAVIGATION_BARS
      fitSides=LEFT TOP RIGHT
      fitIgnoreVis}
    Requested w=1920 h=1080 mLayoutSeq=524
    mIsImWindow=true mIsWallpaper=false mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=151000 mSubLayer=0    mToken=WindowToken{69ea237 android.os.Binder@3b52336}
    mViewVisibility=0x8 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,1080][0,0] mGivenVisibleInsets=[0,0][0,0]
    mTouchableInsets=2 mGivenInsetsPending=false
    touchable region=SkRegion((0,0,1920,1080))
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mLastReportedConfiguration={0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?ldr ?wideColorGamut ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=null mWindowingMode=undefined mDisplayWindowingMode=undefined mActivityType=undefined mAlwaysOnTop=undefined mRotation=undefined}}
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[0,0][0,0]
    ContainerAnimator:
      mLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592 mAnimationType=32
      Animation: com.android.server.wm.InsetsSourceProvider$ControlAdapter@a743b63
        ControlAdapter
         mCapturedLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592    WindowStateAnimator{f27a360 InputMethod}:
      mDrawState=NO_SURFACE       mLastHidden=false
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
      mShownAlpha=0.0 mAlpha=1.0 mLastAlpha=0.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #1 Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}:
    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@ae937c8
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION fmt=TRANSLUCENT wanim=0x10302fe preferredDisplayMode=19
      fl=KEEP_SCREEN_ON LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
      vsysui=HIDE_NAVIGATION FULLSCREEN LAYOUT_STABLE LAYOUT_HIDE_NAVIGATION LAYOUT_FULLSCREEN IMMERSIVE_STICKY
      bhv=SHOW_TRANSIENT_BARS_BY_SWIPE
      fitSides=}
    Requested w=1920 h=1080 mLayoutSeq=526
    mBaseLayer=21000 mSubLayer=0    mToken=ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
    mActivityRecord=ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
    mAppDied=false    drawnStateEvaluated=true    mightAffectAllDrawn=true
    mViewVisibility=0x0 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x1706
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{abfbda7 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}:
      mSurface=Surface(name=com.plexapp.android/com.plexapp.plex.player.PlayerActivity)/@0x596d254
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 1920 x 1080 transform=(1.0, 0.0, 1.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=false
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #2 Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}:
    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@979d929
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION wanim=0x10302fe sysuil=true
      fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
      vsysui=HIDE_NAVIGATION FULLSCREEN LAYOUT_STABLE LAYOUT_HIDE_NAVIGATION LAYOUT_FULLSCREEN IMMERSIVE
      bhv=SHOW_BARS_BY_SWIPE
      fitSides=}
    Requested w=1920 h=1080 mLayoutSeq=486
    mBaseLayer=21000 mSubLayer=0    mToken=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mActivityRecord=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mAppDied=false    drawnStateEvaluated=true    mightAffectAllDrawn=true
    mViewVisibility=0x8 mHaveFrame=true mObscured=false
    mSeq=1 mSystemUiVisibility=0xf00
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{ab813c7 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}:
      mDrawState=NO_SURFACE       mLastHidden=true
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #3 Window{ba9d3ef u0 com.android.systemui.ImageWallpaper}:
    mDisplayId=0 rootTaskId=1 mSession=Session{6b95d0 21294:u0a10038} mClient=android.os.BinderProxy@5bba8ce
    mOwnerUid=10038 showForAllUsers=false package=com.android.systemui appop=NONE
    mAttrs={(0,0)(1920x1920) gr=TOP START CENTER layoutInDisplayCutoutMode=always ty=WALLPAPER fmt=RGBX_8888 wanim=0x103030e
      fl=NOT_FOCUSABLE NOT_TOUCHABLE LAYOUT_IN_SCREEN LAYOUT_NO_LIMITS SCALED LAYOUT_INSET_DECOR}
    Requested w=64 h=64 mLayoutSeq=492
    mIsImWindow=false mIsWallpaper=true mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=11000 mSubLayer=0    mToken=WallpaperWindowToken{594fcac token=android.os.Binder@47d3a5f}
    mViewVisibility=0x0 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mHasSurface=true isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[-10000,-10000][10000,10000]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1920] last=[0,0][1920,1920]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,840] visible=[0,0][0,840] stable=[0,0][0,840]    Lst insets: content=[0,0][0,840] visible=[0,0][0,840] stable=[0,0][0,840]
     surface=[0,0][0,0]
    WindowStateAnimator{64555fd com.android.systemui.ImageWallpaper}:
       mAnimationIsEntrance=true      mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0xa66e2f2
      Surface: shown=false layer=0 alpha=0.0 rect=(-96.0,-516.0) 64 x 64 transform=(33.0, 0.0, 33.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=true
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
      mShownAlpha=1.0 mAlpha=1.0 mLastAlpha=-1.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    mHScale=30.0 mVScale=30.0
    mWallpaperX=0.0 mWallpaperY=0.5
    mWallpaperZoomOut=0.0
    isOnScreen=true
    isVisible=false
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }

  mGlobalConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
  mHasPermanentDpad=true
  mTopFocusedDisplayId=0
  mInputMethodTarget in display# 0 Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
  mInputMethodInputTarget in display# 0 Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
  inputMethodControlTarget in display# 0 Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
  mInTouchMode=false
  mLastDisplayFreezeDuration=+750ms due to Window{282d0d5 u0 com.android.systemui.ImageWallpaper}
  mLastWakeLockHoldingWindow=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity} mLastWakeLockObscuringWindow=null
  mHighResTaskSnapshotScale=1.0
  SnapshotCache
  mInputMethodWindow=Window{147391 u0 InputMethod}
  mTraversalScheduled=false
  mHoldScreenWindow=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
  mObscuringWindow=null
  mSystemBooted=true mDisplayEnabled=true
  mTransactionSequence=701
  mDisplayFrozen=false windows=0 client=false apps=0  mRotation=0  mLastOrientation=-1
 waitingForConfig=false
  Animation settings: disabled=false window=1.0 transition=1.0 animator=1.0
  PolicyControl.sImmersiveStatusFilter=null
  PolicyControl.sImmersiveNavigationFilter=null
  PolicyControl.sImmersivePreconfirmationsFilter=null
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  Stack #3294: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    mResumedActivity: ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
    mLastPausedActivity: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    * Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a111 mCallingUid=u0a111 mUserSetupComplete=true mCallingPackage=com.plexapp.android mCallingFeatureId=null
      affinity=10111:com.plexapp.android
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.plexapp.android cmp=com.plexapp.android/com.plexapp.plex.activities.SplashActivity bnds=[109,449][357,629]}
      mActivityComponent=com.plexapp.android/com.plexapp.plex.activities.SplashActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}, ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}]
      askedCompatMode=false inRecents=true isAvailable=true
      mRootProcess=ProcessRecord{c2f6084 20115:com.plexapp.android/u0a111}
      taskId=3294 stackId=3294
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION mSupportsPictureInPicture=false isResizeable=true
      lastActiveTime=181739840 (inactive for 1s)
      * Hist #1: ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
          packageName=com.plexapp.android processName=com.plexapp.android
          launchedFromUid=10111 launchedFromPackage=com.plexapp.android launchedFromFeature=null userId=0
          app=ProcessRecord{c2f6084 20115:com.plexapp.android/u0a111}
          Intent { flg=0x10800000 cmp=com.plexapp.android/com.plexapp.plex.player.PlayerActivity (has extras) }
          rootOfTask=false task=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
          taskAffinity=10111:com.plexapp.android
          mActivityComponent=com.plexapp.android/com.plexapp.plex.player.PlayerActivity
          baseDir=/data/app/~~9Fyh31MoKRk1RoWimdyCfA==/com.plexapp.android-1t_K0lMeA-e0t-rGHE0LMA==/base.apk
          dataDir=/data/user/0/com.plexapp.android
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f130523 icon=0x7f100000 theme=0x7f140331
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff1f2326
            backgroundColor=ff000000 statusBarColor=ff263238 navigationBarColor=ff000000
          launchFailed=false launchCount=1 lastLaunchTime=-15m4s587ms
          mHaveState=false mIcicle=null
          state=RESUMED stopped=false delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_NOT_SHOWN
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=-1
          mVisibleRequested=true mVisible=true mClientVisible=true reportedDrawn=true reportedVisible=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=true lastAllDrawn=true)
          startingData=null firstWindowDrawn=true mIsExiting=false
          nowVisible=true lastVisibleTime=-15m3s852ms
          resizeMode=RESIZE_MODE_RESIZEABLE
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false
          supportsPictureInPicture=true
          supportsEnterPipOnTaskSwitch: false
      * Hist #0: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
          packageName=com.plexapp.android processName=com.plexapp.android
          launchedFromUid=10111 launchedFromPackage=com.plexapp.android launchedFromFeature=null userId=0
          app=ProcessRecord{c2f6084 20115:com.plexapp.android/u0a111}
          Intent { flg=0x14008000 cmp=com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity (has extras) }
          rootOfTask=true task=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
          taskAffinity=10111:com.plexapp.android
          mActivityComponent=com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity
          baseDir=/data/app/~~9Fyh31MoKRk1RoWimdyCfA==/com.plexapp.android-1t_K0lMeA-e0t-rGHE0LMA==/base.apk
          dataDir=/data/user/0/com.plexapp.android
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f130082 icon=0x7f100000 theme=0x7f14031c
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff37474f
            backgroundColor=ff000000 statusBarColor=ff263238 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-15m21s214ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=20084]
          state=STOPPED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_NOT_SHOWN
          occludesParent=true noDisplay=false immersive=false launchMode=1
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=-1
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=true lastAllDrawn=true)
          startingData=null firstWindowDrawn=true mIsExiting=false
          nowVisible=false lastVisibleTime=-15m19s674ms
          resizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #1: type=home mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a29 mCallingUid=0 mUserSetupComplete=true mCallingPackage=null mCallingFeatureId=null
      affinity=10029:.TvLauncher
      intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity}
      mActivityComponent=com.google.android.tvlauncher/.MainActivity
      autoRemoveRecents=false isPersistable=false activityType=2
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3288 stackId=1
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_UNRESIZEABLE mSupportsPictureInPicture=false isResizeable=false
      lastActiveTime=175733005 (inactive for 6008s)
      * Hist #0: ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}
          packageName=com.google.android.tvlauncher processName=com.google.android.tvlauncher
          launchedFromUid=0 launchedFromPackage=null launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity }
          rootOfTask=true task=Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
          taskAffinity=10029:.TvLauncher
          mActivityComponent=com.google.android.tvlauncher/.MainActivity
          baseDir=/data/app/com.google.android.tvlauncher-933kGc203UXcK9OF_f1zWg==/base.apk
          dataDir=/data/user/0/com.google.android.tvlauncher
          stateNotNeeded=true componentSpecified=false mActivityType=home
          compat={320dpi always-compat} labelRes=0x7f13002b icon=0x7f100000 theme=0x7f140007
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=home mAlwaysOnTop=undefined mRotation=ROTATION_0} s.12}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=home mAlwaysOnTop=undefined mRotation=ROTATION_0} s.13}
          RequestedOverrideConfiguration={0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?ldr ?wideColorGamut ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=null mWindowingMode=undefined mDisplayWindowingMode=undefined mActivityType=home mAlwaysOnTop=undefined mRotation=undefined}}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff37474f
            backgroundColor=ff303030 statusBarColor=ff263238 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-2h9m23s896ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=6168]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=home
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=0
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-1h41m29s934ms
          resizeMode=RESIZE_MODE_UNRESIZEABLE
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #3293: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a89 mCallingUid=u0a89 mUserSetupComplete=true mCallingPackage=com.google.android.youtube.tv mCallingFeatureId=null
      affinity=10089:com.google.android.youtube.tv.main
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x15000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity}
      mActivityComponent=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3293 stackId=3293
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION mSupportsPictureInPicture=false isResizeable=true
      lastActiveTime=175650823 (inactive for 6090s)
      * Hist #0: ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}
          packageName=com.google.android.youtube.tv processName=com.google.android.youtube.tv
          launchedFromUid=10089 launchedFromPackage=com.google.android.youtube.tv launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x15000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity bnds=[297,449][545,629] }
          rootOfTask=true task=Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
          taskAffinity=10089:com.google.android.youtube.tv.main
          mActivityComponent=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity
          baseDir=/data/app/com.google.android.youtube.tv-IMZ_mIxmDWcvhgmQQmTu3w==/base.apk
          dataDir=/data/user/0/com.google.android.youtube.tv
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f130030 icon=0x7f100000 theme=0x7f140103
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff282828
            backgroundColor=ff303030 statusBarColor=ff000000 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-2h9m13s249ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=256]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=6
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-2h9m12s817ms
          resizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #3289: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a90 mCallingUid=u0a29 mUserSetupComplete=true mCallingPackage=com.google.android.tvlauncher mCallingFeatureId=null
      affinity=10090:com.netflix.ninja
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja cmp=com.netflix.ninja/.MainActivity bnds=[513,449][761,629]}
      mActivityComponent=com.netflix.ninja/.MainActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3289 stackId=3289
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_UNRESIZEABLE mSupportsPictureInPicture=false isResizeable=false
      lastActiveTime=173977853 (inactive for 7763s)
      * Hist #0: ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}
          packageName=com.netflix.ninja processName=com.netflix.ninja
          launchedFromUid=10029 launchedFromPackage=com.google.android.tvlauncher launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja cmp=com.netflix.ninja/.MainActivity bnds=[513,449][761,629] }
          rootOfTask=true task=Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
          taskAffinity=10090:com.netflix.ninja
          mActivityComponent=com.netflix.ninja/.MainActivity
          baseDir=/data/app/com.netflix.ninja-z5tynVXGlVtlecdZew5HFg==/base.apk
          dataDir=/data/user/0/com.netflix.ninja
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f0e001d icon=0x7f070176 theme=0x7f0f013a
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff000000
            backgroundColor=ff000000 statusBarColor=ff000000 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-2h9m27s736ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=1672]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=-1
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-2h9m27s97ms
          resizeMode=RESIZE_MODE_UNRESIZEABLE
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Resumed activities in task display areas (from top to bottom):
    Resumed: ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}

  ResumedActivity: ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}

ActivityStackSupervisor state:
  topDisplayFocusedStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
  mLastOrientationSource=ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
  Display: mDisplayId=0 stacks=4
    init=3840x2160 320dpi base=1920x1080 320dpi cur=1920x1080 app=1920x1080 rng=1080x1080-1920x1920
    deferred=false mLayoutNeeded=false mTouchExcludeRegion=SkRegion((0,0,1920,1080))

  mLayoutSeq=526
  mCurrentFocus=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
  mFocusedApp=ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
  mLastStatusBarVisibility=0x970e

  displayId=0
  mWallpaperTarget=null
  mLastWallpaperX=-1.0 mLastWallpaperY=-1.0

  Task display areas in top down Z order:
    TaskDisplayArea DefaultTaskDisplayArea
      mLastOrientationSource=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
      mPreferredTopFocusableStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
      mLastFocusedStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
      Application tokens in top down Z order:
      * Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=2}
        mLastOrientationSource=ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
        bounds=[0,0][1920,1080]
        * ActivityRecord{c45f340 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity t3294}
        * ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
      * Task{239addc #1 visible=false type=home mode=fullscreen translucent=true I=com.google.android.tvlauncher/.MainActivity U=0 StackId=1 sz=1}
        bounds=[0,0][1920,1080]
        * Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
          bounds=[0,0][1920,1080]
          * ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}
      * Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
        bounds=[0,0][1920,1080]
        * ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}
      * Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
        bounds=[0,0][1920,1080]
        * ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}

  mScreenRotationAnimation:
    mSurface=null mWidth=1920 mHeight=1080
    mEnteringBlackFrame=null
    mCurRotation=0 mOriginalRotation=0
    mOriginalWidth=1920 mOriginalHeight=1080
    mStarted=true mAnimRunning=false mFinishAnimReady=true mFinishAnimStartTime=-1
    mRotateExitAnimation=null {alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mRotateEnterAnimation=null {alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mEnterTransformation={alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mSnapshotInitialMatrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]
    mForceDefaultOrientation=true mOriginalDisplayRect=[-960,-540][2880,1620] mCurrentDisplayRect=[-960,-540][2880,1620]

  homeStack=Task=1

  PinnedStackController
    mIsImeShowing=false
    mImeHeight=0
    mAspectRatio=-1.0
    mMinAspectRatio=0.41841003
    mMaxAspectRatio=2.39
    mActions=[]
    mDisplayInfo=DisplayInfo{"Built-in Screen", displayId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1920 x 1080, largest app 1920 x 1920, smallest app 1080 x 1080, appVsyncOff 1000000, presDeadline 16683333, mode 31, defaultMode 31, modes [{id=1, width=4096, height=2160, fps=29.97003}, {id=2, width=4096, height=2160, fps=23.976025}, {id=3, width=1920, height=1080, fps=29.97003}, {id=4, width=1920, height=1080, fps=23.976025}, {id=5, width=1920, height=1080, fps=59.94006}, {id=6, width=3840, height=2160, fps=23.976025}, {id=7, width=3840, height=2160, fps=29.97003}, {id=8, width=1280, height=720, fps=59.94006}, {id=9, width=4096, height=2160, fps=30.000002}, {id=10, width=4096, height=2160, fps=25.0}, {id=11, width=4096, height=2160, fps=24.000002}, {id=12, width=1920, height=1080, fps=30.000002}, {id=13, width=1920, height=1080, fps=25.0}, {id=14, width=1920, height=1080, fps=24.000002}, {id=15, width=1920, height=1080, fps=50.0}, {id=16, width=1280, height=720, fps=50.0}, {id=17, width=720, height=576, fps=50.0}, {id=18, width=720, height=480, fps=60.000004}, {id=19, width=3840, height=2160, fps=24.000002}, {id=20, width=3840, height=2160, fps=50.0}, {id=21, width=3840, height=2160, fps=30.000002}, {id=22, width=3840, height=2160, fps=25.0}, {id=23, width=3840, height=2160, fps=60.000004}, {id=24, width=1280, height=1024, fps=60.000004}, {id=25, width=1280, height=960, fps=60.000004}, {id=26, width=1280, height=720, fps=60.000004}, {id=27, width=1024, height=768, fps=60.000004}, {id=28, width=800, height=600, fps=60.000004}, {id=29, width=640, height=480, fps=60.000004}, {id=30, width=1920, height=1080, fps=60.000004}, {id=31, width=3840, height=2160, fps=59.94006}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[2], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, minimalPostProcessingSupported false, rotation 0, state ON, type INTERNAL, uniqueId "local:0", app 1920 x 1080, density 320 (213.0 x 213.0) dpi, layerStack 0, colorMode 0, supportedColorModes [0, 5, 7, 9, 11], address {port=0}, deviceProductInfo null, removeMode 0}

  DisplayFrames w=1920 h=1080 r=0
    mStable=[0,0][1920,1080]
    mStableFullscreen=[0,0][1920,1080]
    mDock=[0,0][1920,1080]
    mCurrent=[0,0][1920,1080]
    mSystem=[0,0][1920,1080]
    mContent=[0,0][1920,1080]
    mVoiceContent=[0,0][1920,1080]
    mRestricted=[0,0][1920,1080]
    mUnrestricted=[0,0][1920,1080]
    mDisplayCutout=WmDisplayCutout{DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}, mFrameSize=null}

  DisplayPolicy
    mCarDockEnablesAccelerometer=true mDeskDockEnablesAccelerometer=true
    mDockMode=EXTRA_DOCK_STATE_UNDOCKED mLidState=LID_ABSENT
    mAwake=true mScreenOnEarly=true mScreenOnFully=true
    mKeyguardDrawComplete=true mWindowManagerDrawComplete=true
    mHdmiPlugged=true
    mLastSystemUiFlags=0x970e mResettingSystemUiFlags=0x0 mForceClearedSystemUiFlags=0x0
    mShowingDream=false mDreamingLockscreen=false isKeyguardShowing=false
    mFocusedWindow=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
    mTopFullscreenOpaqueWindowState=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
    mTopFullscreenOpaqueOrDimmingWindowState=Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
    mTopIsFullscreen=false
    mForceStatusBar=false    mRemoteInsetsControllerControlsSystemBarsfalse mAllowLockscreenWhenOn=false
    Looper state:
      Looper (android.ui, tid 19) {4c5245f}
        (Total messages: 0, polling=true, quitting=false)

  DisplayRotation
    mCurrentAppOrientation=SCREEN_ORIENTATION_UNSPECIFIED
    mLastOrientation=-1
    mRotation=0 mDeferredRotationPauseCount=0
    mLandscapeRotation=ROTATION_0 mSeascapeRotation=ROTATION_180
    mPortraitRotation=ROTATION_270 mUpsideDownRotation=ROTATION_90
    mSupportAutoRotation=true
    WindowOrientationListener
      mEnabled=false
      mCurrentRotation=ROTATION_0
      mSensorType=null
      mSensor=null
      mRate=2

    mCarDockRotation=-1 mDeskDockRotation=-1
    mUserRotationMode=USER_ROTATION_FREE mUserRotation=ROTATION_0 mAllowAllRotations=unknown
    mDemoHdmiRotation=ROTATION_0 mDemoHdmiRotationLock=false mUndockedHdmiRotation=-1
    mLidOpenRotation=-1
    mFixedToUserRotation=true


  WindowInsetsStateController
    InsetsState
      InsetsSource type=ITYPE_IME frame=[0,0][0,0] visible=false
    Control map:
    ITYPE_IME -> Window{fbe061 u0 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}
    InsetsSourceProviders map:
    ITYPE_IME -> 
  InsetsSourceProvider
   mSource=    InsetsSource type=ITYPE_IME frame=[0,0][0,0] visible=false
   mControl=    InsetsSourceControl type=ITYPE_IME mLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592 mSurfacePosition=Point(0, 0)
   mFakeControl=    InsetsSourceControl type=ITYPE_IME mLeash=null mSurfacePosition=Point(0, 0)
 mIsLeashReadyForDispatching=true mImeOverrideFrame=Rect(0, 0 - 0, 0)   mWin=    mDisplayId=0 rootTaskId=1 mSession=Session{96c4021 6044:u0a10065} mClient=android.os.BinderProxy@c6859b8
    mOwnerUid=10065 showForAllUsers=false package=com.google.android.inputmethod.latin appop=NONE
    mAttrs={(0,0)(fillxfill) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=INPUT_METHOD fmt=TRANSPARENT wanim=0x1030056
      fl=NOT_FOCUSABLE LAYOUT_IN_SCREEN SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FIT_INSETS_CONTROLLED
      fitTypes=STATUS_BARS NAVIGATION_BARS
      fitSides=LEFT TOP RIGHT
      fitIgnoreVis}
    Requested w=1920 h=1080 mLayoutSeq=524
    mIsImWindow=true mIsWallpaper=false mIsFloatingLayer=true mWallpaperVisible=false
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    ContainerAnimator:
      mLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592 mAnimationType=32
      Animation: com.android.server.wm.InsetsSourceProvider$ControlAdapter@a743b63
        ControlAdapter
         mCapturedLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592    WindowStateAnimator{f27a360 InputMethod}:
      mShownAlpha=0.0 mAlpha=1.0 mLastAlpha=0.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
   mAdapter=    ControlAdapter
     mCapturedLeash=Surface(name=Surface(name=147391 InputMethod)/@0xd86b6f7 - animation-leash)/@0x361f592   mControlTarget=    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@ae937c8
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION fmt=TRANSLUCENT wanim=0x10302fe preferredDisplayMode=19
      fl=KEEP_SCREEN_ON LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
      vsysui=HIDE_NAVIGATION FULLSCREEN LAYOUT_STABLE LAYOUT_HIDE_NAVIGATION LAYOUT_FULLSCREEN IMMERSIVE_STICKY
      bhv=SHOW_TRANSIENT_BARS_BY_SWIPE
      fitSides=}
    Requested w=1920 h=1080 mLayoutSeq=526
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    WindowStateAnimator{abfbda7 com.plexapp.android/com.plexapp.plex.player.PlayerActivity}:
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 1920 x 1080 transform=(1.0, 0.0, 1.0, 0.0)
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true

  KeyguardController:
    mKeyguardShowing=false
    mAodShowing=false
    mKeyguardGoingAway=false
    Occluded=false DismissingKeyguardActivity=null at display=0
    mDismissalRequested=false

  LockTaskController:
    mLockTaskModeState=NONE
    mLockTaskModeTasks=
    mLockTaskPackages (userId:packages)=
      u0:[]

  mCurTaskIdForUser={0=3296}
  mUserStackInFront={}
  mVisibilityTransactionDepth=0
  isHomeRecentsComponent=false

  TaskOrganizerController:
    Per windowing mode:
      pinned:
        android.window.ITaskOrganizer$Stub$Proxy@97f9eac uid=10038:

@barmazu
Copy link

barmazu commented Jan 15, 2022

Thanks! Much appreciated your time.
Outputs are not the same ;-)
Some adjustments are needed for CURRENT_APP greps.

@tungmeister
Copy link
Contributor

Thanks! Much appreciated your time. Outputs are not the same ;-) Some adjustments are needed for CURRENT_APP greps.

Another issue in plex, drop-down menus are being interpreted as a playing state:

app_id: PopupWindow:f999ff5
app_name: PopupWindow:f999ff5
source: PopupWindow:f999ff5
adb_response: {'screen_on': True, 'awake': True, 'audio_state': 'playing', 'wake_lock_size': 0, 'current_app': 'PopupWindow:f999ff5', 'media_session_state': None, 'audio_output_device': 'hdmi', 'is_volume_muted': False, 'volume': 15, 'running_apps': ['com.google.android.ext.services', 'flar2.homebutton', 'com.google.android.tv.remote.service', 'com.google.android.gms.persistent', 'com.nvidia.blakepairing', 'com.dolby.android.audio.service', 'com.nvidia.shieldtech.accessoryui', 'com.nvidia.shield.remote.server', 'com.android.providers.media.module', 'com.google.android.katniss:interactor', 'com.google.android.katniss:search', 'com.google.android.inputmethod.latin', 'com.reelgood.android', 'com.nvidia.shield.ask', 'com.spotify.tv.android', 'com.google.android.apps.mediashell', 'com.plexapp.android', 'nl.rogro82.pipup', 'com.google.android.apps.mediashell:privileged_process0', 'com.android.systemui', 'com.google.android.gms', 'com.google.process.gservices'], 'hdmi_input': None}

@barmazu
Copy link

barmazu commented Jan 15, 2022

@tungmeister Please update line as below and check:
CMD_DEFINE_CURRENT_APP_VARIABLE = "CURRENT_APP=$(dumpsys window windows | grep -m1 -E 'inputMethodControlTarget in display# 0|mCurrentFocus=' | grep -o Window{.*}) && " + CMD_PARSE_CURRENT_APP
(Also pushed on my repo)

EDIT:
I'd need additional dumpsys window windows with pop-up window active to see what wee can do about it.

@tungmeister
Copy link
Contributor

@barmazu i'll update. for the popup:

source_list: com.google.android.ext.services, flar2.homebutton, com.google.android.tv.remote.service, com.google.android.gms.persistent, com.nvidia.blakepairing, com.dolby.android.audio.service, com.nvidia.shieldtech.accessoryui, com.nvidia.shield.remote.server, com.android.providers.media.module, com.google.android.katniss:interactor, com.google.android.katniss:search, com.google.android.inputmethod.latin, com.reelgood.android, com.nvidia.shield.ask, Spotify, Plex, nl.rogro82.pipup, com.android.systemui, Google Cast, com.google.android.apps.mediashell:privileged_process0, com.google.android.gms, Live Channels, com.google.process.gservices
volume_level: 1
is_volume_muted: false
app_id: PopupWindow:1fe81ff
app_name: PopupWindow:1fe81ff
source: PopupWindow:1fe81ff
adb_response: WINDOW MANAGER WINDOWS (dumpsys window windows)
  Window #0 Window{31879b5 u0 InputMethod}:
    mDisplayId=0 rootTaskId=1 mSession=Session{dd40678 19209:u0a10065} mClient=android.os.BinderProxy@6a5d1ec
    mOwnerUid=10065 showForAllUsers=false package=com.google.android.inputmethod.latin appop=NONE
    mAttrs={(0,0)(fillxfill) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=INPUT_METHOD fmt=TRANSPARENT wanim=0x1030056
      fl=NOT_FOCUSABLE LAYOUT_IN_SCREEN SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FIT_INSETS_CONTROLLED
      fitTypes=STATUS_BARS NAVIGATION_BARS
      fitSides=LEFT TOP RIGHT
      fitIgnoreVis}
    Requested w=1920 h=1080 mLayoutSeq=554
    mIsImWindow=true mIsWallpaper=false mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=151000 mSubLayer=0    mToken=WindowToken{e214ad4 android.os.Binder@a7ec827}
    mViewVisibility=0x8 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,1080][0,0] mGivenVisibleInsets=[0,0][0,0]
    mTouchableInsets=2 mGivenInsetsPending=false
    touchable region=SkRegion((0,0,1920,1080))
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mLastReportedConfiguration={0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?ldr ?wideColorGamut ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=null mWindowingMode=undefined mDisplayWindowingMode=undefined mActivityType=undefined mAlwaysOnTop=undefined mRotation=undefined}}
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[0,0][0,0]
    ContainerAnimator:
      mLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63 mAnimationType=32
      Animation: com.android.server.wm.InsetsSourceProvider$ControlAdapter@13e2760
        ControlAdapter
         mCapturedLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63    WindowStateAnimator{a89ada5 InputMethod}:
      mDrawState=NO_SURFACE       mLastHidden=false
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
      mShownAlpha=0.0 mAlpha=1.0 mLastAlpha=0.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #1 Window{d0add3a u0 PopupWindow:1fe81ff}:
    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@5bf2c65
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(140,224)(400x856) gr=TOP START CENTER DISPLAY_CLIP_VERTICAL sim={state=unchanged adjust=resize} ty=APPLICATION_SUB_PANEL fmt=TRANSLUCENT surfaceInsets=Rect(64, 64 - 64, 64) (manual)
      fl=LAYOUT_NO_LIMITS WATCH_OUTSIDE_TOUCH SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_LAYOUT_ATTACHED_IN_DECOR
      pfl=WILL_NOT_REPLACE_ON_RELAUNCH LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
      fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR IME}
    Requested w=400 h=856 mLayoutSeq=662
    mParentWindow=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity} mLayoutAttached=true
    mBaseLayer=21000 mSubLayer=2    mToken=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mActivityRecord=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mAppDied=false    drawnStateEvaluated=true    mightAffectAllDrawn=true
    mViewVisibility=0x0 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.7}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.7}
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[-10000,-10000][10000,10000]
        content=[140,224][540,1080] visible=[140,224][540,1080]
        decor=[0,0][1920,1080]
    mFrame=[140,224][540,1080] last=[140,224][540,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[64,64][64,64]
    WindowStateAnimator{bb63419 PopupWindow:1fe81ff}:
      mSurface=Surface(name=PopupWindow:1fe81ff)/@0x4c9fcde
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 528 x 984 transform=(1.0, 0.0, 1.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=false
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][400,856] mLastClipRect=[0,0][528,984]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #2 Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}:
    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@979d929
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION wanim=0x10302fe sysuil=true
      fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
      vsysui=HIDE_NAVIGATION FULLSCREEN LAYOUT_STABLE LAYOUT_HIDE_NAVIGATION LAYOUT_FULLSCREEN IMMERSIVE
      bhv=SHOW_BARS_BY_SWIPE
      fitSides=}
    Requested w=1920 h=1080 mLayoutSeq=662
    mBaseLayer=21000 mSubLayer=0    mToken=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mActivityRecord=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mAppDied=false    drawnStateEvaluated=true    mightAffectAllDrawn=true
    mViewVisibility=0x0 mHaveFrame=true mObscured=false
    mSeq=1 mSystemUiVisibility=0xf00
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.7}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.7}
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]    Lst insets: content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{ab813c7 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}:
      mSurface=Surface(name=com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity)/@0x3c0223d
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 1920 x 1080 transform=(1.0, 0.0, 1.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=false
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }
  Window #3 Window{cd53ed6 u0 com.android.systemui.ImageWallpaper}:
    mDisplayId=0 rootTaskId=1 mSession=Session{5993c7b 24490:u0a10038} mClient=android.os.BinderProxy@9ede2f1
    mOwnerUid=10038 showForAllUsers=false package=com.android.systemui appop=NONE
    mAttrs={(0,0)(1920x1920) gr=TOP START CENTER layoutInDisplayCutoutMode=always ty=WALLPAPER fmt=RGBX_8888 wanim=0x103030e
      fl=NOT_FOCUSABLE NOT_TOUCHABLE LAYOUT_IN_SCREEN LAYOUT_NO_LIMITS SCALED LAYOUT_INSET_DECOR}
    Requested w=64 h=64 mLayoutSeq=609
    mIsImWindow=false mIsWallpaper=true mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=11000 mSubLayer=0    mToken=WallpaperWindowToken{594fcac token=android.os.Binder@47d3a5f}
    mViewVisibility=0x0 mHaveFrame=true mObscured=true
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
    mHasSurface=true isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[-10000,-10000][10000,10000]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
    mFrame=[0,0][1920,1920] last=[0,0][1920,1920]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: content=[0,0][0,840] visible=[0,0][0,840] stable=[0,0][0,840]    Lst insets: content=[0,0][0,840] visible=[0,0][0,840] stable=[0,0][0,840]
     surface=[0,0][0,0]
    WindowStateAnimator{8af8b10 com.android.systemui.ImageWallpaper}:
       mAnimationIsEntrance=true      mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0xd7d4609
      Surface: shown=false layer=0 alpha=0.0 rect=(-96.0,-516.0) 64 x 64 transform=(33.0, 0.0, 33.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=true
      mEnterAnimationPending=false      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
      mShownAlpha=1.0 mAlpha=1.0 mLastAlpha=-1.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    mHScale=30.0 mVScale=30.0
    mWallpaperX=0.0 mWallpaperY=0.5
    mWallpaperZoomOut=0.0
    isOnScreen=true
    isVisible=false
    mRequestedInsetsState: InsetsState: {mDisplayFrame=Rect(0, 0 - 0, 0), mSources= {  }

  mGlobalConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
  mHasPermanentDpad=true
  mTopFocusedDisplayId=0
  mInputMethodTarget in display# 0 Window{d0add3a u0 PopupWindow:1fe81ff}
  mInputMethodInputTarget in display# 0 Window{d0add3a u0 PopupWindow:1fe81ff}
  inputMethodControlTarget in display# 0 Window{d0add3a u0 PopupWindow:1fe81ff}
  mInTouchMode=false
  mLastDisplayFreezeDuration=+750ms due to Window{282d0d5 u0 com.android.systemui.ImageWallpaper}
  mLastWakeLockHoldingWindow=null mLastWakeLockObscuringWindow=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}
  mHighResTaskSnapshotScale=1.0
  SnapshotCache
  mInputMethodWindow=Window{31879b5 u0 InputMethod}
  mTraversalScheduled=false
  mHoldScreenWindow=null
  mObscuringWindow=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}
  mSystemBooted=true mDisplayEnabled=true
  mTransactionSequence=865
  mDisplayFrozen=false windows=0 client=false apps=0  mRotation=0  mLastOrientation=-1
 waitingForConfig=false
  Animation settings: disabled=false window=1.0 transition=1.0 animator=1.0
  PolicyControl.sImmersiveStatusFilter=null
  PolicyControl.sImmersiveNavigationFilter=null
  PolicyControl.sImmersivePreconfirmationsFilter=null
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  Stack #3294: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    mResumedActivity: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    mLastPausedActivity: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
    * Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a111 mCallingUid=u0a111 mUserSetupComplete=true mCallingPackage=com.plexapp.android mCallingFeatureId=null
      affinity=10111:com.plexapp.android
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.plexapp.android cmp=com.plexapp.android/com.plexapp.plex.activities.SplashActivity bnds=[109,449][357,629]}
      mActivityComponent=com.plexapp.android/com.plexapp.plex.activities.SplashActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}]
      askedCompatMode=false inRecents=true isAvailable=true
      mRootProcess=ProcessRecord{c2f6084 20115:com.plexapp.android/u0a111}
      taskId=3294 stackId=3294
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION mSupportsPictureInPicture=false isResizeable=true
      lastActiveTime=186232220 (inactive for 1s)
      * Hist #0: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
          packageName=com.plexapp.android processName=com.plexapp.android
          launchedFromUid=10111 launchedFromPackage=com.plexapp.android launchedFromFeature=null userId=0
          app=ProcessRecord{c2f6084 20115:com.plexapp.android/u0a111}
          Intent { flg=0x14008000 cmp=com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity (has extras) }
          rootOfTask=true task=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
          taskAffinity=10111:com.plexapp.android
          mActivityComponent=com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity
          baseDir=/data/app/~~9Fyh31MoKRk1RoWimdyCfA==/com.plexapp.android-1t_K0lMeA-e0t-rGHE0LMA==/base.apk
          dataDir=/data/user/0/com.plexapp.android
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f130082 icon=0x7f100000 theme=0x7f14031c
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.7}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff37474f
            backgroundColor=ff000000 statusBarColor=ff263238 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-1h30m13s462ms
          mHaveState=false mIcicle=null
          state=RESUMED stopped=false delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_NOT_SHOWN
          occludesParent=true noDisplay=false immersive=false launchMode=1
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=-1
          mVisibleRequested=true mVisible=true mClientVisible=true reportedDrawn=true reportedVisible=true
          mNumInterestingWindows=2 mNumDrawnWindows=2 allDrawn=true lastAllDrawn=true)
          startingData=null firstWindowDrawn=true mIsExiting=false
          nowVisible=true lastVisibleTime=-1m11s300ms
          resizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #1: type=home mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a29 mCallingUid=0 mUserSetupComplete=true mCallingPackage=null mCallingFeatureId=null
      affinity=10029:.TvLauncher
      intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity}
      mActivityComponent=com.google.android.tvlauncher/.MainActivity
      autoRemoveRecents=false isPersistable=false activityType=2
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3288 stackId=1
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_UNRESIZEABLE mSupportsPictureInPicture=false isResizeable=false
      lastActiveTime=175733005 (inactive for 10501s)
      * Hist #0: ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}
          packageName=com.google.android.tvlauncher processName=com.google.android.tvlauncher
          launchedFromUid=0 launchedFromPackage=null launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity }
          rootOfTask=true task=Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
          taskAffinity=10029:.TvLauncher
          mActivityComponent=com.google.android.tvlauncher/.MainActivity
          baseDir=/data/app/com.google.android.tvlauncher-933kGc203UXcK9OF_f1zWg==/base.apk
          dataDir=/data/user/0/com.google.android.tvlauncher
          stateNotNeeded=true componentSpecified=false mActivityType=home
          compat={320dpi always-compat} labelRes=0x7f13002b icon=0x7f100000 theme=0x7f140007
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=home mAlwaysOnTop=undefined mRotation=ROTATION_0} s.12}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=home mAlwaysOnTop=undefined mRotation=ROTATION_0} s.13}
          RequestedOverrideConfiguration={0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?ldr ?wideColorGamut ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=null mWindowingMode=undefined mDisplayWindowingMode=undefined mActivityType=home mAlwaysOnTop=undefined mRotation=undefined}}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff37474f
            backgroundColor=ff303030 statusBarColor=ff263238 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-3h24m16s144ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=6168]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=home
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=0
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-2h56m22s182ms
          resizeMode=RESIZE_MODE_UNRESIZEABLE
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #3293: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a89 mCallingUid=u0a89 mUserSetupComplete=true mCallingPackage=com.google.android.youtube.tv mCallingFeatureId=null
      affinity=10089:com.google.android.youtube.tv.main
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x15000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity}
      mActivityComponent=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3293 stackId=3293
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION mSupportsPictureInPicture=false isResizeable=true
      lastActiveTime=175650823 (inactive for 10583s)
      * Hist #0: ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}
          packageName=com.google.android.youtube.tv processName=com.google.android.youtube.tv
          launchedFromUid=10089 launchedFromPackage=com.google.android.youtube.tv launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x15000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity bnds=[297,449][545,629] }
          rootOfTask=true task=Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
          taskAffinity=10089:com.google.android.youtube.tv.main
          mActivityComponent=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity
          baseDir=/data/app/com.google.android.youtube.tv-IMZ_mIxmDWcvhgmQQmTu3w==/base.apk
          dataDir=/data/user/0/com.google.android.youtube.tv
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f130030 icon=0x7f100000 theme=0x7f140103
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff282828
            backgroundColor=ff303030 statusBarColor=ff000000 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-3h24m5s497ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=256]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=6
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-3h24m5s65ms
          resizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Stack #3289: type=standard mode=fullscreen
  isSleeping=false
  mBounds=Rect(0, 0 - 0, 0)
    * Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
      mBounds=Rect(0, 0 - 0, 0)
      mMinWidth=-1 mMinHeight=-1
      userId=0 effectiveUid=u0a90 mCallingUid=u0a29 mUserSetupComplete=true mCallingPackage=com.google.android.tvlauncher mCallingFeatureId=null
      affinity=10090:com.netflix.ninja
      intent={act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja cmp=com.netflix.ninja/.MainActivity bnds=[513,449][761,629]}
      mActivityComponent=com.netflix.ninja/.MainActivity
      autoRemoveRecents=false isPersistable=true activityType=1
      rootWasReset=false mNeverRelinquishIdentity=true mReuseTask=false mLockTaskAuth=LOCK_TASK_AUTH_PINNABLE
      Activities=[ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}]
      askedCompatMode=false inRecents=true isAvailable=true
      taskId=3289 stackId=3289
      mHasBeenVisible=true
      mResizeMode=RESIZE_MODE_UNRESIZEABLE mSupportsPictureInPicture=false isResizeable=false
      lastActiveTime=173977853 (inactive for 12256s)
      * Hist #0: ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}
          packageName=com.netflix.ninja processName=com.netflix.ninja
          launchedFromUid=10029 launchedFromPackage=com.google.android.tvlauncher launchedFromFeature=null userId=0
          app=null
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja cmp=com.netflix.ninja/.MainActivity bnds=[513,449][761,629] }
          rootOfTask=true task=Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
          taskAffinity=10090:com.netflix.ninja
          mActivityComponent=com.netflix.ninja/.MainActivity
          baseDir=/data/app/com.netflix.ninja-z5tynVXGlVtlecdZew5HFg==/base.apk
          dataDir=/data/user/0/com.netflix.ninja
          stateNotNeeded=false componentSpecified=false mActivityType=standard
          compat={320dpi always-compat} labelRes=0x7f0e001d icon=0x7f070176 theme=0x7f0f013a
          mLastReportedConfigurations:
            mGlobalConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.108}
            mOverrideConfig={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
          CurrentConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long hdr widecg land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3}
          taskDescription: label="null" icon=null iconResource=/0 iconFilename=null primaryColor=ff000000
            backgroundColor=ff000000 statusBarColor=ff000000 navigationBarColor=ff000000
          launchFailed=false launchCount=0 lastLaunchTime=-3h24m19s984ms
          mHaveState=true mIcicle=Bundle[mParcelledData.dataSize=1672]
          state=DESTROYED stopped=true delayedResume=false finishing=false
          keysPaused=false inHistory=true setToSleep=false idle=true mStartingWindowState=STARTING_WINDOW_REMOVED
          occludesParent=true noDisplay=false immersive=false launchMode=2
          frozenBeforeDestroy=false forceNewConfig=false
          mActivityType=standard
          windows=[]
          windowType=2 hasVisible=true
          mOccludesParent=true mOrientation=-1
          mVisibleRequested=false mVisible=false mClientVisible=false reportedDrawn=false reportedVisible=false
          mAppStopped=true
          mNumInterestingWindows=1 mNumDrawnWindows=1 allDrawn=false lastAllDrawn=false)
          nowVisible=false lastVisibleTime=-3h24m19s345ms
          resizeMode=RESIZE_MODE_UNRESIZEABLE
          mLastReportedMultiWindowMode=false mLastReportedPictureInPictureMode=false

  Resumed activities in task display areas (from top to bottom):
    Resumed: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}

  ResumedActivity: ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}

ActivityStackSupervisor state:
  topDisplayFocusedStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
  mLastOrientationSource=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
  Display: mDisplayId=0 stacks=4
    init=3840x2160 320dpi base=1920x1080 320dpi cur=1920x1080 app=1920x1080 rng=1080x1080-1920x1920
    deferred=false mLayoutNeeded=false mTouchExcludeRegion=SkRegion((0,0,1920,1080))

  mLayoutSeq=662
  mCurrentFocus=Window{d0add3a u0 PopupWindow:1fe81ff}
  mFocusedApp=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
  mLastStatusBarVisibility=0x8008

  displayId=0
  mWallpaperTarget=null
  mLastWallpaperX=-1.0 mLastWallpaperY=-1.0

  Task display areas in top down Z order:
    TaskDisplayArea DefaultTaskDisplayArea
      mLastOrientationSource=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
      mPreferredTopFocusableStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
      mLastFocusedStack=Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
      Application tokens in top down Z order:
      * Task{82c5619 #3294 visible=true type=standard mode=fullscreen translucent=false A=10111:com.plexapp.android U=0 StackId=3294 sz=1}
        mLastOrientationSource=ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
        bounds=[0,0][1920,1080]
        * ActivityRecord{dfa2799 u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity t3294}
      * Task{239addc #1 visible=false type=home mode=fullscreen translucent=true I=com.google.android.tvlauncher/.MainActivity U=0 StackId=1 sz=1}
        bounds=[0,0][1920,1080]
        * Task{678b98b #3288 visible=true type=home mode=fullscreen translucent=false A=10029:.TvLauncher U=0 StackId=1 sz=1}
          bounds=[0,0][1920,1080]
          * ActivityRecord{bde735a u0 com.google.android.tvlauncher/.MainActivity t3288}
      * Task{d9455e0 #3293 visible=true type=standard mode=fullscreen translucent=false A=10089:com.google.android.youtube.tv.main U=0 StackId=3293 sz=1}
        bounds=[0,0][1920,1080]
        * ActivityRecord{5cf60b0 u0 com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.MainActivity t3293}
      * Task{5bf23f #3289 visible=true type=standard mode=fullscreen translucent=false A=10090:com.netflix.ninja U=0 StackId=3289 sz=1}
        bounds=[0,0][1920,1080]
        * ActivityRecord{21f7ce0 u0 com.netflix.ninja/.MainActivity t3289}

  mScreenRotationAnimation:
    mSurface=null mWidth=1920 mHeight=1080
    mEnteringBlackFrame=null
    mCurRotation=0 mOriginalRotation=0
    mOriginalWidth=1920 mOriginalHeight=1080
    mStarted=true mAnimRunning=false mFinishAnimReady=true mFinishAnimStartTime=-1
    mRotateExitAnimation=null {alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mRotateEnterAnimation=null {alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mEnterTransformation={alpha=1.0 matrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
    mSnapshotInitialMatrix=[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]
    mForceDefaultOrientation=true mOriginalDisplayRect=[-960,-540][2880,1620] mCurrentDisplayRect=[-960,-540][2880,1620]

  homeStack=Task=1

  PinnedStackController
    mIsImeShowing=false
    mImeHeight=0
    mAspectRatio=-1.0
    mMinAspectRatio=0.41841003
    mMaxAspectRatio=2.39
    mActions=[]
    mDisplayInfo=DisplayInfo{"Built-in Screen", displayId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1920 x 1080, largest app 1920 x 1920, smallest app 1080 x 1080, appVsyncOff 1000000, presDeadline 16683333, mode 31, defaultMode 31, modes [{id=1, width=4096, height=2160, fps=29.97003}, {id=2, width=4096, height=2160, fps=23.976025}, {id=3, width=1920, height=1080, fps=29.97003}, {id=4, width=1920, height=1080, fps=23.976025}, {id=5, width=1920, height=1080, fps=59.94006}, {id=6, width=3840, height=2160, fps=23.976025}, {id=7, width=3840, height=2160, fps=29.97003}, {id=8, width=1280, height=720, fps=59.94006}, {id=9, width=4096, height=2160, fps=30.000002}, {id=10, width=4096, height=2160, fps=25.0}, {id=11, width=4096, height=2160, fps=24.000002}, {id=12, width=1920, height=1080, fps=30.000002}, {id=13, width=1920, height=1080, fps=25.0}, {id=14, width=1920, height=1080, fps=24.000002}, {id=15, width=1920, height=1080, fps=50.0}, {id=16, width=1280, height=720, fps=50.0}, {id=17, width=720, height=576, fps=50.0}, {id=18, width=720, height=480, fps=60.000004}, {id=19, width=3840, height=2160, fps=24.000002}, {id=20, width=3840, height=2160, fps=50.0}, {id=21, width=3840, height=2160, fps=30.000002}, {id=22, width=3840, height=2160, fps=25.0}, {id=23, width=3840, height=2160, fps=60.000004}, {id=24, width=1280, height=1024, fps=60.000004}, {id=25, width=1280, height=960, fps=60.000004}, {id=26, width=1280, height=720, fps=60.000004}, {id=27, width=1024, height=768, fps=60.000004}, {id=28, width=800, height=600, fps=60.000004}, {id=29, width=640, height=480, fps=60.000004}, {id=30, width=1920, height=1080, fps=60.000004}, {id=31, width=3840, height=2160, fps=59.94006}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[2], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, minimalPostProcessingSupported false, rotation 0, state ON, type INTERNAL, uniqueId "local:0", app 1920 x 1080, density 320 (213.0 x 213.0) dpi, layerStack 0, colorMode 0, supportedColorModes [0, 5, 7, 9, 11], address {port=0}, deviceProductInfo null, removeMode 0}

  DisplayFrames w=1920 h=1080 r=0
    mStable=[0,0][1920,1080]
    mStableFullscreen=[0,0][1920,1080]
    mDock=[0,0][1920,1080]
    mCurrent=[0,0][1920,1080]
    mSystem=[0,0][1920,1080]
    mContent=[0,0][1920,1080]
    mVoiceContent=[0,0][1920,1080]
    mRestricted=[0,0][1920,1080]
    mUnrestricted=[0,0][1920,1080]
    mDisplayCutout=WmDisplayCutout{DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}, mFrameSize=null}

  DisplayPolicy
    mCarDockEnablesAccelerometer=true mDeskDockEnablesAccelerometer=true
    mDockMode=EXTRA_DOCK_STATE_UNDOCKED mLidState=LID_ABSENT
    mAwake=true mScreenOnEarly=true mScreenOnFully=true
    mKeyguardDrawComplete=true mWindowManagerDrawComplete=true
    mHdmiPlugged=true
    mLastSystemUiFlags=0x8008 mResettingSystemUiFlags=0x0 mForceClearedSystemUiFlags=0x0
    mShowingDream=false mDreamingLockscreen=false isKeyguardShowing=false
    mFocusedWindow=Window{d0add3a u0 PopupWindow:1fe81ff}
    mTopFullscreenOpaqueWindowState=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}
    mTopFullscreenOpaqueOrDimmingWindowState=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity}
    mTopIsFullscreen=false
    mForceStatusBar=false    mRemoteInsetsControllerControlsSystemBarsfalse mAllowLockscreenWhenOn=false
    Looper state:
      Looper (android.ui, tid 19) {4c5245f}
        (Total messages: 0, polling=true, quitting=false)

  DisplayRotation
    mCurrentAppOrientation=SCREEN_ORIENTATION_UNSPECIFIED
    mLastOrientation=-1
    mRotation=0 mDeferredRotationPauseCount=0
    mLandscapeRotation=ROTATION_0 mSeascapeRotation=ROTATION_180
    mPortraitRotation=ROTATION_270 mUpsideDownRotation=ROTATION_90
    mSupportAutoRotation=true
    WindowOrientationListener
      mEnabled=false
      mCurrentRotation=ROTATION_0
      mSensorType=null
      mSensor=null
      mRate=2

    mCarDockRotation=-1 mDeskDockRotation=-1
    mUserRotationMode=USER_ROTATION_FREE mUserRotation=ROTATION_0 mAllowAllRotations=unknown
    mDemoHdmiRotation=ROTATION_0 mDemoHdmiRotationLock=false mUndockedHdmiRotation=-1
    mLidOpenRotation=-1
    mFixedToUserRotation=true


  WindowInsetsStateController
    InsetsState
      InsetsSource type=ITYPE_IME frame=[0,0][0,0] visible=false
    Control map:
    ITYPE_IME -> Window{d0add3a u0 PopupWindow:1fe81ff}
    InsetsSourceProviders map:
    ITYPE_IME -> 
  InsetsSourceProvider
   mSource=    InsetsSource type=ITYPE_IME frame=[0,0][0,0] visible=false
   mControl=    InsetsSourceControl type=ITYPE_IME mLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63 mSurfacePosition=Point(0, 0)
   mFakeControl=    InsetsSourceControl type=ITYPE_IME mLeash=null mSurfacePosition=Point(0, 0)
 mIsLeashReadyForDispatching=true mImeOverrideFrame=Rect(0, 0 - 0, 0)   mWin=    mDisplayId=0 rootTaskId=1 mSession=Session{dd40678 19209:u0a10065} mClient=android.os.BinderProxy@6a5d1ec
    mOwnerUid=10065 showForAllUsers=false package=com.google.android.inputmethod.latin appop=NONE
    mAttrs={(0,0)(fillxfill) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=INPUT_METHOD fmt=TRANSPARENT wanim=0x1030056
      fl=NOT_FOCUSABLE LAYOUT_IN_SCREEN SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
      pfl=FIT_INSETS_CONTROLLED
      fitTypes=STATUS_BARS NAVIGATION_BARS
      fitSides=LEFT TOP RIGHT
      fitIgnoreVis}
    Requested w=1920 h=1080 mLayoutSeq=554
    mIsImWindow=true mIsWallpaper=false mIsFloatingLayer=true mWallpaperVisible=false
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    ContainerAnimator:
      mLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63 mAnimationType=32
      Animation: com.android.server.wm.InsetsSourceProvider$ControlAdapter@13e2760
        ControlAdapter
         mCapturedLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63    WindowStateAnimator{a89ada5 InputMethod}:
      mShownAlpha=0.0 mAlpha=1.0 mLastAlpha=0.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
   mAdapter=    ControlAdapter
     mCapturedLeash=Surface(name=Surface(name=31879b5 InputMethod)/@0xe8f7f16 - animation-leash)/@0xc824f63   mControlTarget=    mDisplayId=0 rootTaskId=3294 mSession=Session{53fb434 20115:u0a10111} mClient=android.os.BinderProxy@5bf2c65
    mOwnerUid=10111 showForAllUsers=false package=com.plexapp.android appop=NONE
    mAttrs={(140,224)(400x856) gr=TOP START CENTER DISPLAY_CLIP_VERTICAL sim={state=unchanged adjust=resize} ty=APPLICATION_SUB_PANEL fmt=TRANSLUCENT surfaceInsets=Rect(64, 64 - 64, 64) (manual)
      fl=LAYOUT_NO_LIMITS WATCH_OUTSIDE_TOUCH SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_LAYOUT_ATTACHED_IN_DECOR
      pfl=WILL_NOT_REPLACE_ON_RELAUNCH LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
      fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR IME}
    Requested w=400 h=856 mLayoutSeq=662
    mParentWindow=Window{7c224ae u0 com.plexapp.android/com.plexapp.plex.home.tv17.HomeActivity} mLayoutAttached=true
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    WindowStateAnimator{bb63419 PopupWindow:1fe81ff}:
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 528 x 984 transform=(1.0, 0.0, 1.0, 0.0)
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true

  KeyguardController:
    mKeyguardShowing=false
    mAodShowing=false
    mKeyguardGoingAway=false
    Occluded=false DismissingKeyguardActivity=null at display=0
    mDismissalRequested=false

  LockTaskController:
    mLockTaskModeState=NONE
    mLockTaskModeTasks=
    mLockTaskPackages (userId:packages)=
      u0:[]

  mCurTaskIdForUser={0=3298}
  mUserStackInFront={}
  mVisibilityTransactionDepth=0
  isHomeRecentsComponent=false

  TaskOrganizerController:
    Per windowing mode:
      pinned:
        android.window.ITaskOrganizer$Stub$Proxy@e7bec08 uid=10038:

@Rafaille
Copy link

Not sure if it's been reported before but setting volume does not work on the shield, although getting volume value is working fine.

@barmazu
Copy link

barmazu commented Jan 15, 2022

Not sure if it's been reported before but setting volume does not work on the shield, although getting volume value is working fine.

You mean the volume slider? If so - yup, it does not work - underlying ADB shell command (media volume) has been removed from Android 10+. So this need to be re-implemented in module code. Otherwise +/- volume buttons should work fine.

@Rafaille
Copy link

Not sure if it's been reported before but setting volume does not work on the shield, although getting volume value is working fine.

You mean the volume slider? If so - yup, it does not work - underlying ADB shell command (media volume) has been removed from Android 10+. So this need to be re-implemented in module code. Otherwise +/- volume buttons should work fine.

Yeah volume slider sorry should have been more specific. I ll temporarily replace the slider by buttons in my interface then. Thanks for your continuous help

@glassbase
Copy link
Contributor

glassbase commented Jan 17, 2022

@barmazu I ran your custom code and it does not work with OS 10 (on Walmart's Onn Android TV box). Not working = not reporting running app, stuck in idle state.

Based on reading this thread, I think this info will help... let me know if you need more info

GET_PROPERTIES:

{'screen_on': True, 'awake': False, 'audio_state': None, 'wake_lock_size': -1, 'current_app': None, 'media_session_state': None, 'audio_output_device': None, 'is_volume_muted': None, 'volume': None, 'running_apps': None, 'hdmi_input': None}

dumpsys window windows:

WINDOW MANAGER WINDOWS (dumpsys window windows)
  Window #0 Window{d95c241 u0 InputMethod}:
    mDisplayId=0 stackId=0 mSession=Session{1d0b01a 4081:u0a10061} mClient=android.os.BinderProxy@d7f528
    mOwnerUid=10061 mShowToOwnerOnly=true package=com.google.android.inputmethod.latin appop=NONE
    mAttrs={(0,0)(fillxfill) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=INPUT_METHOD fmt=TRANSPARENT wanim=0x1030056
      fl=NOT_FOCUSABLE LAYOUT_IN_SCREEN SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS}
    Requested w=1920 h=1080 mLayoutSeq=693
    mIsImWindow=true mIsWallpaper=false mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=151000 mSubLayer=0    mToken=WindowToken{dbe7562 android.os.Binder@e2eec2d}
    mViewVisibility=0x8 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,1080][0,0] mGivenVisibleInsets=[0,1080][0,0]
    mTouchableInsets=3 mGivenInsetsPending=false
    touchable region=SkRegion((0,600,1920,1080))
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080] overscan=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][0,0]
        outset=[0,0][0,0]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outsets=[0,0][0,0]    Lst insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outset=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{c52bbf InputMethod}:
      mDrawState=NO_SURFACE       mLastHidden=true
      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
  Window #1 Window{3438937 u0 Sys2023:dream}:
    mDisplayId=0 stackId=0 mSession=Session{93b8af8 31942:u0a10036} mClient=android.os.BinderProxy@fd14636
    mOwnerUid=10036 mShowToOwnerOnly=true package=com.google.android.backdrop appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=resize} layoutInDisplayCutoutMode=always ty=DREAM wanim=0x10302f4
      fl=ALLOW_LOCK_WHILE_SCREEN_ON KEEP_SCREEN_ON LAYOUT_IN_SCREEN FULLSCREEN LAYOUT_INSET_DECOR SHOW_WHEN_LOCKED DISMISS_KEYGUARD SPLIT_TOUCH HARDWARE_ACCELERATED
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND
      vsysui=LOW_PROFILE}
    Requested w=1920 h=1080 mLayoutSeq=990
    mBaseLayer=141000 mSubLayer=0    mToken=WindowToken{51259e3 android.os.Binder@4437e12}
    mViewVisibility=0x0 mHaveFrame=true mObscured=false
    mSeq=0 mSystemUiVisibility=0x1
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080] overscan=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
        outset=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outsets=[0,0][0,0]    Lst insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outset=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{6dc087d Sys2023:dream}:
       mAnimationIsEntrance=true      mSurface=Surface(name=Sys2023:dream)/@0x3f3e372
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 1920 x 1080 transform=(1.0, 0.0, 1.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=false
      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true
  Window #2 Window{34c6cd1 u0 DockedStackDivider}:
    mDisplayId=0 stackId=0 mSession=Session{3ff7a3f 3889:u0a10039} mClient=android.os.BinderProxy@77b7b5b
    mOwnerUid=10039 mShowToOwnerOnly=false package=com.android.systemui appop=NONE
    mAttrs={(0,0)(96xfill) sim={adjust=pan} layoutInDisplayCutoutMode=always ty=DOCK_DIVIDER fmt=TRANSLUCENT
      fl=NOT_FOCUSABLE NOT_TOUCH_MODAL WATCH_OUTSIDE_TOUCH SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_SLIPPERY
      pfl=NO_MOVE_ANIMATION
      vsysui=LAYOUT_STABLE LAYOUT_HIDE_NAVIGATION LAYOUT_FULLSCREEN}
    Requested w=96 h=1080 mLayoutSeq=984
    mBaseLayer=21000 mSubLayer=0    mToken=WindowToken{28b6ff8 android.os.BinderProxy@92eda6a}
    mViewVisibility=0x4 mHaveFrame=true mObscured=true
    mSeq=0 mSystemUiVisibility=0x700
    mPolicyVisibility=false mLegacyPolicyVisibilityAfterAnim=false mAppOpVisibility=true parentHidden=false mPermanentlyHidden=false mHiddenWhileSuspended=false mForceHideNonSystemOverlayWindow=false
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mTouchableInsets=3 mGivenInsetsPending=false
    touchable region=SkRegion((0,-96,96,96))
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mLastReportedConfiguration={0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?ldr ?wideColorGamut ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=null mWindowingMode=undefined mDisplayWindowingMode=undefined mActivityType=undefined mAlwaysOnTop=undefined mRotation=undefined}}
    mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080] overscan=[0,0][1920,1080]
        content=[0,0][0,0] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
        outset=[0,0][0,0]
    mFrame=[0,0][0,0] last=[0,0][0,0]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outsets=[0,0][0,0]    Lst insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outset=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{c02028c DockedStackDivider}:
      mDrawState=NO_SURFACE       mLastHidden=false
      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
      mShownAlpha=0.0 mAlpha=1.0 mLastAlpha=0.0
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=false
    isVisible=false
  Window #3 Window{44259aa u0 com.netflix.ninja/com.netflix.ninja.MainActivity}:
    mDisplayId=0 stackId=3 mSession=Session{1b7c47f 5394:u0a10060} mClient=android.os.BinderProxy@ace1495
    mOwnerUid=10060 mShowToOwnerOnly=true package=com.netflix.ninja appop=NONE
    mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION fmt=TRANSLUCENT wanim=0x1030001
      fl=LAYOUT_IN_SCREEN FULLSCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED
      pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND}
    Requested w=1920 h=1080 mLayoutSeq=990
    mBaseLayer=21000 mSubLayer=0    mToken=AppWindowToken{84e28f0 token=Token{8521d33 ActivityRecord{985fca2 u0 com.netflix.ninja/.MainActivity t46}}}
    mAppToken=AppWindowToken{84e28f0 token=Token{8521d33 ActivityRecord{985fca2 u0 com.netflix.ninja/.MainActivity t46}}}
    mAppDied=false    drawnStateEvaluated=true    mightAffectAllDrawn=true
    mViewVisibility=0x0 mHaveFrame=true mObscured=true
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.1}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.1}
    mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[0,0][1920,1080] overscan=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][1920,1080]
        decor=[0,0][1920,1080]
        outset=[0,0][1920,1080]
    mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outsets=[0,0][0,0]    Lst insets: overscan=[0,0][0,0] content=[0,0][0,0] visible=[0,0][0,0] stable=[0,0][0,0] outset=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{de9edd5 com.netflix.ninja/com.netflix.ninja.MainActivity}:
      mSurface=Surface(name=com.netflix.ninja/com.netflix.ninja.MainActivity)/@0x12f3c6c
      Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 1920 x 1080 transform=(1.0, 0.0, 1.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=false
      mSystemDecorRect=[0,0][1920,1080] mLastClipRect=[0,0][1920,1080]
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    isOnScreen=true
    isVisible=true
  Window #4 Window{11e285c u0 com.android.systemui.ImageWallpaper}:
    mDisplayId=0 stackId=0 mSession=Session{3ff7a3f 3889:u0a10039} mClient=android.os.BinderProxy@ee606cf
    mOwnerUid=10039 mShowToOwnerOnly=true package=com.android.systemui appop=NONE
    mAttrs={(0,0)(1920x1920) gr=TOP START CENTER layoutInDisplayCutoutMode=always ty=WALLPAPER fmt=RGBX_8888 wanim=0x103030e
      fl=NOT_FOCUSABLE NOT_TOUCHABLE LAYOUT_IN_SCREEN LAYOUT_NO_LIMITS SCALED LAYOUT_INSET_DECOR
      pfl=WANTS_OFFSET_NOTIFICATIONS}
    Requested w=64 h=64 mLayoutSeq=724
    mIsImWindow=false mIsWallpaper=true mIsFloatingLayer=true mWallpaperVisible=false
    mBaseLayer=11000 mSubLayer=0    mToken=WallpaperWindowToken{2c95c8a token=android.os.Binder@995d6f5}
    mViewVisibility=0x0 mHaveFrame=true mObscured=true
    mSeq=0 mSystemUiVisibility=0x0
    mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
    mFullConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mLastReportedConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
    mHasSurface=true isReadyForDisplay()=false mWindowRemovalAllowed=false
    Frames: containing=[0,0][1920,1080] parent=[0,0][1920,1080]
        display=[-10000,-10000][10000,10000] overscan=[0,0][1920,1080]
        content=[0,0][1920,1080] visible=[0,0][0,0]
        decor=[0,0][0,0]
        outset=[0,0][1920,1080]
    mFrame=[0,0][1920,1920] last=[0,0][1920,1920]
     cutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 0 - 0, 0) boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
    Cur insets: overscan=[0,0][0,0] content=[0,0][0,840] visible=[0,0][1920,1920] stable=[0,0][0,840] outsets=[0,0][0,0]    Lst insets: overscan=[0,0][0,0] content=[0,0][0,840] visible=[0,0][1920,1920] stable=[0,0][0,840] outset=[0,0][0,0]
     surface=[0,0][0,0]
    WindowStateAnimator{8e89251 com.android.systemui.ImageWallpaper}:
      mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x3412ab6
      Surface: shown=false layer=0 alpha=1.0 rect=(0.0,-420.0) 64 x 64 transform=(30.0, 0.0, 30.0, 0.0)
      mDrawState=HAS_DRAWN       mLastHidden=true
      mSystemDecorRect=[0,0][0,0] mLastClipRect=[0,0][0,0]
    mLastFreezeDuration=+17s458ms
    mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
    mHScale=30.0 mVScale=30.0
    mWallpaperX=0.0 mWallpaperY=0.5
    isOnScreen=true
    isVisible=false

  mGlobalConfiguration={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television -touch -keyb/v/h dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.4}
  mHasPermanentDpad=true
  mTopFocusedDisplayId=0
  mInTouchMode=false
  mLastDisplayFreezeDuration=0 due to Window{a98e8e2 u0 com.google.android.tvlauncher/com.google.android.tvlauncher.MainActivity}
  mLastWakeLockHoldingWindow=Window{3438937 u0 Sys2023:dream} mLastWakeLockObscuringWindow=null
  mFullSnapshotScale=1.0
  SnapshotCache
  mTraversalScheduled=false
  mHoldScreenWindow=Window{3438937 u0 Sys2023:dream}
  mObscuringWindow=Window{3438937 u0 Sys2023:dream}
  mSystemBooted=true mDisplayEnabled=true
  mTransactionSequence=1364
  mDisplayFrozen=false windows=0 client=false apps=0  mRotation=0  mLastWindowForcedOrientation=-1 mLastOrientation=-1
 waitingForConfig=false
  Animation settings: disabled=false window=1.0 transition=1.0 animator=1.0
  PolicyControl.sImmersiveStatusFilter=null
  PolicyControl.sImmersiveNavigationFilter=null
  PolicyControl.sImmersivePreconfirmationsFilter=null

@JeffLIrion
Copy link
Owner

I did a lot of work to spport device-specific commands. Now all that's needed is for someone to submit a pull request.

# ======================================================================= #
# #
# Device-specific ADB commands #
# #
# ======================================================================= #
def _cmd_current_app(self):
"""Get the command used to retrieve the current app for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_GOOGLE_TV
return constants.CMD_CURRENT_APP
def _cmd_current_app_media_session_state(self):
"""Get the command used to retrieve the current app and media session state for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app and media session state
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE_GOOGLE_TV
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE
def _cmd_launch_app(self, app):
"""Get the command to launch the specified app for this device.
Parameters
----------
app : str
The app that will be launched
Returns
-------
str
The device-specific command to launch the app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_LAUNCH_APP_GOOGLE_TV.format(app)
return constants.CMD_LAUNCH_APP.format(app)
def _cmd_running_apps(self):
"""Get the command used to retrieve the running apps for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the running apps
"""
if self.DEVICE_ENUM == constants.DeviceEnum.FIRETV:
return constants.CMD_RUNNING_APPS_FIRETV
return constants.CMD_RUNNING_APPS_ANDROIDTV

@tabnul
Copy link

tabnul commented Jan 25, 2022

would love to do it but i have no clue how it is integrated in the code exactly.

@berendhaan
Copy link
Contributor

I did a lot of work to spport device-specific commands. Now all that's needed is for someone to submit a pull request.

# ======================================================================= #
# #
# Device-specific ADB commands #
# #
# ======================================================================= #
def _cmd_current_app(self):
"""Get the command used to retrieve the current app for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_GOOGLE_TV
return constants.CMD_CURRENT_APP
def _cmd_current_app_media_session_state(self):
"""Get the command used to retrieve the current app and media session state for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app and media session state
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE_GOOGLE_TV
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE
def _cmd_launch_app(self, app):
"""Get the command to launch the specified app for this device.
Parameters
----------
app : str
The app that will be launched
Returns
-------
str
The device-specific command to launch the app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_LAUNCH_APP_GOOGLE_TV.format(app)
return constants.CMD_LAUNCH_APP.format(app)
def _cmd_running_apps(self):
"""Get the command used to retrieve the running apps for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the running apps
"""
if self.DEVICE_ENUM == constants.DeviceEnum.FIRETV:
return constants.CMD_RUNNING_APPS_FIRETV
return constants.CMD_RUNNING_APPS_ANDROIDTV

What needs to be done in the PR, and from / to which branch?

@ejalal
Copy link

ejalal commented Jan 28, 2022

Hey @JeffLIrion, you probably to release the androidtv package under v0.0.61, and someone will update to the latest verision in
core/homeassistant/components/androidtv/manifest.json

  "requirements": [
    "adb-shell[async]==0.4.0",
    "androidtv[async]==0.0.60",
    "pure-python-adb[async]==0.3.0.dev0"
  ],

@JeffLIrion
Copy link
Owner

@ejalal bumping the version wouldn't make a difference. Android 11 is still not supported because there hasn't been a pull request to add this support.

On a related note, I've marked this repo as "contributions only." As explained in the README:

I no longer have the time to actively work on this project, and so all future development will be from pull requests submitted by the community. What I will do is:

  • review pull requests that pass all of the CI checks
  • publish new releases upon request

@jrousek
Copy link

jrousek commented Feb 2, 2022

@ejalal bumping the version wouldn't make a difference. Android 11 is still not supported because there hasn't been a pull request to add this support.

On a related note, I've marked this repo as "contributions only." As explained in the README:

I no longer have the time to actively work on this project, and so all future development will be from pull requests submitted by the community. What I will do is:

  • review pull requests that pass all of the CI checks
  • publish new releases upon request

@JeffLIrion how can i send a request to support android 11 and android 10 which also doesn't work.

@Ulrar
Copy link

Ulrar commented Feb 3, 2022

I would like to test this on my android TV 10. I just don't know how to get it into my HA. Can anyone advise step by step installation?

Replace the file /usr/local/lib/python3.9/site-packages/androidtv/constants.py with this one.

Beware, the mentioned file is inside the homeassistant docker container though. I haven't tried it, but it seems that the android11 update for the nvidia shield is right around the corner.

Looks like that doesn't work with 2022.2 unfortunately, the integration fails to load because of a missing Device Enum in the file.

@gambith
Copy link

gambith commented Feb 3, 2022

@Ulrar You can use the custom component created by deviant-aut and replace the file there (if needed).

https://github.com/deviant-aut/HA-androidtv11

@Ulrar
Copy link

Ulrar commented Feb 3, 2022

Yep, I was hoping to avoid it since that's one thing to remember to delete whenever that bug gets fixed but it does work, I'll go with that.
Thanks

@TannerBrunscheon
Copy link

I did a lot of work to spport device-specific commands. Now all that's needed is for someone to submit a pull request.

# ======================================================================= #
# #
# Device-specific ADB commands #
# #
# ======================================================================= #
def _cmd_current_app(self):
"""Get the command used to retrieve the current app for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_GOOGLE_TV
return constants.CMD_CURRENT_APP
def _cmd_current_app_media_session_state(self):
"""Get the command used to retrieve the current app and media session state for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the current app and media session state
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE_GOOGLE_TV
return constants.CMD_CURRENT_APP_MEDIA_SESSION_STATE
def _cmd_launch_app(self, app):
"""Get the command to launch the specified app for this device.
Parameters
----------
app : str
The app that will be launched
Returns
-------
str
The device-specific command to launch the app
"""
# Is this a Google Chromecast Android TV?
if (
self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV
and "Google" in self.device_properties.get("manufacturer", "")
and "Chromecast" in self.device_properties.get("model", "")
):
return constants.CMD_LAUNCH_APP_GOOGLE_TV.format(app)
return constants.CMD_LAUNCH_APP.format(app)
def _cmd_running_apps(self):
"""Get the command used to retrieve the running apps for this device.
Returns
-------
str
The device-specific ADB shell command used to determine the running apps
"""
if self.DEVICE_ENUM == constants.DeviceEnum.FIRETV:
return constants.CMD_RUNNING_APPS_FIRETV
return constants.CMD_RUNNING_APPS_ANDROIDTV

Does this need to go to develop? Once this is in, do we need to add device specific commands for AndroidTV 11?

@JeffLIrion
Copy link
Owner

This should be resolved by #310.

@glassbase
Copy link
Contributor

FYI:
The new update does not work with Android 10. I don't know how many boxes use 10 other than Onn Android TV box.

@hillbicks
Copy link

Another FYI:

I had to remove the integration and add it again for the state changes to work. (Shield 2019 Pro). I have another shield that I need to test.

@Iceman248
Copy link

I found this not to work without continuing to use the custom component with the modified constants.py file. Even after deleting and readding the integration, all I accomplished was wasting time.

@hillbicks
Copy link

hillbicks commented Apr 15, 2022

Seems I was too early to declare it solved for me.

States are taking a long time to update and are not always accurate. For example, I played a video, state changed correctly. Then it switched briefly to standby, and then back to playing although nothing is playing. In order to get direct updates, I'm updating the sensor via node red every 2 seconds, but that doesn't help.

Furthermore, the entity state shows "InputMethod}:" beneath the state instead of the app that is in use and it stays the same, no matter what app is active.

I haven't used any custom integration and waited until the official integration was fixed and then I upgraded to android 11. This is on a nividia shield 2019 pro that is connected via Ethernet cable with a fixed ip.

Changing apps via the drow down menu seems to be working fine and instant.

Logfile doesn't show anything related to this. If you need any further information from me, just let me know.

@Ulrar
Copy link

Ulrar commented Apr 15, 2022

That's right, same behavior here. That said the chromecast integration is a good workaround for these bugs for now

@hillbicks
Copy link

Thanks for the hint with the chromecast integration, but that only works half of the time it seems. playing/paused seems to working well with Kodi, but not with netflix. State is playing with netflix just being opened and there are not state changes between playing and paused on netflix.

I just use this integration for two automations:

  • toggle the light depending on the play state
  • turn off everything if previous state was playing and is now idle for 30 minutes.

So both these automations are not working anymore.

While it is inconvenient, it is not a huge issue for me. The only thing I'm not too happy with is the communication with regards to this bug. Either it is completely fixed, then this issue should've been closed or it is not fixed and the warning should've stayed up. This way, it gives people the wrong impression, even announcing it for the latest release. Hopefully this can be avoided in the future :)

@deviant-aut
Copy link
Contributor

deviant-aut commented Apr 15, 2022

I was able to reproduce the issue with showing "InputMethod}:". I see it randomly when changing apps. But it will change to the correct state after about 2 seconds.

App detection works fine.
For state detection you might need to use custom sate dection.

Example for Netflix which works for me (and most of my apps)


 state_detection_rules:
   'Netflix':
        - 'playing':
            'wake_lock_size': 4  # this indentation is important!
        - 'playing':
            'wake_lock_size': 3  # this indentation is important!
        - 'playing':
            'wake_lock_size': 2  # this indentation is important!
        - 'paused':
            'wake_lock_size': 1  # this indentation is important!
        - 'standby' 

Everything else seems to be ok. I am running Android 11 on Nvidia Shield 2017 (experience 9.0.2).

@hillbicks
Copy link

hillbicks commented Apr 26, 2022

Just another FYI for anybody with the same problem: I had to install to custom_component androidtv integration for it to work again. Just the official fix alone didn't fix it.

https://github.com/deviant-aut/HA-androidtv11

EDIT: Seems I was too quick once again. Sometimes it works, most of the time it doesn't though. Paused sometimes is detected as standby, most of the time it is not detected at all. But since I also have problems with the shield itself (audio not working after standby without a reboot) I might just roll back to version 8.

@xanderificnl
Copy link

FWIW... On android 10....

I don't believe the current logic in constant.py is very easy to follow. It seems as if there may be multiple operations done before $CURRENT_APP is final, but I haven't looked beyond the surface. I still have to figure out how to get actual metadata working.

For now, I've installed the androidtv11hack and modified constants.py by setting CMD_CURRENT_APP like so:

CMD_CURRENT_APP = "dumpsys activity a . | awk '$1 ~ /mResumedActivity/ { print $4 }' | cut -d'/' -f1"

In my case—at least with Netflix—only 2 wake_lock_sizes are in use 1 (playing) and 3 (paused, standby, idle, etc.) so here's the state detection I've added for com.netflix.ninja:

[
    {
        "paused": {
            "wake_lock_size": 1
        }
    },
    {
        "playing": {
            "wake_lock_size": 3
        }
    }
]

Some background

Only added this for future reference and to potentially give some insights. HTH.

$ getprop | grep 'vendor.cus'
[vendor.cus.product.fw.revision]: [TPM215E_R.001.001.168.027]
[vendor.cus.product.fw.version]: [43PUS7906/12]

$ getprop | grep 'ro.build'
# truncated heavily
[ro.build.date]: [Thu Jul 14 18:08:30 CST 2022]
[ro.build.flavor]: [PH0M_EA_T32_EU-user]
[ro.build.version.release]: [10]
[ro.build.version.sdk]: [29]
[ro.build.version.security_patch]: [2022-06-05]

$ getprop | grep 'ro.product.vendor'
[ro.product.vendor.brand]: [Philips]
[ro.product.vendor.device]: [PH0M_EA_T32]
[ro.product.vendor.manufacturer]: [TPV]
[ro.product.vendor.model]: [2020/2021 UHD Android TV]
[ro.product.vendor.name]: [PH0M_EA_T32]

$ dumpsys window windows | grep -i focus
      fl=NOT_FOCUSABLE NOT_TOUCH_MODAL WATCH_OUTSIDE_TOUCH SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_SLIPPERY
      fl=NOT_FOCUSABLE NOT_TOUCHABLE LAYOUT_IN_SCREEN LAYOUT_NO_LIMITS SCALED LAYOUT_INSET_DECOR
  mTopFocusedDisplayId=0

 $ dumpsys window windows | grep -i 'Window #1'
  Window #1 Window{b29efce u0 com.netflix.ninja/com.netflix.ninja.MainActivity}:

# modified this command slightly to clarify what it does.
 $ dumpsys activity a . | grep 'mResumedActivity' | cut -d" " -f8 | cut -d'/' -f1
com.netflix.ninja

$ ps -A | grep u0_a
u0_a3019      3717  3018  128528    240 0                   0 S dialserver
u0_a43        3788  2589 1231736  26240 0                   0 S com.android.systemui
u0_a75        3970  2589 1190280  16848 0                   0 S org.droidtv.nettv.market
u0_a68        4143  2589 1206104  14552 0                   0 S org.droidtv.userlogger
u0_a57        4197  2589 1236264  18860 0                   0 S com.google.android.inputmethod.latin
u0_a38        4332  2589 1214100  16760 0                   0 S com.google.android.tv.remote.service
u0_a42        4429  2589 1386900  63588 0                   0 S com.google.android.gms.persistent
u0_a40        4616  2589 1845628  29228 0                   0 S com.google.android.katniss:interactor
u0_a9         4665  2589 1199420  18852 0                   0 S com.android.providers.tv
u0_a46        4796  2589 1239408  26104 0                   0 S com.google.android.tvrecommendations
u0_a81        5003  2589 1219872  17468 0                   0 S com.google.android.tts
u0_a34        5663  2589 1386820  51772 0                   0 S com.google.android.apps.mediashell
u0_a64        6034  2589 1204988  23392 0                   0 S org.droidtv.nettvregistration
u0_a88        9127  2589 2331092 390192 0                   0 S com.netflix.ninja
u0_a42       10034  2589 1189996  29200 0                   0 S com.google.process.gservices
u0_a34       10350  2589 1337840  26416 0                   0 S com.google.android.apps.mediashell:privileged_process0
u0_a42       12863  2589 1490032  42888 0                   0 S com.google.android.gms

Before the fix..

YT

{
    "audio_output_device": "speaker",
    "audio_state": "paused",
    "awake": true,
    "current_app": null,
    "hdmi_input": null,
    "is_volume_muted": false,
    "media_session_state": null,
    "running_apps": [
        "dialserver",
        "com.android.systemui",
        "org.droidtv.nettv.market",
        "org.droidtv.userlogger",
        "com.google.android.inputmethod.latin",
        "com.google.android.tv.remote.service",
        "com.google.android.gms.persistent",
        "com.google.android.katniss:interactor",
        "com.android.providers.tv",
        "com.google.android.tvrecommendations",
        "com.google.android.tts",
        "com.google.android.apps.mediashell",
        "org.droidtv.nettvregistration",
        "com.google.android.gms.ui",
        "com.google.android.youtube.tv",
        "com.android.vending",
        "com.google.process.gapps",
        "com.android.vending:background",
        "com.google.android.apps.mediashell:privileged_process0",
        "com.google.android.gms",
        "com.google.process.gservices",
        "com.google.android.tvlauncher",
        "com.google.android.katniss:search"
    ],
    "screen_on": true,
    "volume": 18,
    "wake_lock_size": 2
}

Netflix

{
    "audio_output_device": "speaker",
    "audio_state": "paused",
    "awake": true,
    "current_app": null,
    "hdmi_input": null,
    "is_volume_muted": false,
    "media_session_state": null,
    "running_apps": [
        "dialserver",
        "com.android.systemui",
        "org.droidtv.nettv.market",
        "org.droidtv.userlogger",
        "com.google.android.inputmethod.latin",
        "com.google.android.tv.remote.service",
        "com.google.android.gms.persistent",
        "com.google.android.katniss:interactor",
        "com.android.providers.tv",
        "com.google.android.tvrecommendations",
        "com.google.android.tts",
        "com.google.android.apps.mediashell",
        "org.droidtv.nettvregistration",
        "com.google.android.youtube.tv",
        "com.netflix.ninja",
        "com.google.android.apps.mediashell:privileged_process0",
        "com.google.android.gms",
        "com.google.process.gservices",
        "com.google.android.tvlauncher",
        "com.google.android.katniss:search"
    ],
    "screen_on": true,
    "volume": 18,
    "wake_lock_size": 3
}

After the "fix"

YT

{
    "audio_output_device": "speaker",
    "audio_state": "paused",
    "awake": true,
    "current_app": "com.google.android.youtube.tv",
    "hdmi_input": null,
    "is_volume_muted": false,
    "media_session_state": null,
    "running_apps": [
        "dialserver",
        "com.android.systemui",
        "org.droidtv.nettv.market",
        "org.droidtv.userlogger",
        "com.google.android.inputmethod.latin",
        "com.google.android.tv.remote.service",
        "com.google.android.gms.persistent",
        "com.google.android.katniss:interactor",
        "com.android.providers.tv",
        "com.google.android.tvrecommendations",
        "com.google.android.tts",
        "com.google.android.apps.mediashell",
        "org.droidtv.nettvregistration",
        "com.netflix.ninja",
        "com.google.process.gservices",
        "com.google.android.apps.mediashell:privileged_process0",
        "com.google.android.gms",
        "com.google.android.katniss:search",
        "com.google.android.youtube.tv"
    ],
    "screen_on": true,
    "volume": 18,
    "wake_lock_size": 2
}

Netflix

{
    "audio_output_device": "speaker",
    "audio_state": "paused",
    "awake": true,
    "current_app": "com.netflix.ninja",
    "hdmi_input": null,
    "is_volume_muted": false,
    "media_session_state": null,
    "running_apps": [
        "dialserver",
        "com.android.systemui",
        "org.droidtv.nettv.market",
        "org.droidtv.userlogger",
        "com.google.android.inputmethod.latin",
        "com.google.android.tv.remote.service",
        "com.google.android.gms.persistent",
        "com.google.android.katniss:interactor",
        "com.android.providers.tv",
        "com.google.android.tvrecommendations",
        "com.google.android.tts",
        "com.google.android.apps.mediashell",
        "org.droidtv.nettvregistration",
        "com.netflix.ninja",
        "com.google.process.gservices",
        "com.google.android.apps.mediashell:privileged_process0",
        "com.google.android.gms",
        "com.google.android.katniss:search"
    ],
    "screen_on": true,
    "volume": 18,
    "wake_lock_size": 3
}

Pretty printed w/ print(json.dumps(a, sort_keys=True, indent=4))

@ChristophCaina
Copy link
Contributor

Hi all,
I've just set up an Nokia Streaming Box 8000 - which runs on Android 10...
Unfortunately, it is the same for me - the media Player does not show any playback activity... and it does not switch between the sources :-(

If this integration will no longer be supported, this should be considered in the HA CORE in my opinion, because in the future, I think more and more devices will be available with unsupported versions... :-(

Unfortunately, my experience with ADB and python development is probably not good enought to contribute to this integration... :-( :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests