RUMM-2903 handle device refresh rate with navigation strategy#1312
Conversation
| return if (value == 0.0) 0.0 else 1.0 / value | ||
| } | ||
|
|
||
| val navControllerActivityField = NavController::class.java.declaredFields.firstOrNull { |
There was a problem hiding this comment.
Why did this get put at the bottom of the companion object instead of with the other vals?
There was a problem hiding this comment.
Mostly because I added it there, I could move it up but it doesn't really change anything IMO
| ) | ||
| hasConnectivityInfo(fakeDatadogContext.networkInfo) | ||
| hasServiceName(fakeDatadogContext.service) | ||
| hasVersion(fakeDatadogContext.version) |
There was a problem hiding this comment.
Should we be checking all of these properties in this test?
There was a problem hiding this comment.
Yes, just to make sure that the event is complete as expected
0xnm
left a comment
There was a problem hiding this comment.
lgtm! I've added one comment in order to simplify debugging.
| is Fragment -> key.activity | ||
| is android.app.Fragment -> key.activity | ||
| is NavigationViewTrackingStrategy.NavigationKey -> { | ||
| navControllerActivityField?.isAccessible = true |
There was a problem hiding this comment.
maybe we can add some log entry when navControllerActivityField is not found (because of the private API changes, for example)? this will simplify the debugging if things don't work.
There was a problem hiding this comment.
Yes indeed, I'll add one
…lugged_deevices RUMM-3094 fix unreliable plugged battery info
ad2b0b0 to
69444e6
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1312 +/- ##
===========================================
- Coverage 82.11% 82.02% -0.09%
===========================================
Files 361 361
Lines 12832 12852 +20
Branches 2153 2157 +4
===========================================
+ Hits 10536 10541 +5
- Misses 1653 1659 +6
- Partials 643 652 +9
|
What does this PR do?
In order to get the device's refresh rate to scale down or up the detected app's refresh rate , we need to grab the activity from the navigation controller.
Motivation
Ensure that the refresh rate is properly reported in all use cases