fix: keep the start-up popup suppression under Disable tracking and bind its fingerprint to the analytics registration (Kubus) #118

Merged
midas merged 1 commit from review/86-kubus-tracking into dev 2026-10-17 16:43:16 +02:00
Owner

Part of #105, fixes #86 and #58; supersedes #73 (same approach, redone on top of the 9.22.0 handling).

  • 9.21.1: TrackingStarterInitFingerprint requires g()'s three calls in order ((Z)V FIAM wrapper, (L)V strategy registration, (Z)V collection switch); return-void goes right after the first call, so the app's own setMessagesSuppressed(TRUE) still runs. The patch checks that the wrapper's body calls FirebaseInAppMessaging.setMessagesSuppressed and throws otherwise.
  • 9.22.0: AnalyticsStrategyRegistrationFingerprint (HashSet.add followed by check-cast FirebaseAnalytics in MainApplication.onCreate) is tried first; the 9.21.1 path is the fallback; neither matching fails the patch.

Verified: build; 15/15 Applied on De Gelderlander 9.21.1, AD 9.21.1 and Tubantia 9.22.0; jadx of the patched output shows g() reduced to the FIAM call (Gelderlander, AD) and the registration gone from onCreate with the FIAM suppression intact (Tubantia). Not verified: logcat on a device (#58's acceptance).

🤖 Generated with Claude Code

Part of #105, fixes #86 and #58; supersedes #73 (same approach, redone on top of the 9.22.0 handling). - 9.21.1: `TrackingStarterInitFingerprint` requires `g()`'s three calls in order ((Z)V FIAM wrapper, (L)V strategy registration, (Z)V collection switch); `return-void` goes right after the first call, so the app's own `setMessagesSuppressed(TRUE)` still runs. The patch checks that the wrapper's body calls `FirebaseInAppMessaging.setMessagesSuppressed` and throws otherwise. - 9.22.0: `AnalyticsStrategyRegistrationFingerprint` (`HashSet.add` followed by `check-cast FirebaseAnalytics` in `MainApplication.onCreate`) is tried first; the 9.21.1 path is the fallback; neither matching fails the patch. Verified: build; 15/15 Applied on De Gelderlander 9.21.1, AD 9.21.1 and Tubantia 9.22.0; jadx of the patched output shows `g()` reduced to the FIAM call (Gelderlander, AD) and the registration gone from `onCreate` with the FIAM suppression intact (Tubantia). Not verified: logcat on a device (#58's acceptance). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Disable tracking returned at index 0 of TrackingStarter.g(), which also skipped the app's own
FirebaseInAppMessaging.setMessagesSuppressed(TRUE) at start-up. Without Hide promotional popups
(or with its toggle off), in-app campaigns were no longer suppressed until consent, or never when
consent wasn't given. The return-void now goes right after that first call.

TrackingStarterInitFingerprint was only "public final ()V in TrackingStarter". It now pins the
three calls of g() in order and close together ((Z)V FIAM wrapper, (L)V strategy registration,
(Z)V collection switch), and the patch checks that the first call's body really calls
FirebaseInAppMessaging.setMessagesSuppressed. The 9.22.0 layout (g() inlined into
MainApplication.onCreate()) is matched by a fingerprint of the HashSet.add followed by the
check-cast to FirebaseAnalytics, tried first, instead of probing instructions in Kotlin.

Based on the approach of a52859e (claude/issue-58-fiam, PR #73).

Fixes #58
Fixes #86

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.