Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
Fix dodgy string equality check in java, was using ref not value equa…
Browse files Browse the repository at this point in the history
…lity, other minor tweaks
  • Loading branch information
sam committed Jul 4, 2018
1 parent 28a4091 commit 0d1aa38
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void refreshBanner(final String id) {
public void run() {
AdRequest request = null;

if(testDeviceId != "null") {
if(!testDeviceId.equals("null")) {
request = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).addTestDevice(testDeviceId).build();
} else {
request = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
Expand Down Expand Up @@ -204,7 +204,7 @@ public static void cacheInterstitial(final String id) {
public void run() {
AdRequest request = null;

if(testDeviceId != "null") {
if(!testDeviceId.equals("null")) {
request = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).addTestDevice(testDeviceId).build();
} else {
request = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
Expand Down Expand Up @@ -251,7 +251,7 @@ public void run() {
});
}

private static InterstitialAd addInterstitialForUnitId(final String id) {
private static InterstitialAd addInterstitialForUnitId(final String id) {
final InterstitialAd ad = new InterstitialAd(mainActivity);

if(ad.getAdUnitId() == null) {
Expand All @@ -274,7 +274,6 @@ private static AdView addBannerViewForUnitId(final String id) {
ad.setAdUnitId(id);
}

// TODO could look up options set from Haxe here
ad.setAdSize(AdSize.SMART_BANNER);

unitIdToBannerView.put(id, ad);
Expand Down

0 comments on commit 0d1aa38

Please sign in to comment.