Skip to content

refactor(admob): reuse suspended load tracking for interstitial ads - #4086

Merged
polmiro merged 1 commit into
next-gen-admob-sdkfrom
reuse-interstitial-ad-load-result-tracking
Aug 26, 2026
Merged

refactor(admob): reuse suspended load tracking for interstitial ads#4086
polmiro merged 1 commit into
next-gen-admob-sdkfrom
reuse-interstitial-ad-load-result-tracking

Conversation

@polmiro

@polmiro polmiro commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

I jumped the gun and merged the approved PR for interstitial ads before adopting the new helper.

Test plan

  • ./gradlew :feature:admob-next-gen:testDefaultsDebugUnitTest
  • ./gradlew detektAll
  • ./scripts/api-check.sh

Note

Low Risk
Mechanical refactor to a shared helper with equivalent tracking and callback wiring; no API or auth changes.

Overview
The suspending AdTracker.loadAndTrackInterstitialAd path no longer inlines success/failure tracking with trackAdLoaded / trackAdFailedToLoad. It now chains InterstitialAd.load through the shared trackAndConfigureAdLoadResult helper (from #4053), passing interstitial format metadata and a configureAd block that installs the tracking event callback.

Behavior is intended to stay the same: the original AdLoadResult is returned, load success/failure events are still tracked, and tracking is installed on successful loads before the suspend function completes.

Reviewed by Cursor Bugbot for commit 9a4b7f0. Bugbot is set up for automated code reviews on this repo. Configure here.

@polmiro
polmiro requested a review from AlvaroBrey August 26, 2026 08:25
@polmiro
polmiro marked this pull request as ready for review August 26, 2026 08:25
@polmiro
polmiro requested a review from a team as a code owner August 26, 2026 08:25
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.99%. Comparing base (40b51c5) to head (9a4b7f0).
⚠️ Report is 1 commits behind head on next-gen-admob-sdk.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           next-gen-admob-sdk    #4086      +/-   ##
======================================================
- Coverage               83.01%   82.99%   -0.02%     
======================================================
  Files                     437      437              
  Lines                   17893    17893              
  Branches                 2684     2684              
======================================================
- Hits                    14854    14851       -3     
- Misses                   2146     2148       +2     
- Partials                  893      894       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polmiro

polmiro commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Going ahead merging this one since it was an oversight and practically the same commit is being applied in every ad format branch.

@polmiro
polmiro merged commit 2919701 into next-gen-admob-sdk Aug 26, 2026
36 checks passed
@polmiro
polmiro deleted the reuse-interstitial-ad-load-result-tracking branch August 26, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant