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

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


package com.excelliance.kxqp.gs.ui.gameaccount;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.excean.bytedancebi.bean.BiEventClick;
import com.excean.bytedancebi.bean.BiEventDialogShow;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.gs.adapter.GameAccountHorizontalAdapter;
import com.excelliance.kxqp.gs.appstore.common.ViewHolder;
import com.excelliance.kxqp.gs.base.BaseMultiRecyclerAdapter;
import com.excelliance.kxqp.gs.bean.GameAccountBean;
import com.excelliance.kxqp.gs.bean.IconBean;
import com.excelliance.kxqp.gs.ui.gaccount.ChangeAccountActivity;
import com.excelliance.kxqp.gs.ui.gaccount.GAccountActivity;
import com.excelliance.kxqp.gs.ui.googlecard.CardActivity;
import com.excelliance.kxqp.gs.ui.launch.GoogleActionViewWrapper;
import com.excelliance.kxqp.gs.ui.launch.b;
import com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cc;
import com.excelliance.kxqp.gs.util.w;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpStatus;

public class GameAccountAdapterV2 extends BaseMultiRecyclerAdapter<b> implements View.OnClickListener {

    private com.excelliance.kxqp.gs.base.f f9421a;
    private List<IconBean> c;
    private final GoogleActionViewWrapper.b m;

    public GameAccountAdapterV2(Context context, List<b> list) {
        super(context, list, new a());
        this.m = new GoogleActionViewWrapper.b<IconBean>() {
            @Override
            public void a(View view, IconBean iconBean, int i, b.a aVar) {
                GameAccountAdapterV2.this.a(iconBean, i, aVar);
            }
        };
        this.c = new ArrayList();
        a();
    }

    @Override
    public void onClick(View view) {
        try {
            switch (((Integer) view.getTag()).intValue()) {
                case 0:
                    Intent intent = new Intent(this.f, (Class<?>) GAccountActivity.class);
                    intent.putExtra("src", 101);
                    this.f.startActivity(intent);
                    break;
                case 1:
                    a(104, "已登录google账号点击");
                    this.f.startActivity(new Intent(this.f, (Class<?>) ChangeAccountActivity.class));
                    break;
                case 2:
                    CommonWebViewActivity.startActivity(this.f, "https://account.riotgames.com", 1);
                    break;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void a() {
        IconBean a2;
        this.c = new ArrayList();
        boolean[] a3 = cc.a(this.f);
        for (int i = 0; i < a3.length; i++) {
            if (a3[i]) {
                String a4 = cc.a(i);
                if (!TextUtils.isEmpty(a4) && (a2 = cc.a(this.f, a4)) != null) {
                    this.c.add(a2);
                }
            }
        }
    }

    @Override
    protected void b(ViewHolder viewHolder, int i) {
        b c = c(i);
        Log.d(this.e, "bindView: " + c);
        viewHolder.a();
        List<GameAccountBean> list = c.f9449a;
        TextView textView = (TextView) viewHolder.a(R.id.purchase_account_tv);
        TextView textView2 = (TextView) viewHolder.a(R.id.rules_about_account_tv);
        TextView textView3 = (TextView) viewHolder.a(R.id.account_setting_tv);
        RecyclerView recyclerView = (RecyclerView) viewHolder.a(R.id.recycler_view);
        recyclerView.setLayoutManager(new LinearLayoutManager(this.f, 0, false));
        if (c.f9450b == 0 || c.f9450b == 3) {
            textView.setText(R.string.purchased_google_account);
            textView2.setVisibility(0);
            textView2.setTag(0);
            textView2.setOnClickListener(this);
            textView3.setText(this.f.getString(R.string.edit_profile) + ">");
            textView3.setTag(1);
        } else if (c.f9450b == 1 || c.f9450b == 2) {
            textView.setText(R.string.purchased_riot_account);
            textView2.setVisibility(8);
            textView3.setText(this.f.getString(R.string.edit_profile) + ">");
            textView3.setTag(2);
        }
        recyclerView.setAdapter(new GameAccountHorizontalAdapter(this.f, list));
        textView3.setOnClickListener(this);
    }

    public static class a implements com.excelliance.kxqp.gs.i.c<b> {
        @Override
        public int a(int i) {
            return i;
        }

        @Override
        public int a(b bVar, int i) {
            return R.layout.account_list_layout;
        }
    }

    private void a(int i, String str) {
        bz.a().a(this.f, 124000, i, str);
    }

    public void a(IconBean iconBean, int i, b.a aVar) {
        char c;
        String str = iconBean.keyName;
        switch (str.hashCode()) {
            case -2028209355:
                if (str.equals("ADD_GP_ACCOUNT")) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case -744894584:
                if (str.equals("MODIFY_ACCOUNT")) {
                    c = 4;
                    break;
                }
                c = 65535;
                break;
            case -410026147:
                if (str.equals("APPEAL_ACCOUNT")) {
                    c = 5;
                    break;
                }
                c = 65535;
                break;
            case -286204270:
                if (str.equals("GOOGLE_PAY_WAY")) {
                    c = 6;
                    break;
                }
                c = 65535;
                break;
            case 1070533307:
                if (str.equals("NEWBIE_GUIDE")) {
                    c = '\t';
                    break;
                }
                c = 65535;
                break;
            case 1095075953:
                if (str.equals("REGISTER_ACCOUNT")) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            case 1794831641:
                if (str.equals("MY_ACCOUNTS")) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case 1847285078:
                if (str.equals("GOOGLE_CARD")) {
                    c = 7;
                    break;
                }
                c = 65535;
                break;
            case 1938362455:
                if (str.equals("HIDE_FUNCTION_AREA")) {
                    c = '\b';
                    break;
                }
                c = 65535;
                break;
            case 2085746996:
                if (str.equals("BUY_ACCOUNT")) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        switch (c) {
            case 0:
                a(202, "登录google账号");
                if (this.f instanceof Activity) {
                    a((Activity) this.f, iconBean.keyName, aVar);
                    return;
                }
                return;
            case 1:
                a(HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION, "购买google账号");
                if (com.excelliance.kxqp.gs.util.b.cu(this.f)) {
                    BuyGameAccountActivity.a(this.f);
                    return;
                } else {
                    com.excelliance.kxqp.gs.ui.googlecard.d.a(this.f, GAccountActivity.class, 102);
                    return;
                }
            case 2:
                a(210, "已购买的google账号");
                if (this.f9421a == null || !this.f9421a.isShowing()) {
                    return;
                }
                this.f9421a.dismiss();
                return;
            case 3:
                a(HttpStatus.SC_NO_CONTENT, "注册google账号");
                this.f.sendBroadcast(new Intent(this.f.getPackageName() + ".ACTION.FUNCTION.REGISTER.GOOGLE.ACCOUNT"));
                return;
            case 4:
                a(HttpStatus.SC_RESET_CONTENT, "修改账号资料");
                by.a(this.f, "sp_total_info").a("sp_key_modify_google_account", true);
                this.f.startActivity(new Intent(this.f, (Class<?>) ChangeAccountActivity.class));
                return;
            case 5:
                a(HttpStatus.SC_PARTIAL_CONTENT, "停用账号申诉");
                this.f.sendBroadcast(new Intent(this.f.getPackageName() + ".ACTION.FUNCTION.APPEAL.GOOGLE.ACCOUNT"));
                return;
            case 6:
                a(208, "google付款方式");
                if (this.f instanceof Activity) {
                    a((Activity) this.f, iconBean.keyName, aVar);
                    return;
                }
                return;
            case 7:
                a(HttpStatus.SC_MULTI_STATUS, "google礼品卡");
                com.excelliance.kxqp.gs.ui.googlecard.d.a(this.f, CardActivity.class, 1);
                return;
            case '\b':
                a(209, "隐藏该区域");
                cc.a(this.f, "HIDE_FUNCTION_AREA", false);
                Intent intent = new Intent(this.f.getPackageName() + ".ACTION.REFRESH.FUNCTION.SWITCH");
                intent.putExtra("click_hide_in_main", true);
                this.f.sendBroadcast(intent);
                return;
            case '\t':
                a(201, "新手教程");
                Intent intent2 = new Intent(this.f, (Class<?>) CommonWebViewActivity.class);
                intent2.putExtra("src", 5);
                intent2.putExtra("title", w.e(this.f, "novice_guide_oversea_game_show_guide"));
                this.f.startActivity(intent2);
                return;
            default:
                return;
        }
    }

    private void a(Activity activity, final String str, b.a aVar) {
        final boolean booleanValue = by.a(this.f.getApplicationContext(), "sp_total_info").b("sp_key_bought_google_account", false).booleanValue();
        boolean booleanValue2 = by.a(this.f.getApplicationContext(), "sp_total_info").b("sp_key_modify_google_account_is_show", false).booleanValue();
        boolean booleanValue3 = by.a(this.f.getApplicationContext(), "sp_total_info").b("sp_key_bought_google_account_down", false).booleanValue();
        final int[] iArr = new int[1];
        if (!booleanValue2 && (booleanValue || booleanValue3)) {
            if (this.f9421a == null) {
                this.f9421a = new com.excelliance.kxqp.gs.base.f(activity) {
                    @Override
                    public String b() {
                        return "dialog_common_new_style";
                    }

                    @Override
                    protected void a(View view) {
                        boolean booleanValue4 = by.a(this.c.getApplicationContext(), "sp_total_info").b("sp_key_modify_google_account", false).booleanValue();
                        TextView textView = (TextView) view.findViewById(R.id.tv_content);
                        TextView textView2 = (TextView) view.findViewById(R.id.tv_left);
                        TextView textView3 = (TextView) view.findViewById(R.id.tv_right);
                        if (!booleanValue4 && booleanValue) {
                            textView2.setVisibility(8);
                            textView3.setText(this.c.getString(R.string.modify_immediately));
                            textView.setText(Html.fromHtml(String.format(this.c.getString(R.string.modify_google_account_notice_3), "<font color='#0F9D58'>" + this.c.getString(R.string.modify_google_account_notice_2) + "</font>")));
                        } else {
                            textView.setText(Html.fromHtml(String.format(this.c.getString(R.string.modify_google_account_notice_1), "<font color='#0F9D58'>" + this.c.getString(R.string.modify_google_account_notice_2) + "</font>")));
                            textView2.setText(this.c.getString(R.string.modify_complete));
                            if (Build.VERSION.SDK_INT >= 16) {
                                textView2.setBackground(this.c.getResources().getDrawable(R.drawable.btn_modify_gacc_now));
                            } else {
                                textView2.setBackgroundDrawable(this.c.getResources().getDrawable(R.drawable.btn_modify_gacc_now));
                            }
                            textView2.setTextColor(this.c.getResources().getColor(R.color.app_text_color_white));
                            textView3.setText(this.c.getString(R.string.to_modify));
                            textView2.setOnClickListener(new View.OnClickListener() {
                                @Override
                                public void onClick(View view2) {
                                    dismiss();
                                    if (TextUtils.equals(str, "ADD_GP_ACCOUNT")) {
                                        AnonymousClass2.this.c.sendBroadcast(new Intent(AnonymousClass2.this.c.getPackageName() + ".ACTION_FUNCTION_ADD_GOOGLE_ACCOUNT"));
                                    } else if (TextUtils.equals(str, "GOOGLE_PAY_WAY")) {
                                        com.excelliance.kxqp.gs.ui.mine.a.c().b(AnonymousClass2.this.c);
                                    }
                                    BiEventClick biEventClick = new BiEventClick();
                                    biEventClick.current_page = "启动页";
                                    biEventClick.button_name = "我已修改";
                                    biEventClick.dialog_name = "提示修改谷歌账号初始密码弹窗";
                                    com.excelliance.kxqp.gs.g.c.a().a(biEventClick);
                                }
                            });
                            iArr[0] = 1;
                        }
                        textView3.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view2) {
                                dismiss();
                                BiEventClick biEventClick = new BiEventClick();
                                biEventClick.current_page = "启动页";
                                biEventClick.button_name = "前往修改";
                                biEventClick.dialog_name = "提示修改谷歌账号初始密码弹窗";
                                com.excelliance.kxqp.gs.g.c.a().a(biEventClick);
                                AnonymousClass2.this.c.startActivity(new Intent(AnonymousClass2.this.c, (Class<?>) ChangeAccountActivity.class));
                            }
                        });
                        ((ImageView) view.findViewById(R.id.iv_dismiss)).setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view2) {
                                dismiss();
                            }
                        });
                    }
                };
            }
            this.f9421a.setOnShowListener(new DialogInterface.OnShowListener() {
                @Override
                public void onShow(DialogInterface dialogInterface) {
                    by.a(GameAccountAdapterV2.this.f.getApplicationContext(), "sp_total_info").a("sp_key_modify_google_account_is_show", true);
                }
            });
            if (activity == null || activity.isFinishing() || this.f9421a.isShowing() || this.f9421a.f()) {
                return;
            }
            this.f9421a.show();
            if (iArr[0] == 1) {
                BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
                biEventDialogShow.current_page = "启动页";
                biEventDialogShow.dialog_name = "提示修改谷歌账号初始密码弹窗";
                com.excelliance.kxqp.gs.g.c.a().a(biEventDialogShow);
                return;
            }
            return;
        }
        if (TextUtils.equals(str, "ADD_GP_ACCOUNT")) {
            this.f.sendBroadcast(new Intent(this.f.getPackageName() + ".ACTION_FUNCTION_ADD_GOOGLE_ACCOUNT"));
            return;
        }
        if (TextUtils.equals(str, "GOOGLE_PAY_WAY")) {
            com.excelliance.kxqp.gs.ui.mine.a.c().b(this.f);
        }
    }
}