// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/AppConfig.java
// public class AppConfig {
//     public static final String ANALYTICS_PROPERTY_KEY = BuildConfig.APP_ANALYTICS_PROPERTY_KEY;
//     public static final String APP_VERSION = BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")";
//     public static final String WIDESPACE_SID = BuildConfig.DEBUG ? BuildConfig.APP_WIDESPACE_DEBUG_SID : BuildConfig.APP_WIDESPACE_SID;
//     public static final String STHLM_TRAVELING_API_KEY = BuildConfig.APP_STHLMTRAVELING_API_KEY;
//     public static final String USER_AGENT = "STHLMTraveling-Android/" + BuildConfig.VERSION_NAME;
//     public static final String STHLM_TRAVELING_API_ENDPOINT = "http://api.sthlmtraveling.se/";
//     public static final String ADMOB_ROUTE_DETAILS_AD_UNIT_ID = BuildConfig.ADMOB_ROUTE_DETAILS_AD_UNIT_ID;
//     public static final String[] ADMOB_TEST_DEVICES = TextUtils.split(BuildConfig.ADMOB_TEST_DEVICES, ",");
// 
//     public static boolean shouldServeAds() {
//         return BuildConfig.APP_IS_ADS_ENABLED;
//     }
// }


import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import androidx.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.crashlytics.android.Crashlytics;
import com.google.ads.mediation.admob.AdMobAdapter;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.markupartist.sthlmtraveling.AppConfig;
import com.markupartist.sthlmtraveling.BuildConfig;
import com.markupartist.sthlmtraveling.R;

  public void onDestroy() {
    if (mAdView == null) {
      return;
    }

    mAdView.destroy();
  }

  public void onPause() {
    if (mAdView == null) {
      return;
    }

    mAdView.pause();
  }

  public void onResume() {
    if (mAdView == null) {
      return;
    }

    mAdView.resume();
  }

  public void load() {
    userConsentForm.showIfConsentIsUnknown();

    AdRequest.Builder builder = new AdRequest.Builder();
    if (BuildConfig.DEBUG) {
// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/AppConfig.java
// public class AppConfig {
//     public static final String ANALYTICS_PROPERTY_KEY = BuildConfig.APP_ANALYTICS_PROPERTY_KEY;
//     public static final String APP_VERSION = BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")";
//     public static final String WIDESPACE_SID = BuildConfig.DEBUG ? BuildConfig.APP_WIDESPACE_DEBUG_SID : BuildConfig.APP_WIDESPACE_SID;
//     public static final String STHLM_TRAVELING_API_KEY = BuildConfig.APP_STHLMTRAVELING_API_KEY;
//     public static final String USER_AGENT = "STHLMTraveling-Android/" + BuildConfig.VERSION_NAME;
//     public static final String STHLM_TRAVELING_API_ENDPOINT = "http://api.sthlmtraveling.se/";
//     public static final String ADMOB_ROUTE_DETAILS_AD_UNIT_ID = BuildConfig.ADMOB_ROUTE_DETAILS_AD_UNIT_ID;
//     public static final String[] ADMOB_TEST_DEVICES = TextUtils.split(BuildConfig.ADMOB_TEST_DEVICES, ",");
// 
//     public static boolean shouldServeAds() {
//         return BuildConfig.APP_IS_ADS_ENABLED;
//     }
// }


// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/utils/AdProxy.java
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import androidx.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.crashlytics.android.Crashlytics;
import com.google.ads.mediation.admob.AdMobAdapter;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.markupartist.sthlmtraveling.AppConfig;
import com.markupartist.sthlmtraveling.BuildConfig;
import com.markupartist.sthlmtraveling.R;


  public void onDestroy() {
    if (mAdView == null) {
      return;
    }

    mAdView.destroy();
  }

  public void onPause() {
    if (mAdView == null) {
      return;
    }

    mAdView.pause();
  }

  public void onResume() {
    if (mAdView == null) {
      return;
    }

    mAdView.resume();
  }

  public void load() {
    userConsentForm.showIfConsentIsUnknown();

    AdRequest.Builder builder = new AdRequest.Builder();
    if (BuildConfig.DEBUG) {
      String[] testDevices = AppConfig.ADMOB_TEST_DEVICES;