X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Ffree%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fhelpers%2FAdHelper.java;h=60f22aaccc91bd9e5d4d3402b4057a25ad7d6ed5;hb=7a9f8fd0700dc347fa71d2a7bc296c98a57d3c0b;hp=7de4e522dec4a6655c6c7e4237e231600115929a;hpb=fa5bfd542337d3aff87271af18272768312e1306;p=PrivacyBrowserAndroid.git diff --git a/app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java b/app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java index 7de4e522..60f22aac 100644 --- a/app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java +++ b/app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2018 Soren Stoutner . + * Copyright © 2016-2019 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -19,13 +19,14 @@ package com.stoutner.privacybrowser.helpers; -import android.app.DialogFragment; -import android.app.FragmentManager; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.RelativeLayout; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentManager; + import com.google.ads.mediation.admob.AdMobAdapter; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdSize; @@ -37,7 +38,7 @@ import com.stoutner.privacybrowser.dialogs.AdConsentDialog; public class AdHelper { private static boolean initialized; - public static void initializeAds (View view, Context applicationContext, FragmentManager fragmentManager, String googleAppId, String adUnitId) { + public static void initializeAds(View view, Context applicationContext, FragmentManager fragmentManager, String googleAppId, String adUnitId) { if (!initialized) { // This is the first run. // Initialize mobile ads. MobileAds.initialize(applicationContext, googleAppId); @@ -66,11 +67,11 @@ public class AdHelper { } } - public static void loadAd (View view, Context applicationContext, String adUnitId) { + public static void loadAd(View view, Context applicationContext, String adUnitId) { // Cast the generic view to an AdView. AdView adView = (AdView) view; - // Save the layout parameters. They are used when programatically recreating the add below. + // Save the layout parameters. They are used when programatically recreating the ad below. RelativeLayout.LayoutParams adViewLayoutParameters = (RelativeLayout.LayoutParams) adView.getLayoutParams(); // Remove the AdView.