OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 MainRouterImpl.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.router.impl;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.os.Build;
import android.util.Log;
import androidx.annotation.Keep;
import com.excelliance.kxqp.SmtServService;
import com.excelliance.kxqp.api.f;
import com.excelliance.kxqp.archcompat.view.ArchCompatActivity;
import com.excelliance.kxqp.community.ui.AppDetailActivity;
import com.excelliance.kxqp.gs.main.MainActivity;
import com.excelliance.kxqp.gs.newappstore.b.c;
import com.excelliance.kxqp.gs.ui.medal.a.l;
import com.excelliance.kxqp.gs.ui.share.core.config.SocializeMedia;
import com.excelliance.kxqp.gs.ui.share.core.helper.ShareHelper;
import com.excelliance.kxqp.gs.ui.share.core.ui.WxAssistActivity;
import com.excelliance.kxqp.gs.util.UserUtil;
import com.excelliance.kxqp.gs.util.b;
import com.excelliance.kxqp.gs.util.bo;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.gs.util.t;
import com.excelliance.kxqp.gs.util.y;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.repository.ViewRepository;
import com.excelliance.kxqp.repository.a;
import com.excelliance.kxqp.sdk.StatisticsBase;
import com.excelliance.kxqp.sdk.StatisticsBuilder;
import com.excelliance.kxqp.sdk.StatisticsGS;
import com.excelliance.kxqp.ui.common.ViewDownloadProgress;
import com.excelliance.kxqp.util.i;
import com.excelliance.kxqp.util.q;
import com.excelliance.kxqp.util.v;
import com.google.gson.Gson;
import io.github.prototypez.service.main.IDownloadView;
import io.github.prototypez.service.main.IImagePickerCallback;
import io.github.prototypez.service.main.IMainRouter;
import io.github.prototypez.service.main.ShareMedia;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONObject;
@Keep
public class MainRouterImpl implements IMainRouter {
@Override
public String getApiBaseUrl() {
return "https://api.ourplay.com.cn/";
}
@Override
public String getLoginAction() {
return WxAssistActivity.ACTION_WXLOGIN_RESULT;
}
@Override
public void onEnterInputAccount(Context context, int i) {
StatisticsBuilder.getInstance().builder().setDescription("用户注册来源及成功率统计").setPriKey1(130000).setPriKey2(i).setLongKey1(1L).buildImmediate(context);
}
@Override
public void onEnterRegister(Context context, int i) {
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_ACCOUNT_REGISTER);
StatisticsBuilder.getInstance().builder().setDescription("用户注册来源及成功率统计").setPriKey1(130000).setPriKey2(i).setLongKey1(2L).buildImmediate(context);
}
@Override
public void onRegisterSuccess(Context context, int i) {
StatisticsGS.getInstance().uploadUserAction(context, 116);
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_ACCOUNT_REGISTER, 1, 1);
StatisticsBuilder.getInstance().builder().setDescription("用户注册来源及成功率统计").setPriKey1(130000).setPriKey2(i).setLongKey1(3L).buildImmediate(context);
}
@Override
public void onLoginCanceled(Context context) {
context.sendBroadcast(new Intent(context.getPackageName() + ".user_login_cancel"));
Log.d("MainRouterImpl", "onLoginCanceled/sendBroadcast");
}
@Override
public void onEnterLogin(Context context, int i) {
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_ACCOUNT_LOGIN);
}
@Override
public void onLoginSuccess(Context context, int i, String str, String str2, String str3, boolean z) {
Log.d("MainRouterImpl", "onLoginSuccess: from::" + z);
StatisticsGS.getInstance().uploadUserAction(context, StatisticsBase.UA_ACCOUNT_LOGIN, 1, 1);
UserUtil.getInstance().handleLoginResult(context, str, str2, str3);
SharedPreferences sharedPreferences = context.getSharedPreferences("USERINFO", Build.VERSION.SDK_INT < 11 ? 0 : 4);
Intent intent = new Intent(context.getPackageName() + ".user_login_in");
intent.putExtra(t.f12028b, true);
intent.putExtra(t.j, bx.a().a(sharedPreferences, t.j));
intent.putExtra(t.f, bx.a().a(sharedPreferences, t.f));
intent.putExtra(t.c, bx.a().a(sharedPreferences, t.c));
intent.putExtra("USER_NAME", bx.a().a(sharedPreferences, "USER_NAME"));
intent.putExtra("USER_ID", bx.a().b(sharedPreferences, "USER_ID"));
intent.putExtra(t.k, bx.a().b(sharedPreferences, t.k));
intent.putExtra(t.l, bx.a().b(sharedPreferences, t.l));
if (i == 40) {
intent.putExtra(t.m, z);
}
intent.putExtra("KEY_LOGIN_FROM", i);
context.sendBroadcast(intent);
Log.d("MainRouterImpl", "onLoginSuccess/sendBroadcast");
l.a(context).a();
}
@Override
public String getAppListInJson(Context context) {
Log.d("MainRouterImpl", String.format("MainRouterImpl/getAppListInJson:thread(%s)", Thread.currentThread().getName()));
List<ExcellianceAppInfo> b2 = a.a(context).b();
ArrayList arrayList = new ArrayList();
for (ExcellianceAppInfo excellianceAppInfo : b2) {
if (!bs.d(excellianceAppInfo.getAppPackageName()) && !bs.r(excellianceAppInfo.getAppPackageName())) {
arrayList.add(excellianceAppInfo);
}
}
return new Gson().a(arrayList);
}
@Override
public String getAppPath(Context context, String str) {
ExcellianceAppInfo b2 = a.a(context).b(str);
if (b2 != null) {
return b2.getPath();
}
return null;
}
@Override
public String getAppConfigInJson(Context context, String str) {
return new Gson().a(a.a(context).d(str));
}
@Override
public void installApk(Context context, String str, String str2, String str3, String str4) {
Intent intent = new Intent(context, (Class<?>) SmtServService.class);
intent.setAction("com.excelliance.kxqp.action.import.single.apk");
intent.putExtra("key_package_name", str);
intent.putExtra("key_apk_path", str2);
intent.putExtra("key_need_copy", true);
intent.putExtra("key_env_host", str3);
intent.putExtra("key_source_from", str4);
intent.putExtra("key_xapk", true);
try {
context.startService(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public boolean getDisplayNewTheme(Context context) {
return c.a(context);
}
@Override
public void openXapk(Context context, String str) {
Intent intent = new Intent(context, (Class<?>) MainActivity.class);
intent.putExtra("from_xapk_installer", true);
intent.putExtra("key_package_name", str);
intent.setFlags(268435456);
context.startActivity(intent);
}
@Override
public void initMemoryCache(Context context) {
v.a();
q.a(context);
context.getSharedPreferences("sp_statistics_info", 0);
context.getSharedPreferences("sp_combine_recommend", 0);
context.getSharedPreferences("sp_ascent_task", 0);
context.getSharedPreferences("sp_key_n_device_done", 0);
context.getSharedPreferences("appsConfig", 0);
context.getSharedPreferences("vipTips", 0);
context.getSharedPreferences("market_action", 0);
context.getSharedPreferences("sp_flow_info", 0);
context.getSharedPreferences("global_config", 0);
context.getSharedPreferences("USERINFO", 0);
context.getSharedPreferences("SWITCHUTIL2_SP_NAME", 0);
context.getSharedPreferences("permissionSp", 0);
context.getSharedPreferences("sp_config_vpn_regin_id", 0);
context.getSharedPreferences("feedback", 0);
context.getSharedPreferences("switcher", 0);
context.getSharedPreferences("sp_new_usr_guide", 0);
context.getSharedPreferences("sp_add_native_game_dialog", 0);
context.getSharedPreferences("sp_total_info", 0);
context.getSharedPreferences("name_google_account_name", 0);
b.a(context, 0);
a.a(context).b();
a.a(context).v();
}
@Override
public void inflateLayoutAsync(Context context) {
ViewRepository.getInstance(context).inflateAll();
}
@Override
public void decodeBitmapAsync(Context context) {
ViewRepository.getInstance(context).decodeAll();
}
@Override
public void invokeCustomImagePicker(Context context, final IImagePickerCallback iImagePickerCallback) {
y.a().a(context, new y.a() {
@Override
public void a(Bitmap bitmap) {
iImagePickerCallback.onPickResult(true, "", bitmap);
}
@Override
public void a(String str) {
iImagePickerCallback.onPickResult(false, str, null);
}
});
}
@Override
public String encrypt(String str) {
return cn.b(str);
}
@Override
public String decrypt(String str) {
return cn.a(str);
}
@Override
public List<String> queryInstalledPackageNames(Context context) {
ArrayList arrayList = new ArrayList();
Iterator<ExcellianceAppInfo> it = a.a(context).b().iterator();
while (it.hasNext()) {
arrayList.add(it.next().appPackageName);
}
return arrayList;
}
@Override
public void shareH5(Activity activity, ShareMedia shareMedia, String str, String str2, String str3, String str4) {
SocializeMedia socializeMedia;
ShareHelper instance = ShareHelper.instance(activity);
switch (shareMedia) {
case MOMENT:
socializeMedia = SocializeMedia.WEIXIN_MONMENT;
break;
case WECHAT:
socializeMedia = SocializeMedia.WEIXIN;
break;
case QZONE:
socializeMedia = SocializeMedia.QZONE;
break;
case QQ:
socializeMedia = SocializeMedia.QQ;
break;
case WEIBO:
socializeMedia = SocializeMedia.SINA;
break;
default:
socializeMedia = SocializeMedia.MORESHARE;
break;
}
instance.shareMediaTo(socializeMedia, str3, str4, str2, str);
}
@Override
public IDownloadView getDownloadView(Context context) {
return new ViewDownloadProgress(context);
}
@Override
public void enterGameDetail(Context context, String str) {
AppDetailActivity.b(context, str, "other", "other");
}
@Override
public boolean isSplitSupport() {
return com.excelliance.kxqp.util.d.b.c;
}
@Override
public JSONObject getRequestParams(Context context) {
return f.b(context);
}
@Override
public void skipMainTabPage(Context context, int i, int i2) {
Log.d("MainRouterImpl", " targetTab:" + i + " targetChildTab:" + i2);
if (i == 1) {
Intent intent = new Intent(context, (Class<?>) MainActivity.class);
intent.putExtra("shortcut", "openLaunch");
intent.setFlags(268435456);
context.startActivity(intent);
return;
}
if (i == 3) {
Intent intent2 = new Intent(context, (Class<?>) MainActivity.class);
intent2.putExtra("shortcut", "openVip");
intent2.setFlags(268435456);
context.startActivity(intent2);
return;
}
if (i == 4) {
Intent intent3 = new Intent(context, (Class<?>) MainActivity.class);
intent3.putExtra("shortcut", "openRank");
intent3.putExtra("child", i2);
intent3.setFlags(268435456);
context.startActivity(intent3);
return;
}
if (i == 2) {
Intent intent4 = new Intent(context, (Class<?>) MainActivity.class);
intent4.putExtra("shortcut", "openStore");
intent4.setFlags(268435456);
context.startActivity(intent4);
}
}
@Override
public boolean checkArchCompat(Context context) {
return i.a(context);
}
@Override
public void showArchCompatFixView(Context context) {
context.startActivity(new Intent(context, (Class<?>) ArchCompatActivity.class));
}
@Override
public void onOperateFromFreePwd(Context context, int i) {
switch (i) {
case 2:
bz.a().e(context, 2, context.getPackageName());
return;
case 3:
bz.a().e(context, 3, context.getPackageName());
return;
case 4:
bz.a().e(context, 4, context.getPackageName());
return;
case 5:
bz.a().e(context, 5, context.getPackageName());
return;
case 6:
bz.a().e(context, 6, context.getPackageName());
return;
case 7:
bz.a().e(context, 7, context.getPackageName());
return;
case 8:
bz.a().e(context, 8, context.getPackageName());
return;
default:
return;
}
}
@Override
public void showPayBeforeDialog(Context context, String str, Runnable runnable) {
bo.a(context, str, runnable);
}
@Override
public void jumpToGooglePage(Context context) {
com.excelliance.kxqp.gs.ui.mine.a.c().a(context);
com.excelliance.kxqp.gs.ui.mine.a.c().l();
}
@Override
public void detachView() {
com.excelliance.kxqp.gs.ui.mine.a.c().d();
}
@Override
public void onRequestPermission(int i, String[] strArr, int[] iArr) {
com.excelliance.kxqp.gs.ui.mine.a.c().a(i, strArr, iArr);
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
com.excelliance.kxqp.gs.ui.mine.a.c().a(i, i2, intent);
}
@Override
public void sendBroadcast(Context context, String str) {
context.sendBroadcast(new Intent(str));
}
}