AppLovinAdLoadListener sends failedToReceiveAd callback on worker thread...

..., but the forwarded response to MoPub's mInterstitialListener should be sent on the UI thread.

Not sending the onInterstitialFailed reply on the UI thread has undefined consequences.
Wasn't aware that using final int was an option, so that's fine.

Date: Wed, 16 Jul 2014 11:13:14 -0700
From: notifications@github.com
To: SDK-Network-Adaptors@noreply.github.com
CC: palithius@hotmail.com
Subject: Re: [SDK-Network-Adaptors] AppLovinAdLoadListener sends failedToReceiveAd callback on worker thread... (#2)

In MoPub/Android/AppLovinInterstitial.java:

> +                }
> +                else if ( errorCode >= 500 )
> +                {
> +                    mInterstitialListener.onInterstitialFailed( MoPubErrorCode.SERVER_ERROR );
> +                }
> +                else if ( errorCode < 0 )
> +                {
> +                    mInterstitialListener.onInterstitialFailed( MoPubErrorCode.INTERNAL_ERROR );
> +                }
> +                else
> +                {
> +                    mInterstitialListener.onInterstitialFailed( MoPubErrorCode.UNSPECIFIED );
> +                }
> +            }
> +            
> +            public Runnable Init(int error)

Any particular reason to use this constructor instead of just assigning errorCode as a final int outside the runnable? Other than that, I'm happy to merge.


—
Reply to this email directly or view it on GitHub.