package com.ironsource.environment; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import com.ironsource.environment.thread.IronSourceThreadManager; import com.ironsource.vm; /* loaded from: classes4.dex */ public class NetworkStateReceiver extends BroadcastReceiver { private ConnectivityManager a; private vm b; private boolean c = false; public class a implements Runnable { public a() { } @Override // java.lang.Runnable public void run() { if (NetworkStateReceiver.this.b != null) { NetworkStateReceiver.this.b.a(NetworkStateReceiver.this.c); } } } public NetworkStateReceiver(Context context, vm vmVar) { this.b = vmVar; if (context != null) { this.a = (ConnectivityManager) context.getSystemService("connectivity"); } a(); } /* JADX WARN: Removed duplicated region for block: B:6:0x002a */ /* JADX WARN: Removed duplicated region for block: B:9:? A[RETURN, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private boolean a() { /* r5 = this; boolean r0 = r5.c android.net.ConnectivityManager r1 = r5.a r2 = 1 r3 = 0 if (r1 == 0) goto L23 android.net.NetworkInfo r1 = r1.getActiveNetworkInfo() // Catch: java.lang.Exception -> L16 if (r1 == 0) goto L18 boolean r1 = r1.isConnectedOrConnecting() // Catch: java.lang.Exception -> L16 if (r1 == 0) goto L18 r1 = r2 goto L19 L16: r1 = move-exception goto L1c L18: r1 = r3 L19: r5.c = r1 // Catch: java.lang.Exception -> L16 goto L25 L1c: com.ironsource.i9 r4 = com.ironsource.i9.d() r4.a(r1) L23: r5.c = r3 L25: boolean r1 = r5.c if (r0 == r1) goto L2a goto L2b L2a: r2 = r3 L2b: return r2 */ throw new UnsupportedOperationException("Method not decompiled: com.ironsource.environment.NetworkStateReceiver.a():boolean"); } private void b() { IronSourceThreadManager.INSTANCE.postMediationBackgroundTask(new a()); } @Override // android.content.BroadcastReceiver public void onReceive(Context context, Intent intent) { if (intent == null || intent.getExtras() == null || !a()) { return; } b(); } }