CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 h0.java 源代码,内容仅作参考
package i.h.b0;
import android.annotation.SuppressLint;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.util.Log;
import com.facebook.FacebookSdkNotInitializedException;
import com.facebook.LoggingBehavior;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import kotlin.Metadata;
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u001e\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0013\n\u0002\u0010\u0011\n\u0002\b\u0004\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J \u0010\n\u001a\u00020\u000b2\u000e\u0010\f\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00040\r2\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J$\u0010\u000f\u001a\u00020\u000b\"\u0004\b\u0000\u0010\u00102\f\u0010\f\u001a\b\u0012\u0004\u0012\u0002H\u00100\r2\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J\b\u0010\u0011\u001a\u00020\u0004H\u0007J\u0010\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u0010\u0010\u0016\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\b\u0010\u0017\u001a\u00020\u0004H\u0007J\u0010\u0010\u0018\u001a\u00020\u000b2\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u001a\u0010\u0019\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\b\u0010\u001a\u001a\u0004\u0018\u00010\u0004H\u0007J\u0010\u0010\u001b\u001a\u00020\u000b2\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u0018\u0010\u001b\u001a\u00020\u000b2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001c\u001a\u00020\u0013H\u0007J\u0010\u0010\u001d\u001a\u00020\u000b2\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u0018\u0010\u001d\u001a\u00020\u000b2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001c\u001a\u00020\u0013H\u0007J\u0010\u0010\u001e\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u0018\u0010\u001f\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010 \u001a\u00020\u0004H\u0007J\u0010\u0010!\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0007J\u0018\u0010\"\u001a\u00020\u000b2\u0006\u0010#\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J$\u0010\"\u001a\u00020\u000b\"\u0004\b\u0000\u0010\u00102\f\u0010\f\u001a\b\u0012\u0004\u0012\u0002H\u00100\r2\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J$\u0010$\u001a\u00020\u000b\"\u0004\b\u0000\u0010\u00102\f\u0010\f\u001a\b\u0012\u0004\u0012\u0002H\u00100\r2\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J\u001a\u0010%\u001a\u00020\u000b2\b\u0010#\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J\u001a\u0010&\u001a\u00020\u000b2\b\u0010#\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u000e\u001a\u00020\u0004H\u0007J7\u0010'\u001a\u00020\u000b2\b\u0010#\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u000e\u001a\u00020\u00042\u0016\u0010(\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010\u00010)\"\u0004\u0018\u00010\u0001H\u0007¢\u0006\u0002\u0010*J\b\u0010+\u001a\u00020\u000bH\u0007J\b\u0010,\u001a\u00020\u000bH\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006-"}, d2 = {"Lcom/facebook/internal/Validate;", "", "()V", "CONTENT_PROVIDER_BASE", "", "CONTENT_PROVIDER_NOT_FOUND_REASON", "CUSTOM_TAB_REDIRECT_URI_PREFIX", "FACEBOOK_ACTIVITY_NOT_FOUND_REASON", "NO_INTERNET_PERMISSION_REASON", "TAG", "containsNoNullOrEmpty", "", "container", "", "name", "containsNoNulls", "T", "hasAppID", "hasBluetoothPermission", "", "context", "Landroid/content/Context;", "hasChangeWifiStatePermission", "hasClientToken", "hasContentProvider", "hasCustomTabRedirectActivity", "redirectURI", "hasFacebookActivity", "shouldThrow", "hasInternetPermissions", "hasLocationPermission", "hasPermission", "permission", "hasWiFiPermission", "notEmpty", "arg", "notEmptyAndContainsNoNulls", "notNull", "notNullOrEmpty", "oneOf", "values", "", "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V", "runningOnUiThread", "sdkInitialized", "facebook-core_release"}, k = 1, mv = {1, 5, 1})
public final class h0 {
public static final String a;
static {
String name = h0.class.getName();
n.i.b.h.d(name, "Validate::class.java.name");
a = name;
}
public static final String a() {
HashSet<LoggingBehavior> hashSet = i.h.i.a;
j();
String str = i.h.i.f10239e;
if (str != null) {
return str;
}
throw new IllegalStateException("No Client Token found, please set the Client Token.".toString());
}
public static final boolean b(Context context, String str) {
List<ResolveInfo> list;
n.i.b.h.e(context, "context");
h(context, "context");
PackageManager packageManager = context.getPackageManager();
if (packageManager != null) {
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.addCategory("android.intent.category.DEFAULT");
intent.addCategory("android.intent.category.BROWSABLE");
intent.setData(Uri.parse(str));
list = packageManager.queryIntentActivities(intent, 64);
} else {
list = null;
}
if (list != null) {
boolean z = false;
for (ResolveInfo resolveInfo : list) {
ActivityInfo activityInfo = resolveInfo.activityInfo;
if (!n.i.b.h.a(activityInfo.name, "com.facebook.CustomTabActivity") || !n.i.b.h.a(activityInfo.packageName, context.getPackageName())) {
return false;
}
z = true;
}
return z;
}
return false;
}
public static final void c(Context context) {
n.i.b.h.e(context, "context");
d(context, true);
}
@SuppressLint({"WrongConstant"})
public static final void d(Context context, boolean z) {
ActivityInfo activityInfo;
n.i.b.h.e(context, "context");
h(context, "context");
PackageManager packageManager = context.getPackageManager();
if (packageManager != null) {
try {
activityInfo = packageManager.getActivityInfo(new ComponentName(context, "com.facebook.FacebookActivity"), 1);
} catch (PackageManager.NameNotFoundException unused) {
}
if (activityInfo != null) {
if (!z) {
Log.w(a, "FacebookActivity is not declared in the AndroidManifest.xml. If you are using the facebook-common module or dependent modules please add com.facebook.FacebookActivity to your AndroidManifest.xml file. See https://developers.facebook.com/docs/android/getting-started for more info.");
return;
}
throw new IllegalStateException("FacebookActivity is not declared in the AndroidManifest.xml. If you are using the facebook-common module or dependent modules please add com.facebook.FacebookActivity to your AndroidManifest.xml file. See https://developers.facebook.com/docs/android/getting-started for more info.".toString());
}
return;
}
activityInfo = null;
if (activityInfo != null) {
}
}
public static final void e(Context context, boolean z) {
n.i.b.h.e(context, "context");
h(context, "context");
if (context.checkCallingOrSelfPermission("android.permission.INTERNET") == -1) {
if (!z) {
Log.w(a, "No internet permissions granted for the app, please add <uses-permission android:name=\"android.permission.INTERNET\" /> to your AndroidManifest.xml.");
return;
}
throw new IllegalStateException("No internet permissions granted for the app, please add <uses-permission android:name=\"android.permission.INTERNET\" /> to your AndroidManifest.xml.".toString());
}
}
public static final void f(String str, String str2) {
n.i.b.h.e(str, "arg");
n.i.b.h.e(str2, "name");
if (!(str.length() > 0)) {
throw new IllegalArgumentException(i.a.b.a.a.s("Argument '", str2, "' cannot be empty").toString());
}
}
public static final <T> void g(Collection<? extends T> collection, String str) {
n.i.b.h.e(collection, "container");
n.i.b.h.e(str, "name");
n.i.b.h.e(collection, "container");
n.i.b.h.e(str, "name");
h(collection, str);
for (T t2 : collection) {
if (t2 == null) {
throw new NullPointerException(i.a.b.a.a.s("Container '", str, "' cannot contain null values"));
}
}
n.i.b.h.e(collection, "container");
n.i.b.h.e(str, "name");
if (!(!collection.isEmpty())) {
throw new IllegalArgumentException(i.a.b.a.a.s("Container '", str, "' cannot be empty").toString());
}
}
public static final void h(Object obj, String str) {
n.i.b.h.e(str, "name");
if (obj == null) {
throw new NullPointerException(i.a.b.a.a.s("Argument '", str, "' cannot be null"));
}
}
public static final void i(String str, String str2) {
n.i.b.h.e(str2, "name");
if (!(!f0.F(str))) {
throw new IllegalArgumentException(i.a.b.a.a.s("Argument '", str2, "' cannot be null or empty").toString());
}
}
public static final void j() {
if (!i.h.i.i()) {
throw new FacebookSdkNotInitializedException("The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.");
}
}
}