OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 cn.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.util;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import com.android.spush.util.WebActionRouter;
import com.excean.bytedancebi.manager.BiManager;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.bean.OpenVipContentBean;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.gs.bean.InviteCardBean;
import com.excelliance.kxqp.gs.bean.ShareGameBean;
import com.excelliance.kxqp.gs.bean.VipGoodsBean;
import com.excelliance.kxqp.gs.dialog.f;
import com.excelliance.kxqp.gs.main.MainActivity;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.GameMallVipActivity;
import com.excelliance.kxqp.gs.ui.share.core.ui.BaseAssistActivity;
import com.excelliance.kxqp.gs.vip.VipIncomeUploadUtil;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.sdk.StatisticsBase;
import com.excelliance.kxqp.sdk.StatisticsGS;
import com.excelliance.staticslio.StatisticsManager;
import java.io.File;
import java.net.URL;
import java.net.URLConnection;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import org.json.JSONObject;
public class cn {
private static com.excean.view.dialog.a f11969a;
public static void a(Context context) {
a(context, 3);
}
public static void b(Context context) {
if (bx.a().b(context)) {
a(context, 8);
}
}
public static void a(Context context, int i, DialogInterface.OnDismissListener onDismissListener) {
if (context == null) {
return;
}
az.d("VipUtil", "showLastTimeTips:" + i);
if (f11969a != null && f11969a.isShowing()) {
f11969a.dismiss();
}
if (com.excean.ab_builder.c.a.A(context)) {
int b2 = bx.a().b(context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT < 11 ? 0 : 4), "OFFER_VIP");
if (i != 4 || b2 != 1) {
c(context, i, onDismissListener);
return;
}
}
b(context, i, onDismissListener);
}
public static void b(final Context context, final int i, final DialogInterface.OnDismissListener onDismissListener) {
String str;
final SharedPreferences sharedPreferences = context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT < 11 ? 0 : 4);
String e = w.e(context, "me_login_tips_cancle");
String e2 = w.e(context, "me_login_tips_sure_pay");
f.a aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
switch (i) {
case 1:
case 2:
case 3:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.VIP_EXPIRING_DIALOG_TO_VIP);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "限时弹窗续费VIP按钮", "去VIP");
break;
}
cn.d(context);
dialog.dismiss();
}
};
f.a aVar2 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog == null || !dialog.isShowing()) {
return;
}
switch (i) {
case 1:
case 2:
case 3:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.VIP_EXPIRING_DIALOG_TO_VIP);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "VIP倒计时续费弹框-续费vip", "取消");
break;
}
dialog.dismiss();
}
};
final String a2 = bx.a().a(context);
final String e3 = com.excelliance.kxqp.info.a.e(context);
DialogInterface.OnShowListener onShowListener = new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
sharedPreferences.edit().putInt("HASEXPIRATION" + a2, i).apply();
sharedPreferences.edit().putInt("HASEXPIRATION" + e3, i).apply();
switch (i) {
case 1:
case 2:
case 3:
com.excelliance.kxqp.gs.g.c.a().b("vip倒计时续费弹框");
return;
case 4:
com.excelliance.kxqp.gs.g.c.a().b("vip到期续费弹框");
return;
default:
return;
}
}
};
switch (i) {
case 1:
case 2:
case 3:
str = w.e(context, "yout_vip") + i + w.e(context, "to_no_vip");
break;
case 4:
by.a(context, "vipTips").a("markVipTipsFlag", e(context) + StatisticsManager.COMMA + 8);
if (bx.a().b(sharedPreferences, "OFFER_VIP") == 1) {
String e4 = w.e(context, "ascent_task_vip_expire_tips");
e2 = w.e(context, "ascent_task_go_now");
String e5 = w.e(context, "cancel");
f.a aVar3 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
cn.d(context);
dialog.dismiss();
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 1, 1);
bx.a().a(sharedPreferences, "OFFER_VIP", 0);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "续费弹窗续费VIP按钮", "去VIP");
}
};
f.a aVar4 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 2, 1);
bx.a().a(sharedPreferences, "OFFER_VIP", 0);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "VIP到期续费弹框-退出续费vip", "取消");
}
};
str = e4;
e = e5;
aVar = aVar3;
aVar2 = aVar4;
break;
} else {
str = w.e(context, "me_vip_expire_tips");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.VIP_OVERDUE_DIALOG_TO_VIP);
cn.d(context);
dialog.dismiss();
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 1, 1);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "续费弹窗续费VIP按钮", "去VIP");
}
};
aVar2 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 2, 1);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "VIP到期续费弹框-退出续费vip", "取消");
}
};
break;
}
default:
Log.d("VipUtil", "剩余时间 = " + i);
return;
}
f.b bVar = new f.b(context);
bVar.c("dialog_viptips").e(str).b(e2).a(e).a(aVar2).b(aVar);
f11969a = bVar.a();
f11969a.setOnShowListener(onShowListener);
f11969a.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (onDismissListener != null) {
onDismissListener.onDismiss(dialogInterface);
}
}
});
if (f11969a == null || f11969a.isShowing()) {
return;
}
switch (i) {
case 1:
case 2:
case 3:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.VIP_EXPIRING_DIALOG);
break;
case 4:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.VIP_OVERDUE_DIALOG);
break;
}
f11969a.show();
if (com.excelliance.kxqp.gs.newappstore.b.c.a(context) && (f11969a instanceof com.excelliance.kxqp.gs.dialog.f)) {
((com.excelliance.kxqp.gs.dialog.f) f11969a).b(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
((com.excelliance.kxqp.gs.dialog.f) f11969a).a(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
}
}
public static void c(Context context, int i, DialogInterface.OnDismissListener onDismissListener) {
f11969a = new com.excelliance.kxqp.gs.dialog.t(context, i, com.excelliance.kxqp.gs.dialog.t.c, onDismissListener);
f11969a.show();
}
public static void a(Context context, int i) {
if (bx.a().o(context)) {
return;
}
String e = e(context);
az.d("VipUtillt", "成功..." + e);
if (f(context) || !e.contains(String.valueOf(i))) {
az.d("VipUtillt", "第一...");
a(context, i, (ExcellianceAppInfo) null);
}
}
public static void c(Context context) {
if (bx.a().n(context)) {
String e = e(context);
az.d("VipUtillt", "成功..." + e);
if (e.contains(String.valueOf(-1))) {
return;
}
az.d("VipUtillt", "第一...");
cg.a(context, w.e(context, "vip_success_tips"));
by.a(context, "vipTips").a("markVipTipsFlag", e + StatisticsManager.COMMA + (-1));
}
}
public static void a(Context context, int i, ExcellianceAppInfo excellianceAppInfo) {
a(context, i, excellianceAppInfo, (OpenVipContentBean) null);
}
public static void a(Context context, int i, ExcellianceAppInfo excellianceAppInfo, OpenVipContentBean openVipContentBean) {
az.d("VipUtil", "showVipTipDialog");
if (context == null) {
return;
}
if (i == 8 && com.excean.ab_builder.c.a.A(context)) {
if (f11969a != null && f11969a.isShowing()) {
f11969a.dismiss();
}
b(context, i);
return;
}
b(context, i, excellianceAppInfo, openVipContentBean);
}
public static void b(Context context, int i) {
f11969a = new com.excelliance.kxqp.gs.dialog.t(context, i, com.excelliance.kxqp.gs.dialog.t.d, null);
f11969a.show();
}
public static void b(final Context context, final int i, final ExcellianceAppInfo excellianceAppInfo, OpenVipContentBean openVipContentBean) {
boolean z;
if (i == 5 && (context instanceof Activity)) {
aq.a().a((Activity) context, context.getString(R.string.export_app_dialog_message), openVipContentBean);
return;
}
String str = null;
String e = w.e(context, "me_login_tips_cancle");
String e2 = w.e(context, "open_up_immediately");
DialogInterface.OnShowListener onShowListener = new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
by.a(context, "vipTips").a("markVipTipsFlag", cn.e(context) + StatisticsManager.COMMA + i);
}
};
f.a aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog == null || !dialog.isShowing()) {
return;
}
dialog.dismiss();
}
};
f.a aVar2 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
switch (i) {
case 5:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.EXPORT_APP_VIP_DIALOG_TO_VIP);
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "长按游戏导出-开通vip", "开通VIP");
break;
case 6:
VipIncomeUploadUtil.a(context, VipIncomeUploadUtil.a.DESKTOP_ICON_VIP_DIALOG_TO_VIP);
bz.a().a(context, 152000, 3, "点击桌面图标-立即开通");
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "创建快捷方式-开通vip", "开通VIP");
break;
}
cn.d(context);
}
};
boolean z2 = false;
boolean z3 = true;
if (i != -1) {
switch (i) {
case 1:
str = w.e(context, "me_into_webgp_tips_content");
break;
case 2:
str = w.e(context, "me_into_gp_tips_content");
break;
case 3:
str = w.e(context, "me_first_import_succ_tips_content");
e = w.e(context, "make_money");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
cn.a(context, excellianceAppInfo);
}
};
z = false;
z2 = true;
f.b bVar = new f.b(context);
bVar.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a2 = bVar.a();
if (z) {
if (f11969a != null && f11969a.isShowing()) {
f11969a.dismiss();
}
a2.setOnShowListener(onShowListener);
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);
}
f11969a = a2;
return;
}
return;
case 4:
str = w.e(context, "me_choose_vip_node_tips_content");
e = w.e(context, "make_money");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
cn.a(context, excellianceAppInfo);
}
};
z = true;
z2 = true;
f.b bVar2 = new f.b(context);
bVar2.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a22 = bVar2.a();
if (z) {
}
break;
case 5:
str = w.e(context, "vip_import_tips");
e = w.e(context, "make_money");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
cn.a(context, excellianceAppInfo);
}
};
onShowListener = new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
by.a(context, "vipTips").b("markRunappAlreadyTips", true);
com.excelliance.kxqp.gs.g.c.a().b("长按应用导出按钮VIP弹框");
}
};
z = true;
z2 = true;
z3 = false;
f.b bVar22 = new f.b(context);
bVar22.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a222 = bVar22.a();
if (z) {
}
break;
case 6:
str = w.e(context, "vip_shortcut_tips");
e = w.e(context, "make_money");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
cn.a(context, excellianceAppInfo);
bz.a().a(context, 152000, 2, "点击桌面图标-去赚钱");
com.excelliance.kxqp.gs.g.c.a().a((String) null, (String) null, "弹框页", "创建快捷方式-去赚钱", "去赚钱");
}
};
onShowListener = new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
com.excelliance.kxqp.gs.g.c.a().b("长按应用创建快捷方式VIP弹框");
}
};
z = true;
z2 = true;
f.b bVar222 = new f.b(context);
bVar222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a2222 = bVar222.a();
if (z) {
}
break;
case 7:
str = w.e(context, "me_vip_expire_tips");
z = true;
f.b bVar2222 = new f.b(context);
bVar2222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a22222 = bVar2222.a();
if (z) {
}
break;
case 8:
str = w.e(context, "me_vip_expire_tips");
e2 = w.e(context, "me_login_tips_sure_pay");
aVar2 = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 1, 1);
cn.d(context);
}
};
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_VIP_ENRIE_TIPS_SELECT, 2, 1);
}
};
z = true;
f.b bVar22222 = new f.b(context);
bVar22222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a222222 = bVar22222.a();
if (z) {
}
break;
case 9:
new com.excelliance.kxqp.gs.dialog.v(context).show();
return;
case 10:
str = w.e(context, "me_runapp_tips_content");
e = w.e(context, "make_money");
aVar = new f.a() {
@Override
public void a(View view, Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
cn.a(context, excellianceAppInfo);
}
};
onShowListener = new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
az.d("VipUtil", "runapp tips show");
by.a(context, "vipTips").a("makeRunappPkg", (String) null);
by.a(context, "vipTips").a("markRunappAlreadyTips", true);
}
};
z = true;
z2 = true;
f.b bVar222222 = new f.b(context);
bVar222222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a2222222 = bVar222222.a();
if (z) {
}
break;
default:
z = true;
f.b bVar2222222 = new f.b(context);
bVar2222222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a22222222 = bVar2222222.a();
if (z) {
}
break;
}
}
z = false;
f.b bVar22222222 = new f.b(context);
bVar22222222.c("dialog_viptips").a(z2).e(str).b(z3).b(e2).a(e).a(aVar).b(aVar2);
com.excelliance.kxqp.gs.dialog.f a222222222 = bVar22222222.a();
if (z) {
}
}
public static void a(Context context, ExcellianceAppInfo excellianceAppInfo) {
if (b.cs(context) || b.ct(context)) {
InviteCardBean inviteCardBean = new InviteCardBean();
if (excellianceAppInfo != null) {
inviteCardBean.setCustom(2);
inviteCardBean.setAppLogo(excellianceAppInfo.getAppIconPath());
inviteCardBean.setPackName(excellianceAppInfo.getAppPackageName());
inviteCardBean.setAppName(excellianceAppInfo.getAppName());
}
GameMallVipActivity.a(context, 2, inviteCardBean);
return;
}
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_MAKE_MONEY_TO_MAKE_MONEY);
Intent intent = new Intent(context.getPackageName() + ".action.switch.fragment");
if (excellianceAppInfo != null) {
InviteCardBean inviteCardBean2 = new InviteCardBean();
inviteCardBean2.setCustom(2);
inviteCardBean2.setAppLogo(excellianceAppInfo.getAppIconPath());
inviteCardBean2.setPackName(excellianceAppInfo.getAppPackageName());
inviteCardBean2.setAppName(excellianceAppInfo.getAppName());
intent.putExtra("app", inviteCardBean2);
}
intent.putExtra("index", com.excelliance.kxqp.gs.main.c.c());
intent.putExtra("childIndex", 2);
context.sendBroadcast(intent);
}
public static void d(Context context) {
if (b.cs(context) || b.ct(context)) {
GameMallVipActivity.a(context, 1);
return;
}
if (context instanceof MainActivity) {
Intent intent = new Intent(context.getPackageName() + ".action.switch.fragment");
intent.putExtra("index", com.excelliance.kxqp.gs.main.c.c());
intent.putExtra("childIndex", 1);
context.sendBroadcast(intent);
return;
}
try {
Intent intent2 = new Intent();
intent2.setClass(context, MainActivity.class);
intent2.putExtra("shortcut", "openVip");
context.startActivity(intent2);
} catch (Exception e) {
e.printStackTrace();
}
}
public static com.excean.view.dialog.a a() {
return f11969a;
}
public static void startActivity(Context context, Class cls) {
if (!bx.a().b(context)) {
com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLogin(context);
} else {
context.startActivity(new Intent(context, (Class<?>) cls));
}
}
public static void startActivity(Context context, Intent intent) {
if (!bx.a().b(context)) {
com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLogin(context);
} else {
context.startActivity(intent);
}
}
public static String e(Context context) {
return by.a(context, "vipTips").b("markVipTipsFlag", String.valueOf(0));
}
public static boolean f(Context context) {
long a2 = by.a(context, "vipTips").a("markVipTipsTime", (Long) 0L);
long currentTimeMillis = System.currentTimeMillis();
if (a2 != 0 && Math.abs(currentTimeMillis - a2) <= 604800000) {
return false;
}
by.a(context, "vipTips").a("markVipTipsTime", currentTimeMillis);
return true;
}
public static void g(final Context context) {
az.d("VipUtil", "showRunAppTips: isCycle:" + f(context) + " isVip:" + bx.a().n(context));
tp.c(new Runnable() {
@Override
public void run() {
if (bx.a().n(context)) {
return;
}
by a2 = by.a(context, "vipTips");
String b2 = a2.b("makeRunappPkg", (String) null);
boolean booleanValue = a2.b("markRunappAlreadyTips", false).booleanValue();
az.d("VipUtil", "first pkg:" + b2);
if (cn.f(context)) {
tp.i(new Runnable() {
@Override
public void run() {
cn.a(context, 10, (ExcellianceAppInfo) null);
}
});
} else {
if (b2 == null || booleanValue || "com.android.vending,".contains(b2)) {
return;
}
tp.i(new Runnable() {
@Override
public void run() {
cn.a(context, 10, (ExcellianceAppInfo) null);
}
});
}
}
});
}
public static void h(Context context) {
az.d("VipUtil", "readPackageInfo()");
by a2 = by.a(context, "sharePackageInfo");
if (cd.a(a2.b("sharedJsonInfo", ""))) {
try {
String a3 = f.a(new File(com.excelliance.kxqp.gs.ui.make_money.f.a(context)));
az.d("VipUtil", "read apk commentInfo:" + a3);
if (cd.a(a3)) {
return;
}
String a4 = a(a3);
az.d("VipUtil", "decrypt:" + a4);
try {
String optString = new JSONObject(a4).optString("rid");
String optString2 = new JSONObject(a4).optString("infoid");
if (!TextUtils.isEmpty(optString)) {
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_SHARE_PACKAGE_FROM, 1, 1);
}
if (!TextUtils.isEmpty(optString2)) {
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_SHARE_PACKAGE_FROM, 2, 1);
}
az.d("VipUtil", "rid:" + optString);
az.d("VipUtil", "infoid:" + optString2);
} catch (Exception e) {
az.d("VipUtil", "ex:" + e.getMessage());
e.printStackTrace();
}
a2.c().edit().putString("sharedJsonInfo", a3).commit();
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
public static void c(Context context, int i) {
az.d("VipUtil", "removePackageInfo()");
com.excelliance.kxqp.gs.ui.make_money.f.a(new File(com.excelliance.kxqp.gs.ui.make_money.f.a(context)), "");
by a2 = by.a(context, "sharePackageInfo");
String b2 = a2.b("sharedJsonInfo", "");
if (cd.a(b2)) {
return;
}
try {
if (i == 0) {
JSONObject jSONObject = new JSONObject(a(b2));
jSONObject.remove("infoid");
jSONObject.remove("rid");
jSONObject.remove("type");
jSONObject.remove("fromuqid");
jSONObject.remove("fromaid");
a2.a("sharedJsonInfo", b(jSONObject.toString()));
return;
}
if (i == 1) {
JSONObject jSONObject2 = new JSONObject(a(b2));
jSONObject2.remove("taskinfoid");
jSONObject2.remove("tasktype");
jSONObject2.remove("catid");
a2.a("sharedJsonInfo", b(jSONObject2.toString()));
return;
}
if (i != 3) {
if (i == 4) {
JSONObject jSONObject3 = new JSONObject(a(b2));
jSONObject3.remove("NYShareUserId");
a2.a("sharedJsonInfo", b(jSONObject3.toString()));
return;
}
return;
}
JSONObject jSONObject4 = new JSONObject(a(b2));
for (String str : new String[]{"from_aid", "from_chid", "from_subchid", RankingItem.KEY_VER, BaseAssistActivity.KEY_TYPE, "from_rid"}) {
jSONObject4.remove(str);
}
a2.a("sharedJsonInfo", b(jSONObject4.toString()));
} catch (Exception e) {
e.printStackTrace();
}
}
public static String a(String str) {
return bp.a(str, "fuck_snsslmm_bslznw", "utf-8");
}
public static String b(String str) {
return c.a(str);
}
public static String c(String str) {
return bp.a(str, "keics_e21p3kds8s", "utf-8");
}
@Deprecated
public static JSONObject i(Context context) {
return com.excelliance.kxqp.api.f.a(context);
}
@Deprecated
public static JSONObject j(Context context) {
return com.excelliance.kxqp.api.f.c(context);
}
public static void a(Context context, JSONObject jSONObject) {
String b2 = by.a(context, "sharePackageInfo").b("sharedJsonInfo", "");
az.d("VipUtil", "read apk jsonInfo:" + b2);
if (cd.a(b2)) {
return;
}
String a2 = a(b2);
az.d("VipUtil", "decrypt:" + a2);
try {
String optString = new JSONObject(a2).optString("rid");
Object optString2 = new JSONObject(a2).optString("fromuqid");
Object optString3 = new JSONObject(a2).optString("type");
Object optString4 = new JSONObject(a2).optString("fromaid");
az.d("VipUtil", "rid:" + optString);
jSONObject.put("rid", optString);
jSONObject.put("fromuqid", optString2);
jSONObject.put("type", optString3);
jSONObject.put("fromaid", optString4);
} catch (Exception e) {
az.d("VipUtil", "ex:" + e.getMessage());
e.printStackTrace();
}
}
public static void k(Context context) {
az.d("VipUtil", "handleFirstDownloadOfSharedPkg: enter");
by a2 = by.a(context, "sharePackageInfo");
ViewSwitcher a3 = ViewSwitcher.a(context);
boolean booleanValue = a2.b("sp_key_shared_download_app_action_down", false).booleanValue();
boolean a4 = a3.a();
Boolean b2 = a2.b("markShareAppAlreadyDownload", false);
String b3 = a2.b("sharedJsonInfo", "");
az.d("VipUtil", "handleFirstDownloadOfSharedPkg: isAction:" + booleanValue + " isDownloadApp:" + b2 + " isSwitch:" + a4 + " jsonInfo:" + b3);
if (cd.a(b3) || b2.booleanValue() || !a4 || booleanValue) {
return;
}
a2.a("sp_key_shared_download_app_action_down", true);
try {
String a5 = a(b3);
az.d("VipUtil", "decryptJsonInfo:" + a5);
Intent intent = new Intent();
intent.setAction(context.getPackageName() + ".download.app.from.shared.pkg");
String string = new JSONObject(a5).getString(WebActionRouter.KEY_PKG);
intent.putExtra(WebActionRouter.KEY_PKG, string);
if ("com.excean.gspace,com.excean.gospace".contains(string)) {
return;
}
ShareGameBean e = ay.e(as.a(string, context));
File file = com.bumptech.glide.i.b(context).a(e.getTitlePic()).c(Integer.MIN_VALUE, Integer.MIN_VALUE).get();
File file2 = new File(Environment.getExternalStorageDirectory().getAbsoluteFile(), ".xspace/icon");
if (!file2.exists()) {
file2.mkdirs();
}
File file3 = new File(file2, context.getPackageName() + "_" + e.getTitle().replaceAll(":", "") + ".png");
if (!file3.exists()) {
file3.createNewFile();
}
org.apache.commons.b.b.a(file, file3);
intent.putExtra("image", file3.getAbsolutePath());
intent.putExtra("name", e.getTitle());
intent.putExtra("is_action_update_key", false);
context.sendBroadcast(intent);
} catch (Exception e2) {
az.d("VipUtil", "handleFirstDownloadOfSharedPkg ex:" + e2.getMessage());
e2.printStackTrace();
a2.a("sp_key_shared_download_app_action_down", false);
}
}
public static void a(Context context, String str, int i, String str2) {
long j;
char c;
char c2;
String str3;
StringBuilder sb;
int hashCode;
char c3;
bx a2 = bx.a();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long parseLong = Long.parseLong(a2.t(context)) * 1000;
Calendar calendar = Calendar.getInstance();
long j2 = 0;
try {
try {
URLConnection openConnection = new URL("http://ourplay.com.cn/").openConnection();
openConnection.connect();
calendar.setTimeInMillis(openConnection.getDate());
j = calendar.getTimeInMillis();
} catch (Exception e) {
e = e;
}
} catch (Throwable th) {
th = th;
j = j2;
}
try {
az.d("VipUtil", "网络时间:" + simpleDateFormat.format(calendar.getTime()));
az.d("VipUtil", "currentEndTime:" + parseLong + " netTime:" + j);
if (parseLong > j) {
az.d("VipUtil", "还没过期,则直接延续");
calendar.clear();
calendar.setTimeInMillis(parseLong);
}
hashCode = str.hashCode();
} catch (Exception e2) {
e = e2;
j2 = j;
e.printStackTrace();
az.d("VipUtil", "本地时间:" + simpleDateFormat.format(calendar.getTime()));
long currentTimeMillis = System.currentTimeMillis();
az.d("VipUtil", "currentEndTime:" + parseLong + " netTime:" + currentTimeMillis);
if (parseLong > currentTimeMillis) {
az.d("VipUtil", "还没过期,则直接延续");
calendar.clear();
calendar.setTimeInMillis(parseLong);
}
int hashCode2 = str.hashCode();
if (hashCode2 == 99228) {
if (str.equals(VipGoodsBean.UNIT_DAY)) {
c2 = 2;
switch (c2) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap = new HashMap();
hashMap.put(BiManager.IS_VIP, "是");
hashMap.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap);
str3 = "VipUtil";
sb = new StringBuilder();
}
c2 = 65535;
switch (c2) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap2 = new HashMap();
hashMap2.put(BiManager.IS_VIP, "是");
hashMap2.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap2.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap2);
str3 = "VipUtil";
sb = new StringBuilder();
} else if (hashCode2 != 3704893) {
if (hashCode2 == 104080000 && str.equals(VipGoodsBean.UNIT_MONTH)) {
c2 = 0;
switch (c2) {
case 0:
az.d("VipUtil", "加一个月");
calendar.add(2, i);
break;
case 1:
az.d("VipUtil", "加一年");
calendar.add(1, i);
break;
case 2:
az.d("VipUtil", "加一天");
calendar.add(5, i);
by.a(context, "sp_config").a("sp_key_just_buy_one_day_vip", true);
break;
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap22 = new HashMap();
hashMap22.put(BiManager.IS_VIP, "是");
hashMap22.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap22.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap22);
str3 = "VipUtil";
sb = new StringBuilder();
}
c2 = 65535;
switch (c2) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap222 = new HashMap();
hashMap222.put(BiManager.IS_VIP, "是");
hashMap222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap222);
str3 = "VipUtil";
sb = new StringBuilder();
} else {
if (str.equals(VipGoodsBean.UNIT_YEAR)) {
c2 = 1;
switch (c2) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap2222 = new HashMap();
hashMap2222.put(BiManager.IS_VIP, "是");
hashMap2222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap2222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap2222);
str3 = "VipUtil";
sb = new StringBuilder();
}
c2 = 65535;
switch (c2) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap22222 = new HashMap();
hashMap22222.put(BiManager.IS_VIP, "是");
hashMap22222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap22222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap22222);
str3 = "VipUtil";
sb = new StringBuilder();
}
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
} catch (Throwable th2) {
th = th2;
az.d("VipUtil", "currentEndTime:" + parseLong + " netTime:" + j);
if (parseLong > j) {
az.d("VipUtil", "还没过期,则直接延续");
calendar.clear();
calendar.setTimeInMillis(parseLong);
}
int hashCode3 = str.hashCode();
if (hashCode3 == 99228) {
if (str.equals(VipGoodsBean.UNIT_DAY)) {
c = 2;
}
c = 65535;
} else if (hashCode3 != 3704893) {
if (hashCode3 == 104080000 && str.equals(VipGoodsBean.UNIT_MONTH)) {
c = 0;
}
c = 65535;
} else {
if (str.equals(VipGoodsBean.UNIT_YEAR)) {
c = 1;
}
c = 65535;
}
switch (c) {
case 0:
az.d("VipUtil", "加一个月");
calendar.add(2, i);
break;
case 1:
az.d("VipUtil", "加一年");
calendar.add(1, i);
break;
case 2:
az.d("VipUtil", "加一天");
calendar.add(5, i);
by.a(context, "sp_config").a("sp_key_just_buy_one_day_vip", true);
break;
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT < 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap3 = new HashMap();
hashMap3.put(BiManager.IS_VIP, "是");
hashMap3.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap3.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap3);
az.d("VipUtil", "当前结束时间:" + simpleDateFormat.format(calendar.getTime()));
a2.a(context, calendar.getTimeInMillis() / 1000);
throw th;
}
if (hashCode == 99228) {
if (str.equals(VipGoodsBean.UNIT_DAY)) {
c3 = 2;
switch (c3) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap4 = new HashMap();
hashMap4.put(BiManager.IS_VIP, "是");
hashMap4.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap4.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap4);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
c3 = 65535;
switch (c3) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap42 = new HashMap();
hashMap42.put(BiManager.IS_VIP, "是");
hashMap42.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap42.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap42);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
if (hashCode != 3704893) {
if (hashCode == 104080000 && str.equals(VipGoodsBean.UNIT_MONTH)) {
c3 = 0;
switch (c3) {
case 0:
az.d("VipUtil", "加一个月");
calendar.add(2, i);
break;
case 1:
az.d("VipUtil", "加一年");
calendar.add(1, i);
break;
case 2:
az.d("VipUtil", "加一天");
calendar.add(5, i);
by.a(context, "sp_config").a("sp_key_just_buy_one_day_vip", true);
break;
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap422 = new HashMap();
hashMap422.put(BiManager.IS_VIP, "是");
hashMap422.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap422.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap422);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
c3 = 65535;
switch (c3) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap4222 = new HashMap();
hashMap4222.put(BiManager.IS_VIP, "是");
hashMap4222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap4222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap4222);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
if (str.equals(VipGoodsBean.UNIT_YEAR)) {
c3 = 1;
switch (c3) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap42222 = new HashMap();
hashMap42222.put(BiManager.IS_VIP, "是");
hashMap42222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap42222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap42222);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
c3 = 65535;
switch (c3) {
}
context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT >= 11 ? 0 : 4);
com.excelliance.kxqp.gs.g.aa.a(context).a(1);
HashMap hashMap422222 = new HashMap();
hashMap422222.put(BiManager.IS_VIP, "是");
hashMap422222.put(BiManager.IS_BOUGHT_VIP, "是");
hashMap422222.put(BiManager.CURRENT_VIP_TYPE, str2);
BiManager.setPublicPresetParam(hashMap422222);
str3 = "VipUtil";
sb = new StringBuilder();
sb.append("当前结束时间:");
sb.append(simpleDateFormat.format(calendar.getTime()));
az.d(str3, sb.toString());
a2.a(context, calendar.getTimeInMillis() / 1000);
}
public static boolean l(Context context) {
return com.excelliance.kxqp.util.aj.a().c(context) || aq.a().t();
}
}