-
Notifications
You must be signed in to change notification settings - Fork 60
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
Read SR system requirement synchronously with strict mode allowance #2307
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2307 +/- ##
===========================================
+ Coverage 70.32% 70.34% +0.02%
===========================================
Files 736 736
Lines 27466 27465 -1
Branches 4607 4607
===========================================
+ Hits 19315 19319 +4
+ Misses 6871 6858 -13
- Partials 1280 1288 +8
|
sample/kotlin/src/main/kotlin/com/datadog/android/sample/SampleApplication.kt
Outdated
Show resolved
Hide resolved
@@ -31,22 +29,10 @@ object SessionReplay { | |||
fun enable( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side question: while we mitigated the issue for the case when SR is initialized in the Application#onCreate
and on the main thread, I believe we can still have a similar issue if SR is initialialized by the customer from the worker thread / later in the app lifecycle. Is there a way to mitigate completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With current solution of LifecycleCallback
, I don't see a solution, once user misses the onResume
event, they need to wait until the next onResume
to make the touch recorder work properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no solution for such case, then maybe we should highlight in the docs indeed that SR should be initialized early.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
ebf4c8e
to
de8ad7d
Compare
de8ad7d
to
8a20143
Compare
What does this PR do?
Asynchronous enabling the session replay feature after checking the system requirement causes the dysfunction of touch recorder.
This commit fixes it by reading the files on the original thread synchronously with allowance of strict mode.
Review checklist (to be filled by reviewers)