- 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
71 lines
2.7 KiB
Java
71 lines
2.7 KiB
Java
package csdk.gluads.util;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import csdk.gluads.Consts;
|
|
import csdk.gluads.Reward;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class RewardUtil {
|
|
@NonNull
|
|
public static Map<String, Reward> parseRewardListFromConfig(@Nullable Map<String, Object> map) {
|
|
Map<String, Reward> createMap = Common.createMap();
|
|
if (map != null) {
|
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
|
String key = entry.getKey();
|
|
createMap.put(key, toReward(key, entry.getValue()));
|
|
}
|
|
}
|
|
return createMap;
|
|
}
|
|
|
|
@NonNull
|
|
public static Reward toReward(@NonNull String str, @NonNull Object obj) {
|
|
return new Reward(Common.uuid(), str, null, Consts.ADVERTISEMENT_TYPE_REWARDED_INTERSTITIAL, ConfigUtil.getString(obj, "reward"), Integer.valueOf(ConfigUtil.getInteger(obj, "amount")).intValue());
|
|
}
|
|
|
|
public static PlacementInfo getPlacement(@NonNull PlacementInfo placementInfo, @NonNull Map<String, Object> map, Map<String, Object> map2, String str) {
|
|
Object obj;
|
|
int integer;
|
|
String str2;
|
|
String str3;
|
|
Object obj2;
|
|
synchronized (map) {
|
|
obj = map.get(placementInfo.mName);
|
|
}
|
|
PlacementInfo placementInfo2 = new PlacementInfo(placementInfo.mSource, placementInfo.mName);
|
|
if (obj != null && (obj instanceof String)) {
|
|
placementInfo2.mName = (String) obj;
|
|
} else {
|
|
if (obj != null && (obj instanceof Map)) {
|
|
str3 = ConfigUtil.getString(obj, "reward", null);
|
|
integer = ConfigUtil.getInteger(obj, "amount", 0);
|
|
str2 = ConfigUtil.getString(obj, "hash", null);
|
|
placementInfo2.mSource = "SDK (penguin)";
|
|
} else {
|
|
String string = ConfigUtil.getString(map2, "reward", null);
|
|
integer = ConfigUtil.getInteger(map2, "amount", 0);
|
|
String string2 = ConfigUtil.getString(map2, "hash", null);
|
|
if (string != null) {
|
|
placementInfo2.mSource = "APP";
|
|
}
|
|
str2 = string2;
|
|
str3 = string;
|
|
}
|
|
if (str2 != null) {
|
|
placementInfo2.mName = str2;
|
|
} else if (str3 != null) {
|
|
placementInfo2.mName = str3 + str + String.valueOf(integer);
|
|
synchronized (map) {
|
|
obj2 = map.get(placementInfo2.mName);
|
|
}
|
|
if (obj2 != null && (obj2 instanceof String)) {
|
|
placementInfo2.mName = (String) obj2;
|
|
}
|
|
}
|
|
}
|
|
return placementInfo2;
|
|
}
|
|
}
|