暗网解密 v2.0.4版本的 MD5 值为:d3a04548fef88e775cbe4c3c6e7d81ad
以下内容为反编译后的 ed.java 源代码,内容仅作参考
package com.flurry.sdk;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.List;
public final class ed {
private static String f7319a;
@SuppressLint({"QueryPermissionsNeeded"})
public static String a(Context context) {
List<ResolveInfo> queryIntentActivities;
String str = f7319a;
if (str != null) {
return str;
}
PackageManager packageManager = context.getPackageManager();
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.example.com"));
ResolveInfo resolveActivity = packageManager.resolveActivity(intent, 0);
String str2 = resolveActivity != null ? resolveActivity.activityInfo.packageName : null;
if (Build.VERSION.SDK_INT >= 33) {
queryIntentActivities = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(0L));
} else {
queryIntentActivities = packageManager.queryIntentActivities(intent, 0);
}
ArrayList arrayList = new ArrayList();
for (ResolveInfo resolveInfo : queryIntentActivities) {
Intent intent2 = new Intent();
intent2.setAction("androidx.browser.customtabs.CustomTabsService");
intent2.setPackage(resolveInfo.activityInfo.packageName);
if (packageManager.resolveService(intent2, 0) != null) {
arrayList.add(resolveInfo.activityInfo.packageName);
}
}
if (arrayList.isEmpty()) {
f7319a = null;
} else if (arrayList.size() == 1) {
f7319a = (String) arrayList.get(0);
} else if (!TextUtils.isEmpty(str2) && !a(context, intent) && arrayList.contains(str2)) {
f7319a = str2;
} else if (arrayList.contains("com.android.chrome")) {
f7319a = "com.android.chrome";
} else if (arrayList.contains("com.chrome.beta")) {
f7319a = "com.chrome.beta";
} else if (arrayList.contains("com.chrome.dev")) {
f7319a = "com.chrome.dev";
} else if (arrayList.contains("com.google.android.apps.chrome")) {
f7319a = "com.google.android.apps.chrome";
}
return f7319a;
}
@SuppressLint({"QueryPermissionsNeeded"})
private static boolean a(Context context, Intent intent) {
List<ResolveInfo> queryIntentActivities;
try {
PackageManager packageManager = context.getPackageManager();
if (Build.VERSION.SDK_INT >= 33) {
queryIntentActivities = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(64L));
} else {
queryIntentActivities = packageManager.queryIntentActivities(intent, 64);
}
} catch (RuntimeException unused) {
cx.a(6, "CustomTabsPackageHelper", "Runtime exception while getting specialized handlers");
}
if (queryIntentActivities != null && queryIntentActivities.size() != 0) {
for (ResolveInfo resolveInfo : queryIntentActivities) {
IntentFilter intentFilter = resolveInfo.filter;
if (intentFilter != null && intentFilter.countDataAuthorities() != 0 && intentFilter.countDataPaths() != 0 && resolveInfo.activityInfo != null) {
return true;
}
}
return false;
}
return false;
}
}