- 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
31 lines
1.1 KiB
Java
31 lines
1.1 KiB
Java
package com.mbridge.msdk.videocommon.download;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.net.ConnectivityManager;
|
|
import android.net.NetworkInfo;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class NetStateOnReceive extends BroadcastReceiver {
|
|
@Override // android.content.BroadcastReceiver
|
|
public void onReceive(Context context, Intent intent) {
|
|
try {
|
|
if ("android.net.conn.CONNECTIVITY_CHANGE".equals(intent.getAction())) {
|
|
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
|
|
if (activeNetworkInfo != null && activeNetworkInfo.isAvailable()) {
|
|
if (activeNetworkInfo.getType() == 1) {
|
|
b.getInstance().b(true);
|
|
} else if (activeNetworkInfo.getType() == 0) {
|
|
b.getInstance().a();
|
|
}
|
|
} else {
|
|
b.getInstance().a(false);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|