package com.google.android.gms.internal.ads; import android.app.Activity; import android.os.Looper; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.RelativeLayout; import com.google.android.gms.common.util.CollectionUtils; import com.ironsource.v8; import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil; /* loaded from: classes3.dex */ public final class zzbsc extends zzbsi { private String zza; private boolean zzb; private int zzc; private int zzd; private int zze; private int zzf; private int zzg; private int zzh; private final Object zzi; private final zzcex zzj; private final Activity zzk; private zzcgr zzl; private ImageView zzm; private LinearLayout zzn; private final zzbsj zzo; private PopupWindow zzp; private RelativeLayout zzq; private ViewGroup zzr; static { CollectionUtils.setOf(v8.e.c, v8.e.b, "top-center", "center", v8.e.e, v8.e.d, "bottom-center"); } public zzbsc(zzcex zzcexVar, zzbsj zzbsjVar) { super(zzcexVar, "resize"); this.zza = v8.e.b; this.zzb = true; this.zzc = 0; this.zzd = 0; this.zze = -1; this.zzf = 0; this.zzg = 0; this.zzh = -1; this.zzi = new Object(); this.zzj = zzcexVar; this.zzk = zzcexVar.zzi(); this.zzo = zzbsjVar; } /* JADX INFO: Access modifiers changed from: private */ /* renamed from: zzm, reason: merged with bridge method [inline-methods] */ public final void zzc(boolean z) { if (((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbcl.zzkI)).booleanValue()) { this.zzq.removeView((View) this.zzj); this.zzp.dismiss(); } else { this.zzp.dismiss(); this.zzq.removeView((View) this.zzj); } if (((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbcl.zzkJ)).booleanValue()) { ViewParent parent = ((View) this.zzj).getParent(); if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView((View) this.zzj); } } ViewGroup viewGroup = this.zzr; if (viewGroup != null) { viewGroup.removeView(this.zzm); if (((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbcl.zzkK)).booleanValue()) { try { this.zzr.addView((View) this.zzj); this.zzj.zzaj(this.zzl); } catch (IllegalStateException e) { com.google.android.gms.ads.internal.util.client.zzo.zzh("Unable to add webview back to view hierarchy.", e); } } else { this.zzr.addView((View) this.zzj); this.zzj.zzaj(this.zzl); } } if (z) { zzl(MRAIDCommunicatorUtil.STATES_DEFAULT); zzbsj zzbsjVar = this.zzo; if (zzbsjVar != null) { zzbsjVar.zzb(); } } this.zzp = null; this.zzq = null; this.zzr = null; this.zzn = null; } public final void zza(final boolean z) { synchronized (this.zzi) { try { if (this.zzp != null) { if (!((Boolean) com.google.android.gms.ads.internal.client.zzbe.zzc().zza(zzbcl.zzkH)).booleanValue() || Looper.getMainLooper().getThread() == Thread.currentThread()) { zzc(z); } else { zzbzw.zzf.zza(new Runnable() { // from class: com.google.android.gms.internal.ads.zzbsa @Override // java.lang.Runnable public final void run() { zzbsc.this.zzc(z); } }); } } } catch (Throwable th) { throw th; } } } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARN: Removed duplicated region for block: B:65:0x0262 A[Catch: all -> 0x0012, TryCatch #0 {all -> 0x0012, blocks: (B:4:0x0007, B:6:0x000b, B:7:0x0010, B:10:0x0015, B:12:0x001d, B:13:0x0022, B:15:0x0024, B:17:0x0030, B:18:0x0035, B:20:0x0037, B:22:0x003f, B:23:0x0044, B:25:0x0046, B:27:0x0054, B:28:0x0065, B:30:0x0073, B:31:0x0084, B:33:0x0092, B:34:0x00a3, B:36:0x00b1, B:37:0x00c2, B:39:0x00d0, B:40:0x00de, B:42:0x00ec, B:43:0x00ee, B:45:0x00f2, B:47:0x00f6, B:49:0x00fe, B:52:0x0106, B:56:0x012c, B:62:0x0138, B:65:0x0262, B:66:0x0267, B:68:0x0269, B:70:0x0289, B:72:0x028d, B:74:0x029a, B:75:0x02d6, B:90:0x038f, B:91:0x03be, B:93:0x03d6, B:94:0x03f7, B:96:0x03ff, B:97:0x0406, B:98:0x042c, B:102:0x042f, B:104:0x0454, B:105:0x0469, B:107:0x0396, B:108:0x039d, B:109:0x03a4, B:110:0x03ab, B:111:0x03b1, B:112:0x03b8, B:129:0x02d3, B:130:0x046b, B:131:0x0470, B:133:0x0140, B:135:0x0144, B:146:0x0197, B:147:0x01a1, B:149:0x01f4, B:151:0x01f7, B:153:0x01fb, B:156:0x0202, B:157:0x01a5, B:158:0x01af, B:159:0x01b6, B:160:0x01c2, B:161:0x01ca, B:162:0x01de, B:163:0x01ea, B:180:0x0213, B:183:0x023d, B:186:0x024d, B:187:0x0243, B:189:0x024b, B:190:0x0235, B:192:0x023b, B:193:0x0252, B:194:0x0259, B:195:0x0472, B:196:0x0477, B:198:0x0479, B:199:0x047e), top: B:3:0x0007, inners: #1 }] */ /* JADX WARN: Removed duplicated region for block: B:68:0x0269 A[Catch: all -> 0x0012, TryCatch #0 {all -> 0x0012, blocks: (B:4:0x0007, B:6:0x000b, B:7:0x0010, B:10:0x0015, B:12:0x001d, B:13:0x0022, B:15:0x0024, B:17:0x0030, B:18:0x0035, B:20:0x0037, B:22:0x003f, B:23:0x0044, B:25:0x0046, B:27:0x0054, B:28:0x0065, B:30:0x0073, B:31:0x0084, B:33:0x0092, B:34:0x00a3, B:36:0x00b1, B:37:0x00c2, B:39:0x00d0, B:40:0x00de, B:42:0x00ec, B:43:0x00ee, B:45:0x00f2, B:47:0x00f6, B:49:0x00fe, B:52:0x0106, B:56:0x012c, B:62:0x0138, B:65:0x0262, B:66:0x0267, B:68:0x0269, B:70:0x0289, B:72:0x028d, B:74:0x029a, B:75:0x02d6, B:90:0x038f, B:91:0x03be, B:93:0x03d6, B:94:0x03f7, B:96:0x03ff, B:97:0x0406, B:98:0x042c, B:102:0x042f, B:104:0x0454, B:105:0x0469, B:107:0x0396, B:108:0x039d, B:109:0x03a4, B:110:0x03ab, B:111:0x03b1, B:112:0x03b8, B:129:0x02d3, B:130:0x046b, B:131:0x0470, B:133:0x0140, B:135:0x0144, B:146:0x0197, B:147:0x01a1, B:149:0x01f4, B:151:0x01f7, B:153:0x01fb, B:156:0x0202, B:157:0x01a5, B:158:0x01af, B:159:0x01b6, B:160:0x01c2, B:161:0x01ca, B:162:0x01de, B:163:0x01ea, B:180:0x0213, B:183:0x023d, B:186:0x024d, B:187:0x0243, B:189:0x024b, B:190:0x0235, B:192:0x023b, B:193:0x0252, B:194:0x0259, B:195:0x0472, B:196:0x0477, B:198:0x0479, B:199:0x047e), top: B:3:0x0007, inners: #1 }] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void zzb(java.util.Map r18) { /* Method dump skipped, instructions count: 1206 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzbsc.zzb(java.util.Map):void"); } public final void zzd(int i, int i2, boolean z) { synchronized (this.zzi) { this.zzc = i; this.zzd = i2; } } public final void zze(int i, int i2) { this.zzc = i; this.zzd = i2; } public final boolean zzf() { boolean z; synchronized (this.zzi) { z = this.zzp != null; } return z; } }