mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
62
mobile/android/thirdparty/com/adjust/sdk/AdjustAttribution.java
vendored
Normal file
62
mobile/android/thirdparty/com/adjust/sdk/AdjustAttribution.java
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
package com.adjust.sdk;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by pfms on 07/11/14.
|
||||
*/
|
||||
public class AdjustAttribution implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String trackerToken;
|
||||
public String trackerName;
|
||||
public String network;
|
||||
public String campaign;
|
||||
public String adgroup;
|
||||
public String creative;
|
||||
|
||||
public static AdjustAttribution fromJson(JSONObject jsonObject) {
|
||||
if (jsonObject == null) return null;
|
||||
|
||||
AdjustAttribution attribution = new AdjustAttribution();
|
||||
|
||||
attribution.trackerToken = jsonObject.optString("tracker_token", null);
|
||||
attribution.trackerName = jsonObject.optString("tracker_name", null);
|
||||
attribution.network = jsonObject.optString("network", null);
|
||||
attribution.campaign = jsonObject.optString("campaign", null);
|
||||
attribution.adgroup = jsonObject.optString("adgroup", null);
|
||||
attribution.creative = jsonObject.optString("creative", null);
|
||||
|
||||
return attribution;
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (other == null) return false;
|
||||
if (getClass() != other.getClass()) return false;
|
||||
AdjustAttribution otherAttribution = (AdjustAttribution) other;
|
||||
|
||||
if (!equalString(trackerToken, otherAttribution.trackerToken)) return false;
|
||||
if (!equalString(trackerName, otherAttribution.trackerName)) return false;
|
||||
if (!equalString(network, otherAttribution.network)) return false;
|
||||
if (!equalString(campaign, otherAttribution.campaign)) return false;
|
||||
if (!equalString(adgroup, otherAttribution.adgroup)) return false;
|
||||
if (!equalString(creative, otherAttribution.creative)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean equalString(String first, String second) {
|
||||
if (first == null || second == null) {
|
||||
return first == null && second == null;
|
||||
}
|
||||
return first.equals(second);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("tt:%s tn:%s net:%s cam:%s adg:%s cre:%s",
|
||||
trackerToken, trackerName, network, campaign, adgroup, creative);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue