Skip to content

Commit

Permalink
AmazonAdMarketplace/9.4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Mar 31, 2022
1 parent 18680a2 commit ebc9589
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions AmazonAdMarketplace/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 9.4.2.1
* Fix memory leak in APS banners.
* Publishers can enable fix via maxAdView.setLocalExtraParameter( "enable_aps_banner_memory_leak_fix", "true" ); (requires MAX SDK 11.0.0+)

## 9.4.2.0
* Certified with APS SDK 9.4.2 with interstitial video support.

Expand Down
2 changes: 1 addition & 1 deletion AmazonAdMarketplace/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
private val versionMajor = 9
private val versionMinor = 4
private val versionPatch = 2
private val versionAdapterPatch = 0
private val versionAdapterPatch = 1

val libraryVersionName by extra("${versionMajor}.${versionMinor}.${versionPatch}.${versionAdapterPatch}")
val libraryVersionCode by extra((versionMajor * 1000000) + (versionMinor * 10000) + (versionPatch * 100) + versionAdapterPatch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ public void loadAdViewAd(MaxAdapterResponseParameters parameters, MaxAdFormat ad
if ( mediationHints != null )
{
adView = new DTBAdView( activity, new AdViewListener( listener ) );

// APS banners have a memory leak that could be causing ANRs. This is a temporary fix while Amazon fixes it in their SDK.
// https://app.asana.com/0/573104092700345/1202045373630994
// Publishers can enable fix via maxAdView.setLocalExtraParameter( "enable_aps_banner_memory_leak_fix", "true" ); (requires MAX SDK 11.0.0+)
if ( AppLovinSdk.VERSION_CODE >= 11_00_00_00 )
{
final Map<String, Object> localExtraParams = parameters.getLocalExtraParameters();
final Object enableMemoryLeakFix = localExtraParams != null ? localExtraParams.get( "enable_aps_banner_memory_leak_fix" ) : null;
if ( "true".equals( enableMemoryLeakFix ) )
{
adView.finalize();
}
}

adView.fetchAd( mediationHints.value );
}
else
Expand Down

0 comments on commit ebc9589

Please sign in to comment.