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

RUM-501 Handle Android Strict Mode #1663

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

xgouchet
Copy link
Member

@xgouchet xgouchet commented Oct 9, 2023

What does this PR do?

This tries to handle some StrictMode warnings happening during the SDK initialization, which can't easily be deferred to background threads.

Motivation

Prevent the SDK from spamming warnings in host application when StrictMode feature is enabled.

@xgouchet xgouchet requested a review from a team as a code owner October 9, 2023 10:14
0xnm
0xnm previously approved these changes Oct 9, 2023
* @param operation the operation
* @return the value returned by the operation
*/
fun <T> allowThreadDiskReads(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mark it as InternalApi.

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2023

Codecov Report

Merging #1663 (ac07eec) into develop (a340c76) will increase coverage by 0.05%.
Report is 2 commits behind head on develop.
The diff coverage is 93.75%.

❗ Current head ac07eec differs from pull request most recent head edb5195. Consider uploading reports for the commit edb5195 to get more accurate results

@@             Coverage Diff             @@
##           develop    #1663      +/-   ##
===========================================
+ Coverage    83.64%   83.68%   +0.05%     
===========================================
  Files          458      459       +1     
  Lines        15767    15775       +8     
  Branches      2354     2353       -1     
===========================================
+ Hits         13187    13201      +14     
+ Misses        1946     1945       -1     
+ Partials       634      629       -5     
Files Coverage Δ
...n/kotlin/com/datadog/android/core/StrictModeExt.kt 100.00% <100.00%> (ø)
...n/com/datadog/android/core/internal/CoreFeature.kt 87.79% <100.00%> (+0.05%) ⬆️
...dog/android/ndk/internal/NdkCrashReportsFeature.kt 68.63% <100.00%> (+1.96%) ⬆️
...rc/main/java/com/datadog/opentracing/DDTracer.java 57.02% <75.00%> (+0.54%) ⬆️

... and 19 files with indirect coverage changes

mariusc83
mariusc83 previously approved these changes Oct 9, 2023
@xgouchet xgouchet dismissed stale reviews from mariusc83 and 0xnm via edb5195 October 9, 2023 11:48
@xgouchet xgouchet force-pushed the xgouchet/RUM-501/strict_mode branch from ac07eec to edb5195 Compare October 9, 2023 11:48
@xgouchet xgouchet merged commit a5d678d into develop Oct 9, 2023
@xgouchet xgouchet deleted the xgouchet/RUM-501/strict_mode branch October 9, 2023 12:16
@xgouchet xgouchet added this to the 2.3.0 milestone Dec 13, 2023
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

Successfully merging this pull request may close these issues.

4 participants