百度手机卫士 v8.6.2版本的 MD5 值为:fa60cb367e40201705a2d9f9ce2cbfdf
以下内容为反编译后的 htw.java 源代码,内容仅作参考
package dxoptimizer;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.text.TextUtils;
import cn.opda.a.phonoalbumshoushou.R;
import com.dianxinos.optimizer.module.recommend.data.RelationalRecommendConstants;
import java.io.File;
import java.util.List;
public class htw {
public static void a(Context context, String str) {
avi b = avj.a(context).b("com.baidu.appsearch");
if (b != null) {
if (b.j()) {
Intent intent = new Intent("com.baidu.appsearch.extinvoker.LAUNCH");
intent.putExtra("backop", "0");
intent.putExtra(RelationalRecommendConstants.RECOM_ELEMENT_ID, context.getPackageName());
if (hxp.c(str)) {
if (!a(context)) {
intent.putExtra("func", "2");
} else {
return;
}
} else {
intent.putExtra("func", "10");
intent.putExtra("pkg", str);
}
if (hvp.a(context, intent)) {
context.startActivity(intent);
} else {
hwp.m(context, "com.baidu.appsearch");
}
hzc.a(context);
hzc.a("am", "oba", (Number) 1);
return;
}
hzd.b(context, R.string.jadx_deobf_0x000021aa, 0);
}
}
public static boolean a(Context context) {
Intent intent = new Intent("com.baidu.appsearch.exported.MAPPACTION");
intent.setPackage("com.baidu.appsearch");
PackageManager a = hxq.a(context);
if (a == null) {
return false;
}
List<ResolveInfo> queryIntentActivities = a.queryIntentActivities(intent, 0);
if (queryIntentActivities == null || queryIntentActivities.size() <= 0 || !queryIntentActivities.get(0).activityInfo.exported) {
return false;
}
intent.setClassName("com.baidu.appsearch", queryIntentActivities.get(0).activityInfo.name);
intent.putExtra("invoker", "yhds");
intent.setFlags(335544320);
try {
context.startActivity(intent);
hzc.a(context);
hzc.a("am", "oba", (Number) 1);
return true;
} catch (SecurityException e) {
return false;
}
}
private static ajn b(Context context) {
ajn ajnVar = new ajn();
ajnVar.a = "bstore";
ajnVar.j = huq.l;
ajnVar.b = "com.baidu.appsearch";
ajnVar.c = context.getString(R.string.jadx_deobf_0x0000226f);
ajnVar.g = "https://sjwssu.baidu.com/bd/yhds_download-appsearch";
ajnVar.h = "https://sjwssu.baidu.com/bd/appsearch_android/icon";
return ajnVar;
}
public static void a(Context context, hra hraVar, String str) {
if (!hvy.c(context)) {
hzd.b(context, R.string.jadx_deobf_0x000021ad, 1);
return;
}
if (!hxj.g()) {
hzd.b(context, R.string.jadx_deobf_0x00002b69, 1);
return;
}
ajp a = azo.a(context);
ajn b = b(context);
hraVar.setOnDismissListener(new htx(a, b));
hraVar.show();
if (hwp.g(context, b.b)) {
if (hraVar != null && hraVar.isShowing()) {
hraVar.dismiss();
}
a(context, str);
return;
}
String a2 = hlj.a(context, b.b);
if (!TextUtils.isEmpty(a2)) {
c(context, hraVar, a2);
hzc.a(context);
hzc.a("sf_bda_pe", "com.baidu.appsearch", (Number) 1);
return;
}
ajo c = a.c(b.a, b.b);
if (c != null && c.n == 6 && new File(c.a()).exists()) {
c(context, hraVar, c.a());
hzc.a(context);
hzc.a("sf_bda_pe", "com.baidu.appsearch", (Number) 1);
} else {
azo.b(a, b, new htz(context, hraVar, b));
hzc.a(context);
hzc.a("sf_bda_pn", "com.baidu.appsearch", (Number) 1);
}
}
public static void c(Context context, hra hraVar, String str) {
hpw.a().a(new hua(context, str, hraVar), 4);
}
}