OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046

以下内容为反编译后的 r.java 源代码,内容仅作参考


package com.excelliance.kxqp.gs.launch;

import a.ab;
import a.q;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.excelliance.kxqp.PlatSdk;
import com.excelliance.kxqp.api.ApiManager;
import com.excelliance.kxqp.gs.g.b;
import com.excelliance.kxqp.gs.launch.a.h;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.home.MainFragment;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.au;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.bt;
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.w;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.sdk.StatisticsGS;

public class r implements io.reactivex.d.d<h.b> {
    @Override
    public void accept(h.b bVar) throws Exception {
        Bundle bundle;
        Log.d("StartConsumer", String.format("StartConsumer/accept:thread(%s)", Thread.currentThread().getName()));
        ExcellianceAppInfo e = bVar.e();
        final Activity b2 = bVar.b();
        Context applicationContext = b2.getApplicationContext();
        int h = bVar.h();
        LaunchViewModel d = bVar.d();
        if (au.a().m(e.getAppPackageName())) {
            a(b2);
        }
        as.D(applicationContext);
        StatisticsGS.getInstance().uploadUserAction(b2, 16, e.getAppPackageName());
        bz.a().g(b2, e.getAppPackageName());
        au a2 = au.a();
        if (!cd.a(e.getAppPackageName()) && bs.a(e.getAppPackageName()) == -1 && !a2.a(a2.c(e.getAppPackageName()))) {
            bz.a().a(b2, 85000, "启动加速游戏");
            a(b2, e.getAppPackageName());
        }
        if (TextUtils.equals("com.android.vending", e.getAppPackageName())) {
            by a3 = by.a(b2, "sp_google_pre_start");
            if (a3.a("gp_first_start_time", (Long) 0L) == 0) {
                a3.a("gp_first_start_time", System.currentTimeMillis());
            }
        }
        if (bs.t(e.getAppPackageName())) {
            Bundle a4 = PlatSdk.getInstance().a(h, applicationContext);
            a4.putString("intentUrl", e.intentUrl);
            if (TextUtils.equals(e.getAppPackageName(), "com.exce.wv") && !TextUtils.isEmpty(bVar.j())) {
                a4.putString("commonUrl", bVar.j());
                az.d("StartConsumer", "onCreate extras: commonUrl: " + bVar.j());
            }
            Log.d("StartConsumer", "onCreate extras:startGame: " + a4);
            bundle = a4;
        } else {
            bundle = null;
        }
        by a5 = by.a(b2, "last_app_and_count");
        if (com.excelliance.kxqp.gs.util.b.V(b2)) {
            a5.a("lastLaunch", e.getAppPackageName());
            d.a(System.currentTimeMillis());
            if (a5.b(e.getAppPackageName() + ".give_tips", true).booleanValue()) {
                a5.a(e.getAppPackageName() + ".give_tips", true);
            }
            if (com.excelliance.kxqp.gs.util.b.cm(b2)) {
                by.a(b2, "sp_key_game_missions_notify_relevant").a(e.getAppPackageName() + "sp_key_return_from_app", true);
            }
        }
        by.a(b2, "sp_app_launch_time").a(e.getAppPackageName(), System.currentTimeMillis());
        PlatSdk.getInstance().a(b2, e.getPath(), e.getAppPackageName(), e.getUid(), bundle);
        com.excelliance.kxqp.gs.g.c.a().a(b2, (String) null, 2, e);
        com.excelliance.kxqp.gs.g.c.a().a(b2, (String) null, 3, e);
        tp.i(new Runnable() {
            @Override
            public void run() {
                com.excelliance.kxqp.gs.g.b.a(b2).update(b2, new b.c(3, true));
            }
        });
        com.excelliance.kxqp.gs.ui.medal.a.p.b(b2);
        a(e.getAppPackageName(), applicationContext);
        if (!TextUtils.equals(e.getAppPackageName(), "com.hotplaygames.gt")) {
            a5.a("sp_key_last_Launched_game_pkg_not_special", e.getAppPackageName());
        }
        if (!a5.b("sp_key_has_Launched_game", false).booleanValue()) {
            a5.a("sp_key_has_Launched_game", true);
            b(applicationContext);
            if (com.excean.ab_builder.c.a.V(b2)) {
                a5.a("FIRST_START_APP_TIME", Long.valueOf(System.currentTimeMillis() + 604800000).longValue());
            }
        }
        int c = by.a(b2, "last_app_and_count").c("sp_key_start_game_time", 0);
        if (c < 4) {
            int i = c + 1;
            by.a(b2, "last_app_and_count").a("sp_key_start_game_time", i);
            if (i == 1) {
                com.excelliance.kxqp.bitmap.ui.b.a().a(new MainFragment.b());
            }
        }
        if (com.excean.ab_builder.c.a.L(b2)) {
            com.excelliance.kxqp.repository.b.a(b2).a(e.getAppName());
        }
        if (by.a(b2, "sp_total_info").c("UP_LOAD_VIP_DATA", 0) == 0) {
            Intent intent = new Intent();
            intent.setAction("com.excelliance.refresh.vip_upload_friend");
            b2.sendBroadcast(intent);
        }
    }

    public void a(String str, Context context) {
        boolean booleanValue = by.a(context, "sp_share_info").b(str, false).booleanValue();
        if (TextUtils.isEmpty(str) || context == null || booleanValue) {
            return;
        }
        Intent intent = new Intent();
        intent.setAction(context.getPackageName() + ".pre.get.share.info");
        intent.putExtra("shareLibName", str);
        intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.service.CustomIntentService"));
        try {
            context.startService(intent);
        } catch (Exception unused) {
        }
    }

    public static void a(Context context) {
        as.b(context, false);
        if (by.a(context, "sp_total_info").b("sp_disconnectioin", false).booleanValue()) {
            return;
        }
        bt.a(context, false, true, false, (String) null, (String) null);
        by.a(context, "sp_total_info").a("sp_disconnectioin", true);
        com.excelliance.kxqp.n.a().a(com.excelliance.kxqp.gs.k.c.f6576a, com.excelliance.kxqp.gs.k.c.class).postValue(new com.excelliance.kxqp.gs.k.c().a(w.e(context, "noconnection")).a(context, -2).a(true));
    }

    private void a(Context context, String str) {
        String b2 = by.a(context, "last_app_bind_proxy").b(str, "");
        if (TextUtils.isEmpty(b2) || b2.split(":").length != 2) {
            return;
        }
        az.d("StartConsumer", "bind app and proxy: " + str + " " + b2);
        com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(context);
        cVar.a(ApiManager.getInstance().a(context, 15000L, 15000L, "https://gapi.ourplay.com.cn/").a((ab) new q.a().a("apkpkg", str).a("ip", b2).a()));
        az.d("StartConsumer", "statistics/accelerateip Success responseData:" + cVar.b());
    }

    private void b(Context context) {
        if (com.excelliance.kxqp.gs.util.b.cd(context)) {
            LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent("action.refresh.tab"));
        }
    }
}