VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 OutcomeEventsFormatter.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.events;
import com.ironsource.eventsmodule.EventData;
import java.util.ArrayList;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONObject;
public class OutcomeEventsFormatter extends AbstractEventsFormatter {
private final String DEFAULT_OC_EVENTS_URL = "https://outcome.supersonicads.com/mediation/";
public OutcomeEventsFormatter(int adUnit) {
this.mAdUnit = adUnit;
}
@Override
public String getDefaultEventsUrl() {
return "https://outcome.supersonicads.com/mediation/";
}
@Override
public String getFormatterType() {
return EventsFormatterFactory.TYPE_OUTCOME;
}
@Override
public String format(ArrayList<EventData> toSend, JSONObject generalProperties) {
if (generalProperties == null) {
this.mGeneralProperties = new JSONObject();
} else {
this.mGeneralProperties = generalProperties;
}
JSONArray eventsArray = new JSONArray();
if (toSend != null && !toSend.isEmpty()) {
Iterator<EventData> it = toSend.iterator();
while (it.hasNext()) {
EventData event = it.next();
JSONObject jsonEvent = createJSONForEvent(event);
if (jsonEvent != null) {
eventsArray.put(jsonEvent);
}
}
}
return createDataToSend(eventsArray);
}
}