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
|
| @@ -31,22 +29,10 @@ object SessionReplay { | |||
| fun enable( | |||
There was a problem hiding this comment.
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.
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.
If there is no solution for such case, then maybe we should highlight in the docs indeed that SR should be initialized early.
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)