- 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
344 lines
14 KiB
Java
344 lines
14 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Color;
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import android.view.MotionEvent;
|
|
import androidx.core.app.NotificationCompat;
|
|
import com.ironsource.v8;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import csdk.gluads.Consts;
|
|
import java.util.HashMap;
|
|
import java.util.Locale;
|
|
import java.util.Map;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzccs implements zzbjp {
|
|
private boolean zza;
|
|
|
|
private static int zzb(Context context, Map map, String str, int i) {
|
|
String str2 = (String) map.get(str);
|
|
if (str2 != null) {
|
|
try {
|
|
com.google.android.gms.ads.internal.client.zzbc.zzb();
|
|
i = com.google.android.gms.ads.internal.util.client.zzf.zzx(context, Integer.parseInt(str2));
|
|
} catch (NumberFormatException unused) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Could not parse " + str + " in a video GMSG: " + str2);
|
|
}
|
|
}
|
|
if (com.google.android.gms.ads.internal.util.zze.zzc()) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Parse pixels for " + str + ", got string " + str2 + ", int " + i + Consts.STRING_PERIOD);
|
|
}
|
|
return i;
|
|
}
|
|
|
|
private static void zzc(zzcbg zzcbgVar, Map map) {
|
|
String str = (String) map.get("minBufferMs");
|
|
String str2 = (String) map.get("maxBufferMs");
|
|
String str3 = (String) map.get("bufferForPlaybackMs");
|
|
String str4 = (String) map.get("bufferForPlaybackAfterRebufferMs");
|
|
String str5 = (String) map.get("socketReceiveBufferSize");
|
|
if (str != null) {
|
|
try {
|
|
zzcbgVar.zzB(Integer.parseInt(str));
|
|
} catch (NumberFormatException unused) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj(String.format("Could not parse buffer parameters in loadControl video GMSG: (%s, %s)", str, str2));
|
|
return;
|
|
}
|
|
}
|
|
if (str2 != null) {
|
|
zzcbgVar.zzA(Integer.parseInt(str2));
|
|
}
|
|
if (str3 != null) {
|
|
zzcbgVar.zzy(Integer.parseInt(str3));
|
|
}
|
|
if (str4 != null) {
|
|
zzcbgVar.zzz(Integer.parseInt(str4));
|
|
}
|
|
if (str5 != null) {
|
|
zzcbgVar.zzD(Integer.parseInt(str5));
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.ads.zzbjp
|
|
public final /* bridge */ /* synthetic */ void zza(Object obj, Map map) {
|
|
int min;
|
|
int min2;
|
|
zzcbs zzcbsVar = (zzcbs) obj;
|
|
String str = (String) map.get("action");
|
|
if (str == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Action missing from video GMSG.");
|
|
return;
|
|
}
|
|
Integer num = null;
|
|
Integer valueOf = map.containsKey("playerId") ? Integer.valueOf(Integer.parseInt((String) map.get("playerId"))) : null;
|
|
Integer zzb = zzcbsVar.zzo() != null ? zzcbsVar.zzo().zzb() : null;
|
|
if (valueOf != null && zzb != null && !valueOf.equals(zzb) && !str.equals("load")) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzi(String.format(Locale.US, "Event intended for player %s, but sent to player %d - event ignored", valueOf, zzb));
|
|
return;
|
|
}
|
|
if (com.google.android.gms.ads.internal.util.client.zzo.zzm(3)) {
|
|
JSONObject jSONObject = new JSONObject(map);
|
|
jSONObject.remove("google.afma.Notify_dt");
|
|
com.google.android.gms.ads.internal.util.client.zzo.zze("Video GMSG: " + str + " " + jSONObject.toString());
|
|
}
|
|
if (str.equals("background")) {
|
|
String str2 = (String) map.get("color");
|
|
if (TextUtils.isEmpty(str2)) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Color parameter missing from background video GMSG.");
|
|
return;
|
|
}
|
|
try {
|
|
zzcbsVar.setBackgroundColor(Color.parseColor(str2));
|
|
return;
|
|
} catch (IllegalArgumentException unused) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Invalid color parameter in background video GMSG.");
|
|
return;
|
|
}
|
|
}
|
|
if (str.equals("playerBackground")) {
|
|
String str3 = (String) map.get("color");
|
|
if (TextUtils.isEmpty(str3)) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Color parameter missing from playerBackground video GMSG.");
|
|
return;
|
|
}
|
|
try {
|
|
zzcbsVar.zzB(Color.parseColor(str3));
|
|
return;
|
|
} catch (IllegalArgumentException unused2) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Invalid color parameter in playerBackground video GMSG.");
|
|
return;
|
|
}
|
|
}
|
|
int i = 0;
|
|
if (str.equals("decoderProps")) {
|
|
String str4 = (String) map.get("mimeTypes");
|
|
if (str4 == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("No MIME types specified for decoder properties inspection.");
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put(NotificationCompat.CATEGORY_EVENT, "decoderProps");
|
|
hashMap.put("error", "missingMimeTypes");
|
|
zzcbsVar.zzd("onVideoEvent", hashMap);
|
|
return;
|
|
}
|
|
HashMap hashMap2 = new HashMap();
|
|
String[] split = str4.split(",");
|
|
int length = split.length;
|
|
while (i < length) {
|
|
String str5 = split[i];
|
|
hashMap2.put(str5, com.google.android.gms.ads.internal.util.zzcj.zza(str5.trim()));
|
|
i++;
|
|
}
|
|
HashMap hashMap3 = new HashMap();
|
|
hashMap3.put(NotificationCompat.CATEGORY_EVENT, "decoderProps");
|
|
hashMap3.put("mimeTypes", hashMap2);
|
|
zzcbsVar.zzd("onVideoEvent", hashMap3);
|
|
return;
|
|
}
|
|
zzcbh zzo = zzcbsVar.zzo();
|
|
if (zzo == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Could not get underlay container for a video GMSG.");
|
|
return;
|
|
}
|
|
boolean equals = str.equals("new");
|
|
boolean equals2 = str.equals(v8.h.L);
|
|
if (equals || equals2) {
|
|
Context context = zzcbsVar.getContext();
|
|
int zzb2 = zzb(context, map, "x", 0);
|
|
int zzb3 = zzb(context, map, "y", 0);
|
|
int zzb4 = zzb(context, map, "w", -1);
|
|
zzbcc zzbccVar = zzbcl.zzdW;
|
|
if (((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbccVar)).booleanValue()) {
|
|
min = zzb4 == -1 ? zzcbsVar.zzh() : Math.min(zzb4, zzcbsVar.zzh());
|
|
} else {
|
|
if (com.google.android.gms.ads.internal.util.zze.zzc()) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Calculate width with original width " + zzb4 + ", videoHost.getVideoBoundingWidth() " + zzcbsVar.zzh() + ", x " + zzb2 + Consts.STRING_PERIOD);
|
|
}
|
|
min = Math.min(zzb4, zzcbsVar.zzh() - zzb2);
|
|
}
|
|
int i2 = min;
|
|
int zzb5 = zzb(context, map, "h", -1);
|
|
if (((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbccVar)).booleanValue()) {
|
|
min2 = zzb5 == -1 ? zzcbsVar.zzg() : Math.min(zzb5, zzcbsVar.zzg());
|
|
} else {
|
|
if (com.google.android.gms.ads.internal.util.zze.zzc()) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Calculate height with original height " + zzb5 + ", videoHost.getVideoBoundingHeight() " + zzcbsVar.zzg() + ", y " + zzb3 + Consts.STRING_PERIOD);
|
|
}
|
|
min2 = Math.min(zzb5, zzcbsVar.zzg() - zzb3);
|
|
}
|
|
int i3 = min2;
|
|
try {
|
|
i = Integer.parseInt((String) map.get("player"));
|
|
} catch (NumberFormatException unused3) {
|
|
}
|
|
int i4 = i;
|
|
boolean parseBoolean = Boolean.parseBoolean((String) map.get("spherical"));
|
|
if (!equals || zzo.zza() != null) {
|
|
zzo.zzc(zzb2, zzb3, i2, i3);
|
|
return;
|
|
}
|
|
zzo.zzd(zzb2, zzb3, i2, i3, i4, parseBoolean, new zzcbr((String) map.get("flags")));
|
|
zzcbg zza = zzo.zza();
|
|
if (zza != null) {
|
|
zzc(zza, map);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
zzcfz zzq = zzcbsVar.zzq();
|
|
if (zzq != null) {
|
|
if (str.equals("timeupdate")) {
|
|
String str6 = (String) map.get("currentTime");
|
|
if (str6 == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("currentTime parameter missing from timeupdate video GMSG.");
|
|
return;
|
|
}
|
|
try {
|
|
zzq.zzt(Float.parseFloat(str6));
|
|
return;
|
|
} catch (NumberFormatException unused4) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Could not parse currentTime parameter from timeupdate video GMSG: ".concat(str6));
|
|
return;
|
|
}
|
|
}
|
|
if (str.equals("skip")) {
|
|
zzq.zzu();
|
|
return;
|
|
}
|
|
}
|
|
zzcbg zza2 = zzo.zza();
|
|
if (zza2 == null) {
|
|
HashMap hashMap4 = new HashMap();
|
|
hashMap4.put(NotificationCompat.CATEGORY_EVENT, "no_video_view");
|
|
zzcbsVar.zzd("onVideoEvent", hashMap4);
|
|
return;
|
|
}
|
|
if (str.equals("click")) {
|
|
Context context2 = zzcbsVar.getContext();
|
|
int zzb6 = zzb(context2, map, "x", 0);
|
|
float zzb7 = zzb(context2, map, "y", 0);
|
|
long uptimeMillis = SystemClock.uptimeMillis();
|
|
MotionEvent obtain = MotionEvent.obtain(uptimeMillis, uptimeMillis, 0, zzb6, zzb7, 0);
|
|
zza2.zzx(obtain);
|
|
obtain.recycle();
|
|
return;
|
|
}
|
|
if (str.equals("currentTime")) {
|
|
String str7 = (String) map.get("time");
|
|
if (str7 == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Time parameter missing from currentTime video GMSG.");
|
|
return;
|
|
}
|
|
try {
|
|
zza2.zzw((int) (Float.parseFloat(str7) * 1000.0f));
|
|
return;
|
|
} catch (NumberFormatException unused5) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Could not parse time parameter from currentTime video GMSG: ".concat(str7));
|
|
return;
|
|
}
|
|
}
|
|
if (str.equals("hide")) {
|
|
zza2.setVisibility(4);
|
|
return;
|
|
}
|
|
if (str.equals("remove")) {
|
|
zza2.setVisibility(8);
|
|
return;
|
|
}
|
|
if (str.equals("load")) {
|
|
zza2.zzr(valueOf);
|
|
return;
|
|
}
|
|
if (str.equals("loadControl")) {
|
|
zzc(zza2, map);
|
|
return;
|
|
}
|
|
if (str.equals("muted")) {
|
|
if (Boolean.parseBoolean((String) map.get("muted"))) {
|
|
zza2.zzs();
|
|
return;
|
|
} else {
|
|
zza2.zzI();
|
|
return;
|
|
}
|
|
}
|
|
if (str.equals(CampaignEx.JSON_NATIVE_VIDEO_PAUSE)) {
|
|
zza2.zzu();
|
|
return;
|
|
}
|
|
if (str.equals("play")) {
|
|
zza2.zzv();
|
|
return;
|
|
}
|
|
if (str.equals("show")) {
|
|
zza2.setVisibility(0);
|
|
return;
|
|
}
|
|
if (str.equals("src")) {
|
|
String str8 = (String) map.get("src");
|
|
if (map.containsKey("periodicReportIntervalMs")) {
|
|
try {
|
|
num = Integer.valueOf(Integer.parseInt((String) map.get("periodicReportIntervalMs")));
|
|
} catch (NumberFormatException unused6) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Video gmsg invalid numeric parameter 'periodicReportIntervalMs': ".concat(String.valueOf((String) map.get("periodicReportIntervalMs"))));
|
|
}
|
|
}
|
|
String[] strArr = {str8};
|
|
String str9 = (String) map.get("demuxed");
|
|
if (str9 != null) {
|
|
try {
|
|
JSONArray jSONArray = new JSONArray(str9);
|
|
String[] strArr2 = new String[jSONArray.length()];
|
|
while (i < jSONArray.length()) {
|
|
strArr2[i] = jSONArray.getString(i);
|
|
i++;
|
|
}
|
|
strArr = strArr2;
|
|
} catch (JSONException unused7) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Malformed demuxed URL list for playback: ".concat(str9));
|
|
strArr = new String[]{str8};
|
|
}
|
|
}
|
|
if (num != null) {
|
|
zzcbsVar.zzA(num.intValue());
|
|
}
|
|
zza2.zzE(str8, strArr);
|
|
return;
|
|
}
|
|
if (str.equals("touchMove")) {
|
|
Context context3 = zzcbsVar.getContext();
|
|
zza2.zzH(zzb(context3, map, "dx", 0), zzb(context3, map, "dy", 0));
|
|
if (this.zza) {
|
|
return;
|
|
}
|
|
zzcbsVar.zzdg();
|
|
this.zza = true;
|
|
return;
|
|
}
|
|
if (!str.equals("volume")) {
|
|
if (str.equals(MBridgeConstans.EXTRA_KEY_WM)) {
|
|
zza2.zzn();
|
|
return;
|
|
} else {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Unknown video action: ".concat(str));
|
|
return;
|
|
}
|
|
}
|
|
String str10 = (String) map.get("volume");
|
|
if (str10 == null) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Level parameter missing from volume video GMSG.");
|
|
return;
|
|
}
|
|
try {
|
|
zza2.zzG(Float.parseFloat(str10));
|
|
} catch (NumberFormatException unused8) {
|
|
com.google.android.gms.ads.internal.util.client.zzo.zzj("Could not parse volume parameter from volume video GMSG: ".concat(str10));
|
|
}
|
|
}
|
|
}
|