RUM-13468: Add totalRam, logicalCpuCount and isLowRam to DeviceInfo#3024
RUM-13468: Add totalRam, logicalCpuCount and isLowRam to DeviceInfo#3024marco-saia-datadog wants to merge 1 commit intodevelopfrom
totalRam, logicalCpuCount and isLowRam to DeviceInfo#3024Conversation
a5339c4 to
899ef0f
Compare
totalRam, processorCount and isLowRamDevice to DeviceInfo
65945bf to
55a5484
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3024 +/- ##
===========================================
+ Coverage 70.96% 70.99% +0.03%
===========================================
Files 912 912
Lines 33548 33628 +80
Branches 5640 5640
===========================================
+ Hits 23804 23871 +67
- Misses 8173 8184 +11
- Partials 1571 1573 +2
🚀 New features to boost your workflow:
|
55a5484 to
c356214
Compare
c356214 to
a4e01bd
Compare
features/dd-sdk-android-rum/src/main/json/rum/_common-schema.json
Outdated
Show resolved
Hide resolved
...-core/src/main/kotlin/com/datadog/android/core/internal/system/DefaultAndroidInfoProvider.kt
Outdated
Show resolved
Hide resolved
...-core/src/main/kotlin/com/datadog/android/core/internal/system/DefaultAndroidInfoProvider.kt
Outdated
Show resolved
Hide resolved
...-core/src/main/kotlin/com/datadog/android/core/internal/system/DefaultAndroidInfoProvider.kt
Outdated
Show resolved
Hide resolved
...-core/src/main/kotlin/com/datadog/android/core/internal/system/DefaultAndroidInfoProvider.kt
Outdated
Show resolved
Hide resolved
...-core/src/main/kotlin/com/datadog/android/core/internal/system/DefaultAndroidInfoProvider.kt
Outdated
Show resolved
Hide resolved
...id-core/src/test/kotlin/com/datadog/android/utils/forge/AndroidInfoProviderForgeryFactory.kt
Outdated
Show resolved
Hide resolved
...oid-core/src/testFixtures/kotlin/com/datadog/android/tests/elmyr/DeviceInfoForgeryFactory.kt
Outdated
Show resolved
Hide resolved
...dk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumViewScope.kt
Outdated
Show resolved
Hide resolved
totalRam, processorCount and isLowRamDevice to DeviceInfototalRam, processorCount and isLowRamDevice to DeviceInfo
a4e01bd to
5235618
Compare
totalRam, processorCount and isLowRamDevice to DeviceInfototalRam, logicalCpuCount and isLowRam to DeviceInfo
84cc489 to
0d87288
Compare
b08d16b to
1163614
Compare
1163614 to
a95c0f6
Compare
0xnm
left a comment
There was a problem hiding this comment.
LGTM, just some minor cleanup is needed.
| val totalRam: Int?, | ||
| val isLowRam: Boolean? |
There was a problem hiding this comment.
I believe these two are nullable because the API we use to get this info may not return the data?
UPD: I see, it is due to the exception handling.
| - "android.content.Context.getSharedPreferences(kotlin.String?, kotlin.Int)" | ||
| - "android.content.Context.getSystemService(kotlin.String)" | ||
| - "android.content.Context.getSharedPreferences(kotlin.String?, kotlin.Int)" | ||
| - "android.content.Context.getSystemService(java.lang.Class)" |
There was a problem hiding this comment.
neat! we indeed can use it now since min API is 23.
| ) | ||
| @MockitoSettings(strictness = Strictness.LENIENT) | ||
| @ForgeConfiguration(Configurator::class) | ||
| @ForgeConfiguration(value = Configurator::class, seed = 0xd1285cd0106L) |
There was a problem hiding this comment.
this is a debugging leftover and should be removed
| assertThat(actual.device) | ||
| .usingRecursiveComparison() | ||
| .ignoringFields("batteryLevel", "brightnessLevel") | ||
| .ignoringFields("batteryLevel", "brightnessLevel", "totalRam", "logicalCpuCount") |
There was a problem hiding this comment.
Afaik this was to avoid losing precision in the floating point values between serialization/deserialization roundtrip, so it is not needed for the integer values. Same for other deserialized assertions below.
What does this PR do?
Adds new attributes to the Device Info:
ActivityManager.isLowRamDevice)Additional Notes
Review checklist (to be filled by reviewers)