Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c
以下内容为反编译后的 mu.java 源代码,内容仅作参考
package com.flurry.sdk;
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.support.customtabs.CustomTabsService;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.List;
final class mu {
private static final String a = "mu";
private static String b;
private mu() {
}
public static String a(Context context) {
if (b != null) {
return b;
}
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 str = resolveActivity != null ? resolveActivity.activityInfo.packageName : null;
List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, 0);
ArrayList arrayList = new ArrayList();
for (ResolveInfo resolveInfo : queryIntentActivities) {
Intent intent2 = new Intent();
intent2.setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
intent2.setPackage(resolveInfo.activityInfo.packageName);
if (packageManager.resolveService(intent2, 0) != null) {
arrayList.add(resolveInfo.activityInfo.packageName);
}
}
if (arrayList.isEmpty()) {
b = null;
} else if (arrayList.size() == 1) {
b = (String) arrayList.get(0);
} else if (!TextUtils.isEmpty(str) && !a(context, intent) && arrayList.contains(str)) {
b = str;
} else if (arrayList.contains("com.android.chrome")) {
b = "com.android.chrome";
} else if (arrayList.contains("com.chrome.beta")) {
b = "com.chrome.beta";
} else if (arrayList.contains("com.chrome.dev")) {
b = "com.chrome.dev";
} else if (arrayList.contains("com.google.android.apps.chrome")) {
b = "com.google.android.apps.chrome";
}
return b;
}
private static boolean a(Context context, Intent intent) {
List<ResolveInfo> queryIntentActivities;
try {
queryIntentActivities = context.getPackageManager().queryIntentActivities(intent, 64);
} catch (RuntimeException unused) {
kx.b(a, "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;
}
}