Suggestions for internals refactoring
Description
Some places use System.currentTimeMillis() directly (such as AndroidMemoryCollector) instead of CurrentDateProvider which makes it untestable.
DefaultAndroidEventProcessor already reads memory data, but now we also have AndroidMemoryCollector, maybe we could refactor DefaultAndroidEventProcessor to use AndroidMemoryCollector.
CurrentActivityHolder holds the current activity thru the CurrentActivityIntegration, maybe we could refactor other integrations such as ActivityLifecycleIntegration to use the holder as well.
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