Skip to content

Session Replay prevents onWindowFocusChanged from being called on API 29 #3023

@vitali-alsheuski-shift4

Description

Describe the bug

onWindowFocusChanged almost never gets called when we enable Session Replay in our application. There is only a call with hasFocus=false when the activity gets closed, but in all other situation the activity never seem to receive the call (e.g. when the dialog is opened/closed).

So far I've checked it only on two different API levels:

  1. on API 29 the issue could be reproduced, onWindowFocusChanged doesn't get called.
  2. on API 30 everything seems to be ok.

Reproduction steps

The best way to reproduce the issue is to listen for the callback and open/close some dialog. The focus of the activity should be changed and reported through the callback in this case.

Logcat logs

No response

Expected behavior

onWindowFocusChanged should always get called not depending on Session Replay integration.

Affected SDK versions

29

Latest working SDK version

30

Did you confirm if the latest SDK version fixes the bug?

No

Kotlin / Java version

No response

Gradle / AGP version

No response

Other dependencies versions

No response

Device Information

No response

Other relevant information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions