Skip to content

Commit

Permalink
fix/increased_cpu_usage_on_app_pause_on_android (#48)
Browse files Browse the repository at this point in the history
Thanks @santoshbagadi for the tip
  • Loading branch information
thomasmso authored Jan 4, 2024
1 parent af19092 commit 53482a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Versions

## x.x.x
* Attempt fix at increased CPU usage on app pause on Android. https://github.com/AppLovin/AppLovin-MAX-Cordova/issues/44
## 1.1.3
* Fix NPE if the integration attempts to show a banner before it is created.
## 1.1.2
Expand Down
14 changes: 0 additions & 14 deletions plugin/src/android/AppLovinMAX.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
Expand Down Expand Up @@ -222,19 +221,6 @@ private void initialize(final String pluginVersion, final String sdkKey, final C
sdkConfiguration = configuration;
isSdkInitialized = true;

// Enable orientation change listener, so that the position can be updated for vertical banners.
new OrientationEventListener( getCurrentActivity() )
{
@Override
public void onOrientationChanged(final int orientation)
{
for ( final Map.Entry<String, MaxAdFormat> adUnitFormats : mVerticalAdViewFormats.entrySet() )
{
positionAdView( adUnitFormats.getKey(), adUnitFormats.getValue() );
}
}
}.enable();

try
{
callbackContext.success( getInitializationMessage( context ) );
Expand Down

0 comments on commit 53482a5

Please sign in to comment.