Open marandaneto opened 1 year ago
Looper.getMainLooper()
Also being used directly instead of MainLooperHandler
for testability.
@romtsn @markushi added to milestone v7, let me know if that's fine. I am afraid that we will keep using the static methods making the code difficult to be tested.
Change activity.runOnUiThread
to using MainLooperHandler
as well.
Let's remove the milestone and re-priortize this.
Let's check if there are any breaking API changes due to the mentioned refactorings.
Let's call each other out when we review PRs and try to fix this as we go
Description
Some places use
System.currentTimeMillis()
directly (such asAndroidMemoryCollector
) instead ofCurrentDateProvider
which makes it untestable.DefaultAndroidEventProcessor
already reads memory data, but now we also haveAndroidMemoryCollector
, maybe we could refactorDefaultAndroidEventProcessor
to useAndroidMemoryCollector
.CurrentActivityHolder
holds the current activity thru theCurrentActivityIntegration
, maybe we could refactor other integrations such asActivityLifecycleIntegration
to use the holder as well.