OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 an.java 源代码,内容仅作参考
package com.excelliance.kxqp.util;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.util.Log;
import android.view.View;
import com.excelliance.kxqp.VersionManager;
import com.excelliance.kxqp.bitmap.model.ThirdLink;
import com.excelliance.kxqp.gs.bean.ImportParams;
import com.excelliance.kxqp.gs.dialog.f;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bf;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.ce;
import com.excelliance.kxqp.gs.util.cg;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import java.net.MalformedURLException;
import java.net.URL;
public class an {
public static void a(final ThirdLink thirdLink, final Context context, final String str) {
f.b bVar = new f.b(context);
bVar.c("dialog_simple_dialog").a(com.excelliance.kxqp.gs.util.w.e(context, "cancel")).b(com.excelliance.kxqp.gs.util.w.e(context, "go_setting")).d(com.excelliance.kxqp.gs.util.w.e(context, "title")).e(com.excelliance.kxqp.swipe.a.a.getString(context, "check_background_show_permission")).a(new f.a() {
@Override
public void a(View view, Dialog dialog) {
dialog.dismiss();
Runnable runnable = new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.repository.a.a(context).b("com.hotplaygames.gt");
an.e(thirdLink, context, str);
}
};
if (!ce.c(context)) {
boolean booleanValue = by.a(context, "global_config").b("sp_disable_time_error_not_notice", false).booleanValue();
if (bf.e(context) && !booleanValue) {
new com.excelliance.kxqp.bitmap.ui.a.f(context, runnable).run();
return;
}
}
runnable.run();
}
}).b(new f.a() {
@Override
public void a(View view, Dialog dialog) {
dialog.dismiss();
by.a(context, "sp_total_info").a("key_background_show_view_permission_switch", true);
an.b(context);
}
});
com.excelliance.kxqp.gs.dialog.f a2 = bVar.a();
a2.show();
if (com.excelliance.kxqp.gs.newappstore.b.c.a(context)) {
a2.b(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
a2.a(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
}
}
public static void b(Context context) {
try {
Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent.setData(Uri.fromParts("package", context.getPackageName(), null));
context.startActivity(intent);
} catch (Exception unused) {
cg.a(context, com.excelliance.kxqp.gs.util.w.e(context, "to_permission_fail"));
}
}
public static void b(ThirdLink thirdLink, Context context, String str) {
az.d(str, "sendGT thirdLink:" + thirdLink);
com.excelliance.kxqp.wr.a a2 = com.excelliance.kxqp.wr.a.a();
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("xapkdownload://xapkdownload.com/detail?pkg=" + thirdLink.pkgName));
intent.setPackage("com.hotplaygames.gt");
a2.startActivity(0, intent);
com.excelliance.kxqp.gs.g.c.a().a(thirdLink.mBiAppUploadInfo, thirdLink.url);
}
public static void c(ThirdLink thirdLink, Context context, String str) {
a(context, thirdLink.url);
ExcellianceAppInfo b2 = com.excelliance.kxqp.repository.a.a(context).b("com.excean.web");
if (!bs.q("com.android.providers.downloads") || b2 == null || ((b2 != null && !b2.isApkInstalled()) || thirdLink.toBrowserType == 0)) {
az.d(str, "sendBrowser thirdLink:" + thirdLink);
com.excelliance.kxqp.gs.util.as.A(context, thirdLink.url);
return;
}
az.d(str, "sendBrowser 1 thirdLink:" + thirdLink);
com.excelliance.kxqp.wr.a a2 = com.excelliance.kxqp.wr.a.a();
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(thirdLink.url));
intent.setPackage("com.excean.web");
a2.startActivity(0, intent);
com.excelliance.kxqp.gs.g.c.a().a(thirdLink.mBiAppUploadInfo, thirdLink.url);
}
public static void d(ThirdLink thirdLink, Context context, String str) {
if (com.excelliance.kxqp.gs.util.as.S(context)) {
a(thirdLink, context, str);
} else {
e(thirdLink, context, str);
}
}
public static void e(final ThirdLink thirdLink, final Context context, final String str) {
if (cd.a(thirdLink.url)) {
return;
}
ExcellianceAppInfo b2 = com.excelliance.kxqp.repository.a.a(context).b("com.hotplaygames.gt");
boolean z = b2 != null && b2.isApkInstalled();
boolean z2 = !com.excelliance.kxqp.gs.util.as.d(context, false) && thirdLink.isOurSelf == 1;
if (!z) {
z = com.excelliance.kxqp.wr.a.a().a("com.hotplaygames.gt", 0) != null;
}
az.d(str, "jumpThirdLink userInstalled:" + z + ", ourLink = " + z2);
if (z && z2) {
b(thirdLink, context, str);
return;
}
PackageInfo packageInfo = null;
if (z2) {
try {
packageInfo = context.getPackageManager().getPackageInfo("com.hotplaygames.gt", 0);
} catch (Exception unused) {
}
}
if (packageInfo != null) {
String str2 = packageInfo.applicationInfo.sourceDir;
packageInfo.applicationInfo.loadLabel(context.getPackageManager()).toString();
tp.f(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.repository.a.a(context).b("com.hotplaygames.gt", 8);
VersionManager.getInstance().b("com.hotplaygames.gt", 0, 9);
ImportParams importParams = new ImportParams();
importParams.setPkgs("com.hotplaygames.gt");
importParams.setCopyApk(false);
importParams.setStartApp(false);
importParams.setPosition(2);
io.reactivex.i.b(importParams).a(new com.excelliance.kxqp.b.c.b(context)).a(new com.excelliance.kxqp.b.c.e(com.excelliance.kxqp.b.k.a(context))).a(new io.reactivex.d.a() {
@Override
public void a() {
az.i(str, "jumpThirdLink/doFinally() called");
if (com.excelliance.kxqp.wr.a.a().a("com.hotplaygames.gt", 0) != null) {
an.b(thirdLink, context, str);
} else {
an.c(thirdLink, context, str);
}
}
}).a(new io.reactivex.d.d<com.excelliance.kxqp.b.g>() {
@Override
public void accept(com.excelliance.kxqp.b.g gVar) {
az.i(str, "jumpThirdLink/accept() called with: thread = 【" + Thread.currentThread() + "】, installBean = 【" + gVar + "】");
com.excelliance.kxqp.gs.g.k.a().a(context, gVar.a());
}
}, new io.reactivex.d.d<Throwable>() {
@Override
public void accept(Throwable th) throws Exception {
Log.e(str, "jumpThirdLink/onError() called with: thread = 【" + Thread.currentThread() + "】, throwable = 【" + th + "】");
}
});
}
});
return;
}
c(thirdLink, context, str);
}
private static void a(Context context, String str) {
try {
String host = new URL(str).getHost();
char c = 65535;
int hashCode = host.hashCode();
if (hashCode != -1420919897) {
if (hashCode != -856568726) {
if (hashCode == 93503137 && host.equals("www.qoo-app.com")) {
c = 2;
}
} else if (host.equals("www.hotplaygames.com")) {
c = 0;
}
} else if (host.equals("apkpure.com")) {
c = 1;
}
switch (c) {
case 0:
bz.a().a(context, 121000, 1, "点击hotplaygames");
return;
case 1:
bz.a().a(context, 121000, 2, "点击apkpure");
return;
case 2:
bz.a().a(context, 121000, 3, "点击qoo");
return;
default:
return;
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}