Source:
public void initialize(Context context, InitializationCompleteCallback initializationCompleteCallback, List<MediationConfiguration> mediationConfigurations) { if (!(context instanceof Activity)) { initializationCompleteCallback.onInitializationFailed("AdColony SDK requires an " + "Activity context to initialize"); return; } HashSet<String> appIDs = new HashSet<>(); ArrayList<String> zoneList = new ArrayList<>(); for (MediationConfiguration configuration : mediationConfigurations) { Bundle serverParameters = configuration.getServerParameters(); String appIDFromServer = serverParameters.getString(AdColonyAdapterUtils.KEY_APP_ID); if (!TextUtils.isEmpty(appIDFromServer)) { appIDs.add(appIDFromServer); } ArrayList<String> zoneIDs = AdColonyManager.getInstance() .parseZoneList(serverParameters); if (zoneIDs != null && zoneIDs.size() > 0){ zoneList.addAll(zoneIDs); } } String appID; int count = appIDs.size(); if (count > 0) { appID = appIDs.iterator().next(); if (count > 1) { String logMessage = String.format("Multiple '%s' entries found: %s. " + "Using '%s' to initialize the AdColony SDK.", AdColonyAdapterUtils.KEY_APP_ID, appIDs.toString(), appID); Log.w(TAG, logMessage); } } else { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "Missing or Invalid App ID."); return; } if (zoneList.isEmpty()) { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "No zones provided to initialize the AdColony SDK."); return; } if (appOptions == null) { appOptions = new AdColonyAppOptions(); } appOptions.setMediationNetwork(AdColonyAppOptions.ADMOB, BuildConfig.VERSION_NAME); boolean success = AdColony.configure((Activity) context, appOptions, appID, zoneList.toArray(new String[0])); if (success) { initializationCompleteCallback.onInitializationSucceeded(); } else { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "Internal Error on Configuration"); } }

Target:
public void initialize(Context context, InitializationCompleteCallback initializationCompleteCallback, List<MediationConfiguration> mediationConfigurations) { if (!(context instanceof Activity)) { initializationCompleteCallback.onInitializationFailed("AdColony SDK requires an " + "Activity context to initialize"); return; } HashSet<String> appIDs = new HashSet<>(); ArrayList<String> zoneList = new ArrayList<>(); for (MediationConfiguration configuration : mediationConfigurations) { Bundle serverParameters = configuration.getServerParameters(); String appIDFromServer = serverParameters.getString(AdColonyAdapterUtils.KEY_APP_ID); if (!TextUtils.isEmpty(appIDFromServer)) { appIDs.add(appIDFromServer); } ArrayList<String> zoneIDs = AdColonyManager.getInstance() .parseZoneList(serverParameters); if (zoneIDs != null && zoneIDs.size() > 0){ zoneList.addAll(zoneIDs); } } String appID; int count = appIDs.size(); if (count > 0) { appID = appIDs.iterator().next(); if (count > 1) { String logMessage = String.format("Multiple '%s' entries found: %s. " + "Using '%s' to initialize the AdColony SDK.", AdColonyAdapterUtils.KEY_APP_ID, appIDs.toString(), appID); Log.w(TAG, logMessage); } } else { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "Missing or Invalid App ID."); return; } if (zoneList.isEmpty()) { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "No zones provided to initialize the AdColony SDK."); return; } appOptions.setMediationNetwork(AdColonyAppOptions.ADMOB, BuildConfig.VERSION_NAME); boolean success = AdColony.configure((Activity) context, appOptions, appID, zoneList.toArray(new String[0])); if (success) { initializationCompleteCallback.onInitializationSucceeded(); } else { initializationCompleteCallback.onInitializationFailed("Initialization Failed: " + "Internal Error on Configuration"); } }