MyRecorder v1.01.90.0219版本的 MD5 值为:c361f51174a0bf833abfa72929caf8d3
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.core.act;
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.Bundle;
import android.text.TextUtils;
import android.util.Log;
import com.bytedance.sdk.component.utils.l;
import com.bytedance.sdk.openadsdk.utils.aa;
import java.util.ArrayList;
import java.util.List;
import r.d;
import r.k;
import r.m;
import r.n;
public class a {
private static String f15042a = null;
private static int f15043b = -1;
private static int f15044c = -1;
private static volatile boolean f15045d;
private static Boolean f15046e;
private static ActServiceConnection f15047f;
private a() {
}
public static int a() {
Boolean bool = f15046e;
return (bool != null && bool.booleanValue()) ? 1 : 0;
}
public static String a(final Context context) {
String str = f15042a;
if (str != null) {
return str;
}
try {
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;
List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, 0);
ArrayList arrayList = new ArrayList();
for (ResolveInfo resolveInfo : queryIntentActivities) {
Intent intent2 = new Intent();
intent2.setAction("android.support.customtabs.action.CustomTabsService");
intent2.setPackage(resolveInfo.activityInfo.packageName);
if (packageManager.resolveService(intent2, 0) != null) {
arrayList.add(resolveInfo.activityInfo.packageName);
}
}
if (arrayList.isEmpty()) {
f15042a = null;
} else if (TextUtils.isEmpty(str2) || a(context, intent) || !arrayList.contains(str2)) {
f15042a = (String) arrayList.get(0);
} else {
f15042a = str2;
}
if (!TextUtils.isEmpty(f15042a)) {
synchronized (a.class) {
if (!f15045d) {
b bVar = new b() {
@Override
public void a() {
ActServiceConnection unused = a.f15047f = null;
}
@Override
public void a(final d dVar) {
aa.d().execute(new Runnable() {
@Override
public void run() {
boolean z7;
boolean z9;
boolean z10;
try {
r.c cVar = new r.c();
n nVar = new n() {
@Override
public void onGreatestScrollPercentageIncreased(int i10, Bundle bundle) {
m.a(this, i10, bundle);
}
@Override
public void onSessionEnded(boolean z11, Bundle bundle) {
m.b(this, z11, bundle);
}
@Override
public void onVerticalScrollEvent(boolean z11, Bundle bundle) {
m.c(this, z11, bundle);
}
};
k d10 = dVar.d(cVar);
z9 = d10 != null ? d10.g(Bundle.EMPTY) : false;
try {
if (z9) {
int unused = a.f15043b = 1;
z10 = d10.i(nVar, Bundle.EMPTY);
if (z10) {
try {
int unused2 = a.f15044c = 1;
} catch (Throwable th2) {
z7 = z10;
th = th2;
l.e("CustomTabsHelper", th.getMessage());
z10 = z7;
l.b("CustomTabsHelper", "pagact before ", " api_Available=", Boolean.valueOf(z9), " signalsCallback=", Boolean.valueOf(z10));
ActServiceConnection actServiceConnection = a.f15047f;
if (a.f15045d) {
return;
}
return;
}
}
} else {
int unused3 = a.f15043b = 0;
z10 = false;
}
if (z9 && z10) {
Boolean unused4 = a.f15046e = Boolean.TRUE;
} else {
Boolean unused5 = a.f15046e = Boolean.FALSE;
}
} catch (Throwable th3) {
th = th3;
z7 = false;
}
} catch (Throwable th4) {
th = th4;
z7 = false;
z9 = false;
}
l.b("CustomTabsHelper", "pagact before ", " api_Available=", Boolean.valueOf(z9), " signalsCallback=", Boolean.valueOf(z10));
ActServiceConnection actServiceConnection2 = a.f15047f;
if (a.f15045d || actServiceConnection2 == null) {
return;
}
context.unbindService(actServiceConnection2);
}
});
}
};
if (f15047f == null) {
f15047f = new ActServiceConnection(bVar);
}
f15045d = d.a(context, f15042a, f15047f);
}
}
}
} catch (Throwable th2) {
l.e("CustomTabsHelper", th2.getMessage());
}
return f15042a;
}
public static void a(int i10) {
f15043b = i10;
}
private static boolean a(Context context, Intent intent) {
List<ResolveInfo> queryIntentActivities;
try {
queryIntentActivities = context.getPackageManager().queryIntentActivities(intent, 64);
} catch (RuntimeException unused) {
Log.e("CustomTabsHelper", "Runtime exception while getting specialized handlers");
}
if (queryIntentActivities.size() == 0) {
return false;
}
for (ResolveInfo resolveInfo : queryIntentActivities) {
IntentFilter intentFilter = resolveInfo.filter;
if (intentFilter != null && intentFilter.countDataAuthorities() != 0 && intentFilter.countDataPaths() != 0 && resolveInfo.activityInfo != null) {
return true;
}
}
return false;
}
public static int b() {
return f15043b;
}
public static int b(Context context) {
return !TextUtils.isEmpty(a(context)) ? 1 : 0;
}
public static void b(int i10) {
f15044c = i10;
}
public static int c() {
return f15044c;
}
}