Closed MiSikora closed 1 week ago
2 Warnings | |
---|---|
:warning: | This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
:warning: | Class AccountManagerStatusInfo is missing tests, but unit-tests-exemption label was set to ignore this. |
Generated by :no_entry_sign: Danger
Description
I'm doing this work to make my work with clip analytics easier.
We had a strange configuration of
object AnalyticsTracker
andclass AnalyticsTrackerWrapper
. The first one was used to register all trackers and the latter one was used for DI but it was a bit clunky to use because it calledobject AnalyticsTracker
inside.This PR removes
object AnalyticsTracker
and uses proper DI forclass AnalyticsTracker
. Previously DI was impossible because there was a cyclic dependency, which I had to break in this PR by introducingAccountManagerStatusInfo
. The PR also decouples it fromSettings
making testing a bit easier without a need for mocks.You can ignore 6605bbae3fc67a613482d80d048ba8c0af216d7c as it is just a renaming PR. The meat of the PR is in f399dc90e5531fbaf6b3d2e33c4fd5807a81bf89.
Testing Instructions
"user_is_logged_in":false
property."user_is_logged_in":true
property. Signing out at this point will fail to reflect the property change (#2409)._ui
) is still correctly tracked. However user type will be incorrect due to this bug - https://github.com/Automattic/Automattic-Tracks-Android/pull/223.Analytics
.Checklist
./gradlew spotlessApply
to automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml
~I have tested any UI changes...