Files
rr3-apk/decompiled-community/sources/com/mbridge/msdk/videocommon/b/c.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

91 lines
2.3 KiB
Java

package com.mbridge.msdk.videocommon.b;
import android.text.TextUtils;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class c {
private String a;
private int b;
public final String a() {
return this.a;
}
public final void a(int i) {
this.b = i;
}
public final void a(String str) {
this.a = str;
}
public final int b() {
return this.b;
}
public c(String str, int i) {
this.a = str;
this.b = i;
}
private static c c() {
return new c("Virtual Item", 1);
}
public static c b(String str) {
c cVar = null;
try {
com.mbridge.msdk.videocommon.d.a b = com.mbridge.msdk.videocommon.d.b.a().b();
if (TextUtils.isEmpty(str)) {
cVar = c();
} else if (b != null && b.j() != null) {
cVar = b.j().get(str);
}
return cVar == null ? c() : cVar;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static Map<String, c> a(JSONArray jSONArray) {
if (jSONArray == null || jSONArray.length() <= 0) {
return null;
}
try {
HashMap hashMap = new HashMap();
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject optJSONObject = jSONArray.optJSONObject(i);
hashMap.put(optJSONObject.optString("id"), new c(optJSONObject.optString("name"), optJSONObject.optInt("amount")));
}
return hashMap;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static c a(JSONObject jSONObject) {
if (jSONObject == null) {
return null;
}
try {
String optString = jSONObject.optString("name");
int optInt = jSONObject.optInt("amount");
jSONObject.optString("id");
return new c(optString, optInt);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public final String toString() {
return "Reward{name='" + this.a + "', amount=" + this.b + '}';
}
}