整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.kwad.sdk.utils;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import com.kwad.sdk.core.download.a.b;
import com.kwad.sdk.core.response.model.AdInfo;
import com.kwad.sdk.core.response.model.AdTemplate;
import com.kwad.sdk.internal.api.SceneImpl;
import com.ss.android.socialbase.downloader.utils.DownloadExpSwitchCode;
import java.util.HashMap;
import java.util.Map;
public final class d {
private static final Map<String, String> aNZ;
static {
HashMap hashMap = new HashMap();
aNZ = hashMap;
hashMap.put("HUAWEI", "com.huawei.appmarket");
hashMap.put("OPPO", "com.oppo.market");
hashMap.put("vivo", "com.bbk.appstore");
hashMap.put("xiaomi", "com.xiaomi.market");
hashMap.put("OnePlus", "com.oppo.market");
hashMap.put("Meizu", "com.meizu.mstore");
hashMap.put("samsung", "com.sec.android.app.samsungapps");
hashMap.put("SMARTISAN", "com.smartisanos.appstore");
hashMap.put("Realme", "com.oppo.market");
hashMap.put("HONOR", "com.huawei.appmarket");
}
public static boolean a(Context context, final String str, final AdTemplate adTemplate) {
SceneImpl sceneImpl;
return at.Mc() && (sceneImpl = adTemplate.mAdScene) != null && sceneImpl.adStyle != 4 && com.kwad.sdk.core.download.a.b.a(context, str, new b.C0331b() {
@Override
public final void onError(Throwable th) {
super.onError(th);
com.kwad.sdk.commercial.b.a.a(AdTemplate.this, str, "com.xiaomi.market", 0, 1, bn.t(th));
}
@Override
public final void onStart() {
super.onStart();
com.kwad.sdk.commercial.b.a.a(AdTemplate.this, str, "com.xiaomi.market", 0, 1);
}
@Override
public final void onSuccess() {
super.onSuccess();
AdTemplate adTemplate2 = AdTemplate.this;
adTemplate2.mXiaomiAppStoreDetailViewOpen = true;
adTemplate2.mClickOpenAppStore = true;
com.kwad.sdk.commercial.b.a.b(adTemplate2, str, "com.xiaomi.market", 0, 1);
}
}) == 1;
}
private static boolean gq(String str) {
return "OPPO".equals(Build.BRAND) && "com.heytap.market".equals(str);
}
public static boolean h(Context context, AdTemplate adTemplate) {
String str;
String str2;
int i;
String str3;
AdInfo dQ = com.kwad.sdk.core.response.b.e.dQ(adTemplate);
String cO = com.kwad.sdk.core.response.b.a.cO(dQ);
String ay = com.kwad.sdk.core.response.b.a.ay(dQ);
if (context != null && !TextUtils.isEmpty(cO)) {
try {
String str4 = Build.BRAND;
if ("samsung".equals(str4)) {
cO = "http://apps.samsung.com/appquery/appDetail.as?appId=" + ay;
}
str3 = aNZ.get(str4);
} catch (Throwable th) {
th = th;
str = cO;
str2 = null;
}
try {
com.kwad.sdk.commercial.b.a.a(adTemplate, cO, str3, 1, 0);
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(cO));
intent.addFlags(DownloadExpSwitchCode.BUGFIX_GETPACKAGEINFO_BY_UNZIP);
for (ResolveInfo resolveInfo : context.getPackageManager().queryIntentActivities(intent, 0)) {
if (!a(resolveInfo)) {
String str5 = resolveInfo.activityInfo.packageName;
if (str5.equals(str3) || gq(str5)) {
intent.setComponent(new ComponentName(str5, resolveInfo.activityInfo.name));
context.startActivity(intent);
adTemplate.mClickOpenAppStore = true;
com.kwad.sdk.commercial.b.a.b(adTemplate, cO, str3, 1, 0);
return true;
}
}
}
try {
context.startActivity(intent);
adTemplate.mClickOpenAppStore = true;
com.kwad.sdk.commercial.b.a.b(adTemplate, cO, str3, 0, 0);
return true;
} catch (Throwable th2) {
th = th2;
str2 = str3;
str = cO;
i = 0;
com.kwad.sdk.commercial.b.a.a(adTemplate, str, str2, i, 0, bn.t(th));
return false;
}
} catch (Throwable th3) {
th = th3;
str2 = str3;
str = cO;
i = 1;
com.kwad.sdk.commercial.b.a.a(adTemplate, str, str2, i, 0, bn.t(th));
return false;
}
}
return false;
}
private static boolean a(ResolveInfo resolveInfo) {
ActivityInfo activityInfo;
return resolveInfo == null || (activityInfo = resolveInfo.activityInfo) == null || TextUtils.isEmpty(activityInfo.packageName);
}
}