Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 e5.java 源代码,内容仅作参考
package com.my.target;
import android.content.Context;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import com.mbridge.msdk.MBridgeConstans;
import com.my.target.g1;
import com.tp.common.Constants;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class e5 {
@NonNull
public final Map<String, Object> a;
@NonNull
public final Map<Integer, Long> f4383b;
public final long c;
public final int d;
public boolean e;
public static final class a {
public final int a;
public boolean f4384b = false;
public a(int i) {
this.a = i;
}
@NonNull
public e5 a() {
e5 e5Var = new e5(this.a, "myTarget", 0);
e5Var.a(this.f4384b);
return e5Var;
}
@NonNull
public e5 a(@NonNull String str, float f) {
e5 e5Var = new e5(this.a, str, 5);
e5Var.a(this.f4384b);
e5Var.a.put("priority", Float.valueOf(f));
return e5Var;
}
public void a(boolean z) {
this.f4384b = z;
}
@NonNull
public e5 b() {
e5 e5Var = new e5(this.a, "myTarget", 4);
e5Var.a(this.f4384b);
return e5Var;
}
}
public e5(int i, @NonNull String str, int i2) {
HashMap hashMap = new HashMap();
this.a = hashMap;
this.f4383b = new HashMap();
this.d = i2;
this.c = System.currentTimeMillis();
hashMap.put("slot", Integer.valueOf(i));
hashMap.put("network", str);
}
@NonNull
public static a a(int i) {
return new a(i);
}
public void a(Context context) {
String a2 = a();
o9.a("MetricMessage: Send metrics message - \n " + a2);
v1.a().a("https://ad.mail.ru/sdk/ms/", Base64.encodeToString(a2.getBytes(Charset.forName("UTF-8")), 0), context);
}
@NonNull
@VisibleForTesting
public String a() {
JSONObject jSONObject = new JSONObject();
try {
for (Map.Entry<String, Object> entry : this.a.entrySet()) {
jSONObject.put(entry.getKey(), entry.getValue());
}
JSONArray jSONArray = new JSONArray();
jSONObject.put(Constants.VIDEO_TRACKING_EVENTS_KEY, jSONArray);
for (Map.Entry<Integer, Long> entry2 : this.f4383b.entrySet()) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("type", entry2.getKey());
jSONObject2.put(AppMeasurementSdk.ConditionalUserProperty.VALUE, entry2.getValue());
jSONArray.put(jSONObject2);
}
} catch (Throwable unused) {
}
return jSONObject.toString();
}
public void a(int i, long j) {
Long l = this.f4383b.get(Integer.valueOf(i));
if (l != null) {
j += l.longValue();
}
b(i, j);
}
public void a(boolean z) {
this.e = z;
}
public void b() {
b(this.d, System.currentTimeMillis() - this.c);
}
public void b(int i, long j) {
this.f4383b.put(Integer.valueOf(i), Long.valueOf(j));
}
public void b(@NonNull final Context context) {
if (!this.e) {
o9.a("MetricMessage: Metrics sending disabled");
} else if (this.f4383b.isEmpty()) {
o9.a("MetricMessage: Metrics not send: empty");
} else {
g1.a a2 = m1.c().a();
if (a2 == null) {
o9.a("MetricMessage: Metrics not send: basic info not collected");
return;
}
this.a.put(ImpressionData.IMPRESSION_DATA_KEY_INSTANCE_ID, a2.a);
this.a.put("os", a2.f4400b);
this.a.put("osver", a2.c);
this.a.put(MBridgeConstans.DYNAMIC_VIEW_WX_APP, a2.d);
this.a.put("appver", a2.e);
this.a.put("sdkver", a2.f);
c0.b(new Runnable() {
@Override
public final void run() {
e5.this.a(context);
}
});
}
}
}