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

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


package com.excelliance.kxqp.gs.ui.mine.v2;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.alipay.sdk.util.i;
import com.android.spush.MessagesHelper;
import com.android.spush.ui.NotificationCenterActivity;
import com.bytedance.sdk.open.aweme.common.constants.ParamKeyConstants;
import com.excean.bytedancebi.bean.BiEventClick;
import com.excean.bytedancebi.bean.BiEventContent;
import com.excean.bytedancebi.bean.BiEventDialogShow;
import com.excean.bytedancebi.bean.BiEventPageOpen;
import com.excean.bytedancebi.bean.BiSendContentEvent;
import com.excean.bytedancebi.viewtracker.ExConstraintLayout;
import com.excean.bytedancebi.viewtracker.ViewTrackerUtil;
import com.excean.ggspace.main.R;
import com.excean.view.dialog.ContainerDialog;
import com.excelliance.kxqp.bean.WXconfig;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.bitmap.bean.ResponseData;
import com.excelliance.kxqp.community.helper.c;
import com.excelliance.kxqp.community.helper.d;
import com.excelliance.kxqp.community.helper.h;
import com.excelliance.kxqp.community.helper.l;
import com.excelliance.kxqp.community.helper.u;
import com.excelliance.kxqp.community.helper.v;
import com.excelliance.kxqp.community.model.entity.AuthorInfo;
import com.excelliance.kxqp.community.ui.CommentHotActivity;
import com.excelliance.kxqp.community.ui.TitleWallActivity;
import com.excelliance.kxqp.community.widgets.AuthorInspireEntranceView;
import com.excelliance.kxqp.community.widgets.UserExpendInfoView;
import com.excelliance.kxqp.gs.bean.CircleUserInfoBean;
import com.excelliance.kxqp.gs.discover.circle.UserCircleCenterActivity;
import com.excelliance.kxqp.gs.g.s;
import com.excelliance.kxqp.gs.g.t;
import com.excelliance.kxqp.gs.record.RecordManagerActivity;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.CommonActivity;
import com.excelliance.kxqp.gs.ui.MyVoucher.MyVoucherActivity;
import com.excelliance.kxqp.gs.ui.feedback.questions.ActivityFeedbackQuestions;
import com.excelliance.kxqp.gs.ui.gameaccount.GameAccountActivity;
import com.excelliance.kxqp.gs.ui.home.GoogleServiceViewModel;
import com.excelliance.kxqp.gs.ui.medal.GameCurrencyMallActivity;
import com.excelliance.kxqp.gs.ui.medal.MedalWallActivity;
import com.excelliance.kxqp.gs.ui.medal.a.g;
import com.excelliance.kxqp.gs.ui.medal.a.r;
import com.excelliance.kxqp.gs.ui.membershipvouchers.MembershipVouchersActivity;
import com.excelliance.kxqp.gs.ui.mine.a;
import com.excelliance.kxqp.gs.ui.mine.b;
import com.excelliance.kxqp.gs.ui.opinion.OpinionActivity;
import com.excelliance.kxqp.gs.ui.pay.VipFragment;
import com.excelliance.kxqp.gs.ui.question.WebNoVideoActivity;
import com.excelliance.kxqp.gs.ui.setting.SettingActivity;
import com.excelliance.kxqp.gs.ui.update.UpdateAppActivity;
import com.excelliance.kxqp.gs.user.UserInfoEditActivity;
import com.excelliance.kxqp.gs.util.ViewSwitcher;
import com.excelliance.kxqp.gs.util.aa;
import com.excelliance.kxqp.gs.util.ad;
import com.excelliance.kxqp.gs.util.aq;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.aw;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.bx;
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.cg;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.gs.util.w;
import com.excelliance.kxqp.guide.bubble.c;
import com.excelliance.kxqp.repository.ViewRepository;
import com.excelliance.kxqp.sdk.StatisticsGS;
import com.excelliance.kxqp.task.store.common.LazyLoadFragment;
import com.excelliance.kxqp.ui.comment.mine.MyCommentActivity;
import com.excelliance.kxqp.util.af;
import com.excelliance.kxqp.util.ai;
import com.excelliance.user.account.f.e;
import com.excelliance.user.account.f.f;
import com.google.android.material.imageview.ShapeableImageView;
import io.github.prototypez.service.account.request.LoginRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import org.json.JSONArray;

public class MineFragment extends LazyLoadFragment implements View.OnClickListener, a.InterfaceC0422a, b.a {
    private View A;
    private View B;
    private TextView C;
    private TextView D;
    private View E;
    private AuthorInspireEntranceView F;
    private c G;
    private Context H;
    private a J;
    private com.excelliance.user.account.controls.a K;
    private UserExpendInfoView L;
    private View N;
    private ExConstraintLayout O;

    private GoogleServiceViewModel f10615a;

    private View f10616b;
    private View c;
    private View d;
    private ShapeableImageView e;
    private ImageView f;
    private View g;
    private TextView h;
    private View i;
    private View j;
    private View k;
    private View l;
    private View m;
    private View n;
    private View o;
    private TextView p;
    private View q;
    private TextView r;
    private View s;
    private RelativeLayout t;
    private View u;
    private TextView v;
    private ImageView w;
    private TextView x;
    private ImageView y;
    private View z;
    private boolean I = false;
    private Handler M = new Handler() {
        @Override
        public void handleMessage(Message message) {
            if (message.what != 1) {
                return;
            }
            aw.a(MineFragment.this.H, "MineFragment");
            List<com.excelliance.kxqp.gs.ui.account.c> f = as.f();
            int size = f != null ? f.size() : 0;
            StringBuilder sb = new StringBuilder();
            boolean z = true;
            for (int i = 0; i < size; i++) {
                com.excelliance.kxqp.gs.ui.account.c cVar = f.get(i);
                if (cVar.f8499b != null && !TextUtils.isEmpty(cVar.f8499b.name)) {
                    if (z) {
                        z = false;
                    } else {
                        sb.append(i.f491b);
                    }
                    sb.append(cVar.f8499b.name);
                }
            }
            if (sb.length() > 0) {
                cg.a(MineFragment.this.H, w.e(MineFragment.this.H, "msg_login_google_account"));
                bz.a().b(MineFragment.this.H, sb.toString());
            }
        }
    };
    private ViewSwitcher.b P = new ViewSwitcher.b() {
        @Override
        public void a() {
            MineFragment.this.j();
        }
    };
    private BroadcastReceiver Q = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (!cd.a(action)) {
                if (TextUtils.equals(intent.getAction(), MineFragment.this.H.getPackageName() + ".user_diff_line")) {
                    MineFragment.this.m();
                    return;
                }
            }
            if ("action.store.cost.diamond".equals(action)) {
                MineFragment.this.m();
            }
        }
    };
    private BroadcastReceiver R = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if ("updata_user_info".equals(action)) {
                MineFragment.this.a(intent.getStringExtra("user_name"), intent.getStringExtra("user_signature"), intent.getStringExtra("user_image"), intent.getIntExtra("vip", -1));
                return;
            }
            if ((MineFragment.this.H.getPackageName() + ".user_login_out").equals(intent.getAction())) {
                if (MineFragment.this.e != null) {
                    MineFragment.this.e.setImageResource(com.excelliance.kxqp.gs.ui.medal.a.c.d());
                }
                if (MineFragment.this.w != null) {
                    MineFragment.this.w.setVisibility(8);
                }
                if (MineFragment.this.x != null) {
                    MineFragment.this.x.setVisibility(8);
                    return;
                }
                return;
            }
            if (TextUtils.equals(action, context.getPackageName() + "refresh_updatedata")) {
                MineFragment.this.n();
                return;
            }
            if ("action_update_head_name_stu".equals(action)) {
                intent.getIntExtra("head_stu", 2);
                intent.getIntExtra("name_stu", 2);
                if (MineFragment.this.J != null) {
                    MineFragment.this.J.b();
                    return;
                }
                return;
            }
            if ("action_update_game_life_entrance_visibiilty".equals(action)) {
                MineFragment.this.a(intent.getBooleanExtra("show_game_life", false) || by.a(context, "sp_config").b("sp_key_has_showed_my_game_life", false).booleanValue());
                return;
            }
            if (TextUtils.equals(action, MineFragment.this.H.getPackageName() + ".user_login_in")) {
                MineFragment.this.m();
                MineFragment.this.J.d();
                return;
            }
            if (TextUtils.equals(action, MineFragment.this.H.getPackageName() + ".close.loading.dialog")) {
                MineFragment.this.b();
                return;
            }
            if (TextUtils.equals(action, MineFragment.this.H.getPackageName() + "action.refresh.real.name.verify")) {
                MineFragment.this.m();
            } else if (TextUtils.equals(action, "com.excelliance.after.diff.login")) {
                e.a("getVip", "MineFragment: AFTER_DIFF_LOGIN initOurPlayAccount");
                MineFragment.this.m();
            }
        }
    };

    @Override
    public void a(String str) {
        if (this.K == null) {
            this.K = new com.excelliance.user.account.controls.a(this.H);
        }
        if (this.K.isShowing() || getActivity().isFinishing()) {
            return;
        }
        this.K.a(str);
    }

    @Override
    public void b() {
        if (this.K == null || !this.K.isShowing() || getActivity().isFinishing()) {
            return;
        }
        this.K.dismiss();
    }

    protected void c() {
        View view = this.s;
        this.e = (ShapeableImageView) view.findViewById(R.id.iv_head);
        this.e.setImageResource(com.excelliance.kxqp.gs.ui.medal.a.c.d());
        this.f = (ImageView) view.findViewById(R.id.iv_avatar_frame);
        this.g = view.findViewById(R.id.iv_game_red_point);
        this.w = (ImageView) view.findViewById(R.id.iv_head_stu);
        this.h = (TextView) view.findViewById(R.id.tv_username);
        this.x = (TextView) view.findViewById(R.id.tv_username_stu);
        this.n = view.findViewById(R.id.iv_has_notification);
        this.p = (TextView) view.findViewById(R.id.tv_vip_time);
        this.q = view.findViewById(R.id.v_new_version);
        this.i = view.findViewById(R.id.rl_user);
        if (com.excean.ab_builder.c.a.am(this.H)) {
            this.i.setTag(15);
        } else {
            this.i.setTag(7);
        }
        this.d = view.findViewById(R.id.rl_msg);
        this.d.setTag(6);
        this.j = view.findViewById(R.id.btn_update_manager);
        this.j.setTag(1);
        this.k = view.findViewById(R.id.btn_setting);
        this.k.setTag(3);
        this.l = view.findViewById(R.id.btn_experience_promotion);
        this.l.setTag(9);
        this.m = view.findViewById(R.id.btn_official_group);
        this.m.setTag(5);
        this.N = view.findViewById(R.id.rl_record_manager);
        this.N.setTag(8);
        this.y = (ImageView) view.findViewById(R.id.iv_limit_price);
        this.A = view.findViewById(R.id.opinion_reback);
        this.A.setTag(19);
        if (bs.p(this.H)) {
            this.A.setVisibility(8);
        } else {
            this.A.setVisibility(0);
        }
        this.t = (RelativeLayout) view.findViewById(R.id.vip_exposure);
        this.t.setTag(12);
        this.c = view.findViewById(R.id.membership_vouchers_layout);
        this.c.setTag(14);
        this.c.setOnClickListener(this);
        this.f10616b = view.findViewById(R.id.my_vouchers_layout);
        this.f10616b.setTag(18);
        this.f10616b.setOnClickListener(this);
        this.u = view.findViewById(R.id.game_accounts_layout);
        s();
        this.z = view.findViewById(R.id.fl_forever_poxy_card);
        if (com.excean.ab_builder.c.a.f(this.H) || com.excean.ab_builder.c.a.m(this.H) || com.excean.ab_builder.c.a.O(this.H)) {
            com.excelliance.kxqp.gs.g.c.a().a(this.z, true, this.exposure, this.mViewTrackerRxBus, this.mCompositeDisposable, 0, this.mPageDes.firstPage, "无限卡标识");
            if ((t.a().i(this.H) || s.b().m(this.H)) && this.z != null) {
                this.z.setVisibility(0);
            }
            if (com.excean.ab_builder.c.a.m(this.H) && !as.aa(this.H) && this.z != null) {
                this.z.setVisibility(0);
            }
        }
        this.i.setOnClickListener(this);
        this.d.setOnClickListener(this);
        this.j.setOnClickListener(this);
        this.k.setOnClickListener(this);
        this.l.setOnClickListener(this);
        this.m.setOnClickListener(this);
        this.N.setOnClickListener(this);
        this.N.setVisibility(com.excelliance.kxqp.gs.util.b.bg(this.H) ? 0 : 8);
        this.t.setOnClickListener(this);
        this.u.setOnClickListener(this);
        this.A.setOnClickListener(this);
        j();
        e();
        h();
        d();
        this.v = (TextView) view.findViewById(R.id.real_name_tv);
        this.O = (ExConstraintLayout) view.findViewById(R.id.receive_entrance);
        BiEventContent biEventContent = new BiEventContent();
        biEventContent.current_page = "我的页面";
        biEventContent.content_type = "小程序";
        biEventContent.expose_banner_area = "我的页面菜单栏";
        biEventContent.expose_banner_order = "1";
        biEventContent.mini_program_page = "小程序加企微二维码页面";
        ViewTrackerUtil.getInstance().bindData(this.O, biEventContent, true, this.exposure, this.mViewTrackerRxBus, this.mCompositeDisposable, 0, true);
        this.B = view.findViewById(R.id.game_currency_mall);
        t();
        this.D = (TextView) view.findViewById(R.id.tv_titles);
        v.a(this.H).b().observe(getViewLifecycleOwner(), new Observer<Integer>() {
            @Override
            public void onChanged(Integer num) {
                if (num == null) {
                    MineFragment.this.D.setVisibility(8);
                } else {
                    MineFragment.this.D.setText(String.format(MineFragment.this.H.getString(R.string.titles_count), num));
                    MineFragment.this.D.setVisibility(0);
                }
            }
        });
        this.D.setTag(23);
        this.D.setOnClickListener(this);
        this.C = (TextView) view.findViewById(R.id.tv_medal);
        u();
        g.a(this.H).a().observe(getViewLifecycleOwner(), new Observer<g.a>() {
            @Override
            public void onChanged(g.a aVar) {
                MineFragment.this.t();
            }
        });
        this.E = view.findViewById(R.id.v_game_comment_ranking);
        this.E.setTag(22);
        this.E.setOnClickListener(this);
        this.E.setVisibility(d.a());
        this.F = (AuthorInspireEntranceView) view.findViewById(R.id.v_author_inspire_entrance);
        this.F.setClickCallback(new AuthorInspireEntranceView.a() {
            @Override
            public void a(AuthorInfo authorInfo) {
                l.a(MineFragment.this.H);
                h.a(MineFragment.this.G);
                c.b.f(MineFragment.this, (String) null);
            }
        });
        view.findViewById(R.id.v_author_inspire).setVisibility(d.a());
        this.L = (UserExpendInfoView) view.findViewById(R.id.v_user_expend_info);
    }

    public void d() {
        boolean booleanValue = by.a(this.H, "sp_total_info").b("sp_key_limit_show_price_or_not", false).booleanValue();
        if (com.excean.ab_builder.c.a.ai(this.H)) {
            if (!booleanValue) {
                this.y.setVisibility(8);
                return;
            } else {
                this.y.setVisibility(0);
                this.y.setBackgroundResource(R.drawable.limit_time_normal);
                return;
            }
        }
        if (!com.excean.ab_builder.c.a.aj(this.H)) {
            this.y.setVisibility(8);
        } else if (!booleanValue) {
            this.y.setVisibility(8);
        } else {
            this.y.setVisibility(0);
            this.y.setBackgroundResource(R.drawable.new_user_price);
        }
    }

    public void e() {
        long a2 = by.a(this.H, "last_app_and_count").a("START_APP_SEVEN_DAY", (Long) 0L);
        long currentTimeMillis = System.currentTimeMillis();
        boolean h = ViewSwitcher.a(this.H).h();
        this.o = this.s.findViewById(R.id.gsms_state_layout);
        if ((com.excean.ab_builder.c.a.p(this.H) || com.excean.ab_builder.c.a.V(this.H)) && h && a2 > 0 && currentTimeMillis > a2 && !bs.p(this.H)) {
            this.r = (TextView) this.s.findViewById(R.id.tv_gms_state_text);
            this.o.setTag(17);
            this.o.setVisibility(0);
            this.o.setOnClickListener(this);
            if (as.d(this.H, true)) {
                this.r.setTextColor(this.H.getResources().getColor(R.color.gms_download));
                this.r.setText(this.H.getString(R.string.plugin_download_installing));
                return;
            } else {
                this.r.setTextColor(this.H.getResources().getColor(R.color.group_app_title));
                this.r.setText(this.H.getString(R.string.google_suite_instiled));
                return;
            }
        }
        this.o.setVisibility(8);
    }

    public void j() {
        if (bs.c() && bs.p(this.H)) {
            this.m.setVisibility(8);
        } else {
            this.m.setVisibility(0);
        }
        if (bs.p(this.H)) {
            this.j.setVisibility(8);
        } else {
            this.j.setVisibility(0);
        }
        int i = ViewSwitcher.a(this.H).a() ? 0 : 8;
        this.N.setVisibility(i);
        this.d.setVisibility(i);
        this.c.setVisibility(i);
        this.f10616b.setVisibility(i);
    }

    private void registerReceiver() {
        com.excelliance.kxqp.gs.ui.mine.a.c().registerReceiver(getActivity());
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(this.H.getPackageName() + ".user_diff_line");
        intentFilter.addAction("action.store.cost.diamond");
        intentFilter.addAction("updata_user_info");
        LocalBroadcastManager.getInstance(this.H).registerReceiver(this.Q, intentFilter);
        IntentFilter intentFilter2 = new IntentFilter();
        intentFilter2.addAction("updata_user_info");
        if (com.excean.ab_builder.c.a.K(this.H)) {
            intentFilter2.addAction(this.H.getPackageName() + ".close.loading.dialog");
        }
        intentFilter2.addAction(this.H.getPackageName() + ".user_login_out");
        intentFilter2.addAction(this.H.getPackageName() + "refresh_updatedata");
        intentFilter2.addAction("action_update_head_name_stu");
        intentFilter2.addAction(this.H.getPackageName() + ".user_login_in");
        intentFilter2.addAction("action_update_game_life_entrance_visibiilty");
        intentFilter2.addAction(this.H.getPackageName() + "action.refresh.real.name.verify");
        intentFilter2.addAction("com.excelliance.after.diff.login");
        getActivity().registerReceiver(this.R, intentFilter2);
    }

    private void k() {
        if (com.excean.ab_builder.c.a.f(this.H) || com.excean.ab_builder.c.a.m(this.H) || com.excean.ab_builder.c.a.O(this.H)) {
            this.mCompositeDisposable.a(com.excelliance.kxqp.bitmap.ui.b.a().a(t.a.class).b(io.reactivex.a.b.a.a()).a(new io.reactivex.d.d<t.a>() {
                @Override
                public void accept(t.a aVar) throws Exception {
                    if (aVar.f6250a) {
                        if ((com.excean.ab_builder.c.a.f(MineFragment.this.H) || com.excean.ab_builder.c.a.m(MineFragment.this.H) || com.excean.ab_builder.c.a.O(MineFragment.this.H)) && MineFragment.this.z != null) {
                            MineFragment.this.z.setVisibility(0);
                        }
                    }
                }
            }, new io.reactivex.d.d<Throwable>() {
                @Override
                public void accept(Throwable th) throws Exception {
                    Log.e("MineFragment", "startAppGetFreePoxyComplete/accept:" + th.toString());
                }
            }));
        }
        if (com.excean.ab_builder.c.a.m(this.H)) {
            this.mCompositeDisposable.a(com.excelliance.kxqp.bitmap.ui.b.a().a(t.e.class).b(io.reactivex.a.b.a.a()).a(new io.reactivex.d.d<t.e>() {
                @Override
                public void accept(t.e eVar) throws Exception {
                    if (as.aa(MineFragment.this.H) || MineFragment.this.z == null) {
                        return;
                    }
                    MineFragment.this.z.setVisibility(0);
                }
            }, new io.reactivex.d.d<Throwable>() {
                @Override
                public void accept(Throwable th) throws Exception {
                    Log.e("MineFragment", "startAppGetFreePoxyPayState/accept:" + th.toString());
                }
            }));
        }
        if (com.excean.ab_builder.c.a.ai(this.H) || com.excean.ab_builder.c.a.aj(this.H)) {
            this.mCompositeDisposable.a(com.excelliance.kxqp.bitmap.ui.b.a().a(VipFragment.b.class).b((io.reactivex.d.d) new io.reactivex.d.d<VipFragment.b>() {
                @Override
                public void accept(VipFragment.b bVar) throws Exception {
                    MineFragment.this.d();
                }
            }));
        }
    }

    @Override
    public void onViewCreated(View view, Bundle bundle) {
        super.onViewCreated(view, bundle);
        registerReceiver();
        ViewSwitcher.a(this.H).a(this.P);
        if (by.a(this.H, "download_sp").b("isNewVersion", false).booleanValue()) {
            this.q.setVisibility(0);
        }
        if (this.J == null) {
            this.J = new a(this.H, this);
        }
        k();
        if (this.J != null) {
            this.J.b();
            if (TextUtils.isEmpty(by.a(this.H, "sp_config").b("sp_key_get_vip_access_dialog_config_info4", ""))) {
                this.J.c();
            }
        }
        if (com.excean.ab_builder.c.a.am(this.H)) {
            com.excelliance.kxqp.gs.ui.medal.a.b.a(this.H).a().observe(getViewLifecycleOwner(), new Observer<String>() {
                @Override
                public void onChanged(String str) {
                    com.excelliance.kxqp.gs.ui.medal.a.b.a(MineFragment.this.f, str, MineFragment.this.e);
                }
            });
        }
        this.G = h.a((FrameLayout) this.s.findViewById(R.id.v_content), this.F);
        u.a(this.H).c().observe(getViewLifecycleOwner(), new Observer<AuthorInfo>() {
            @Override
            public void onChanged(AuthorInfo authorInfo) {
                MineFragment.this.F.setData(authorInfo);
                if (authorInfo == null || !authorInfo.hasSignup) {
                    return;
                }
                MineFragment.this.l();
            }
        });
        u.a(this.H).b().observe(getViewLifecycleOwner(), new Observer<CircleUserInfoBean>() {
            @Override
            public void onChanged(CircleUserInfoBean circleUserInfoBean) {
                MineFragment.this.L.setData(circleUserInfoBean);
            }
        });
        MessagesHelper.getInstance(this.H).getHasUnreadMessageLiveData().observe(getViewLifecycleOwner(), new Observer<Boolean>() {
            @Override
            public void onChanged(Boolean bool) {
                MineFragment.this.b(bool != null && bool.booleanValue());
            }
        });
    }

    @Override
    public void onVisible() {
        super.onVisible();
        int i = 0;
        az.d("MineFragment", String.format("MineFragment/onVisible:thread(%s)", Thread.currentThread().getName()));
        boolean b2 = bx.a().b(this.H);
        if (!this.I && !b2) {
            as.a(this.H, false);
            this.I = true;
        }
        try {
            boolean b3 = com.excelliance.kxqp.gs.util.g.a(this.H).b(this.H);
            if (this.q != null) {
                View view = this.q;
                if (!b3) {
                    i = 8;
                }
                view.setVisibility(i);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        e();
        h();
        m();
        o();
        v();
    }

    @Override
    public void onInvisible() {
        super.onInvisible();
        az.d("MineFragment", String.format("MineFragment/onInvisible:thread(%s)", Thread.currentThread().getName()));
    }

    @Override
    public void disExposure() {
        super.disExposure();
        l();
    }

    public void l() {
        if (this.G != null) {
            h.a(this.G);
            this.G = null;
        }
    }

    public void a(View view) {
        boolean g;
        String l;
        String m;
        boolean z = false;
        switch (Integer.valueOf(view.getTag().toString()).intValue()) {
            case 1:
                StatisticsGS.getInstance().uploadUserAction(this.H, 103);
                startActivity(new Intent(this.H, (Class<?>) UpdateAppActivity.class));
                r();
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "更新管理");
                return;
            case 2:
                StatisticsGS.getInstance().uploadUserAction(this.H, 33);
                Intent intent = new Intent(this.H, (Class<?>) SettingActivity.class);
                intent.putExtra("displayView", true);
                startActivity(intent);
                r();
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "界面显示");
                return;
            case 3:
                StatisticsGS.getInstance().uploadUserAction(this.H, 33);
                Intent intent2 = new Intent(this.H, (Class<?>) SettingActivity.class);
                intent2.putExtra("displayView", false);
                startActivity(intent2);
                r();
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "设置");
                return;
            case 4:
            default:
                return;
            case 5:
                Intent intent3 = new Intent();
                intent3.putExtra("page", 0);
                intent3.putExtra("title", com.excelliance.kxqp.swipe.a.a.getString(this.H, "official_community"));
                intent3.setComponent(new ComponentName(this.H, (Class<?>) CommonActivity.class));
                this.H.startActivity(intent3);
                bz.a().a(this.H, 51000, "进入官方社群");
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "官方社群");
                return;
            case 6:
                NotificationCenterActivity.start(this.H);
                r();
                bz.a().a(this.H, 49000, "进入消息中心");
                return;
            case 7:
                if (bx.a().b(this.H)) {
                    this.H.startActivity(new Intent(this.H, (Class<?>) UserInfoEditActivity.class));
                    com.excelliance.kxqp.gs.g.c.a().a(this.mPageDes.firstPage, (String) null, "主页", "OP账号", "个人信息编辑");
                    return;
                }
                w.e(this.H, "share_for_login_sure");
                if (com.excean.ab_builder.c.a.K(this.H)) {
                    a(this.H.getResources().getString(R.string.loading_game));
                }
                by.a(this.H, "sp_total_info").a("sp_key_login_from_mine_page", 1);
                com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLogin(new LoginRequest.Builder(this.H).setLoginFrom(1).build());
                bz.a().e(this.H, 1, this.H.getPackageName());
                com.excelliance.kxqp.gs.g.c.a().a(this.mPageDes.firstPage, (String) null, "主页", "登陆/注册", "去登陆页面");
                return;
            case 8:
                this.H.startActivity(new Intent(this.H, (Class<?>) RecordManagerActivity.class));
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "录截屏管理");
                return;
            case 9:
                StringBuilder sb = new StringBuilder("https://h5.ourplay.com.cn/userexper");
                try {
                    sb.append("?aid=" + URLEncoder.encode(com.excelliance.kxqp.util.a.b.e(this.H), "UTF-8"));
                    sb.append("&rid=" + URLEncoder.encode(bx.a().a(this.H), "UTF-8"));
                } catch (UnsupportedEncodingException e) {
                    e.printStackTrace();
                }
                WebNoVideoActivity.startActivity(this.H, sb.toString());
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "用户体验提升计划");
                return;
            case 10:
                MyCommentActivity.a(this.H);
                return;
            case 11:
                if (bx.a().b(this.H)) {
                    com.excelliance.kxqp.gs.router.a.a.f8075b.invokeMyCollections(this.H);
                    r();
                    return;
                } else {
                    Toast.makeText(this.H, "请先登录", 0).show();
                    return;
                }
            case 12:
                if ((aq.i() || com.excelliance.kxqp.task.store.c.a(this.H)) && !bs.p(this.H) && !com.excelliance.kxqp.gs.util.b.B(this.H)) {
                    z = true;
                }
                if (z) {
                    com.excelliance.kxqp.gs.g.c.a().a(this.mPageDes.firstPage, (String) null, "高速卡片", "我的页面高速VIP卡片按钮", "去VIP");
                    cn.d(this.H);
                    return;
                }
                return;
            case 13:
                GameAccountActivity.a(this.H);
                h();
                by.a(this.H, "sp_permission_guide").a("sp_key_buy_google_account_red_point", false);
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "已购买账号");
                return;
            case 14:
                bz.a().a(this.H, 162000, 1, "点击“会员兑换码”入口");
                if (bx.a().b(this.H)) {
                    MembershipVouchersActivity.a(this.H);
                } else {
                    Bundle bundle = new Bundle();
                    bundle.putInt("flag", 1);
                    com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLoginWithBundle(this, 2, bundle);
                }
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "会员兑换券");
                return;
            case 15:
                bz.a().a(this.H, "", 170000, 20, "游戏讨论区相关-点击我的游戏人生");
                BiEventClick biEventClick = new BiEventClick();
                biEventClick.current_page = "我的页面";
                biEventClick.page_type = "主页";
                biEventClick.button_name = view == this.i ? "我的页面头像" : "我的游戏人生";
                if (bx.a().b(this.H)) {
                    UserCircleCenterActivity.a(this.H, Integer.parseInt(bx.a().a(this.H)));
                    biEventClick.button_function = "进入个人主页";
                } else {
                    com.excelliance.kxqp.gs.router.a.a.f8074a.invokeLogin(this.H);
                    biEventClick.button_function = "去登录";
                }
                com.excelliance.kxqp.gs.g.c.a().a(biEventClick);
                return;
            case 16:
                ai.b bVar = new ai.b() {
                    @Override
                    public void run() {
                    }

                    @Override
                    public void a(String str, String str2) {
                        if (MineFragment.this.J != null) {
                            MineFragment.this.J.a(str, str2);
                        }
                    }
                };
                ai.b bVar2 = new ai.b() {
                    @Override
                    public void a(String str, String str2) {
                    }

                    @Override
                    public void run() {
                        new ContainerDialog.a().b(true).c(true).a(MineFragment.this.getResources().getString(R.string.cancel_real_name_verify)).b(MineFragment.this.getResources().getString(R.string.cancel_real_name_verify_tip)).a(true).g(ad.a(MineFragment.this.getContext(), 0.0f)).a(ContextCompat.getDrawable(MineFragment.this.getContext(), R.drawable.customize_btn_rectangle_round_grey_stroke_1px)).d(MineFragment.this.getResources().getString(R.string.cancel)).e(MineFragment.this.getResources().getString(R.string.cancel_real_name_verify_confirm)).b(new ContainerDialog.b() {
                            @Override
                            public void a(DialogFragment dialogFragment) {
                                BiEventClick biEventClick2 = new BiEventClick();
                                biEventClick2.current_page = "我的页面";
                                biEventClick2.dialog_name = "确认注销实名认证弹窗";
                                biEventClick2.button_name = "确认注销实名认证按钮";
                                com.excelliance.kxqp.gs.g.c.a().a(biEventClick2);
                                dialogFragment.dismissAllowingStateLoss();
                                if (f.a(MineFragment.this.getContext())) {
                                    if (MineFragment.this.J != null) {
                                        MineFragment.this.J.f();
                                        return;
                                    }
                                    az.e("MineFragment", "MineFragment/cancel real name information,called with: thread =【" + Thread.currentThread() + "】,result = false,mPresenter = null");
                                    cg.a(MineFragment.this.getContext(), MineFragment.this.getResources().getString(R.string.userinfo_error));
                                    return;
                                }
                                cg.a(MineFragment.this.getContext(), MineFragment.this.getResources().getString(R.string.account_network_unavailable));
                            }
                        }).a(new ContainerDialog.b() {
                            @Override
                            public void a(DialogFragment dialogFragment) {
                                dialogFragment.dismissAllowingStateLoss();
                            }
                        }).a().show(MineFragment.this.getChildFragmentManager(), "cancelRealName");
                    }
                };
                if (bx.a().b(this.H)) {
                    g = bx.a().d(this.H);
                    l = bx.a().j(this.H);
                    m = bx.a().k(this.H);
                } else {
                    g = bx.a().g(this.H);
                    l = bx.a().l(this.H);
                    m = bx.a().m(this.H);
                }
                ai.a().a(getActivity(), g, l, m, bVar, bVar2);
                return;
            case 17:
                Intent intent4 = new Intent();
                intent4.putExtra("page", 6);
                intent4.putExtra("title", com.excelliance.kxqp.swipe.a.a.getString(this.H, "google_suite"));
                intent4.setComponent(new ComponentName(this.H, (Class<?>) CommonActivity.class));
                this.H.startActivity(intent4);
                BiEventClick biEventClick2 = new BiEventClick();
                biEventClick2.current_page = "我的页面";
                biEventClick2.button_name = "我的(当前页面):谷歌套件";
                if (as.d(this.H, true)) {
                    biEventClick2.button_function = "套件安装中";
                }
                com.excelliance.kxqp.gs.g.c.a().a(biEventClick2);
                return;
            case 18:
                MyVoucherActivity.a(this.H);
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "我的优惠券");
                return;
            case 19:
                StatisticsGS.getInstance().uploadUserAction(this.H, 34);
                Intent intent5 = new Intent(getActivity(), (Class<?>) (com.excelliance.kxqp.gs.util.b.V(this.H) ? ActivityFeedbackQuestions.class : OpinionActivity.class));
                Bundle bundle2 = new Bundle();
                bundle2.putInt(ParamKeyConstants.WebViewConstants.QUERY_FROM, 3);
                intent5.putExtras(bundle2);
                getActivity().startActivity(intent5);
                r();
                com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "帮助与反馈");
                return;
            case 20:
                GameCurrencyMallActivity.a(this.H, this.mPageDes.firstPage, "主页", "我的页面游戏币商城");
                return;
            case 21:
                MedalWallActivity.a(this.H, -1, "我的页面", "主页", "我的页面勋章按钮");
                return;
            case 22:
                CommentHotActivity.a(getActivity(), 1);
                return;
            case 23:
                TitleWallActivity.a(this.H, -1);
                return;
        }
    }

    public void a(boolean z) {
        if (z) {
            by.a(this.H, "sp_config").a("sp_key_has_showed_my_game_life", true);
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (this.H != null) {
            this.H.unregisterReceiver(this.R);
            ViewSwitcher.a(this.H).b(this.P);
            LocalBroadcastManager.getInstance(this.H).unregisterReceiver(this.Q);
        }
        com.excelliance.kxqp.gs.ui.mine.a.c().b(this);
        com.excelliance.kxqp.gs.ui.mine.a.c().unregisterReceiver(getActivity());
        if (this.J != null) {
            this.J.a();
        }
    }

    public void m() {
        boolean g;
        if (isAdded()) {
            this.h.setText(bx.a().q(this.H));
            a(this.h, true);
            if (!bx.a().b(this.H)) {
                this.x.setVisibility(8);
                this.e.setImageResource(com.excelliance.kxqp.gs.ui.medal.a.c.d());
                if (bx.a().n(this.H)) {
                    this.h.setText(R.string.me_login);
                    a(this.h, false);
                }
            }
            switch (q()) {
                case 1:
                    break;
                case 2:
                    cn.c(this.H);
                    String e = w.e(this.H, "me_login_tips_vip");
                    String s = bx.a().s(this.H);
                    this.p.setText(e + s);
                    break;
                case 3:
                    if (!bx.a().n(this.H) && !com.excean.ab_builder.c.a.u(this.H) && !com.excean.ab_builder.c.a.v(this.H)) {
                        cn.b(this.H);
                    }
                    if (bx.a().p(this.H)) {
                        String e2 = w.e(this.H, "me_login_tips_vip");
                        String v = bx.a().v(this.H);
                        this.p.setText(e2 + v);
                        break;
                    } else {
                        w.a(this.H, this.p, "me_login_tips_expired");
                        break;
                    }
                    break;
                default:
                    w.a(this.H, this.h, "me_login_v2");
                    w.a(this.H, this.p, "me_login_tips");
                    a(this.h, false);
                    break;
            }
            if (this.t != null) {
                this.t.setVisibility(((!aq.i() && !com.excelliance.kxqp.task.store.c.a(this.H)) || bs.p(this.H) || com.excelliance.kxqp.gs.util.b.B(this.H)) ? false : true ? 0 : 8);
            }
            if (by.a(this.H, "sp_config").b("sp_key_anti_addiction_system_switch", false).booleanValue()) {
                this.v.setVisibility(0);
                if (bx.a().b(this.H)) {
                    g = bx.a().d(this.H);
                } else {
                    g = bx.a().g(this.H);
                }
                if (g) {
                    this.v.setText(R.string.finish_identity_authentication);
                } else {
                    this.v.setText(R.string.not_real_name);
                }
                this.v.setTag(16);
                this.v.setOnClickListener(this);
                return;
            }
            this.v.setVisibility(8);
        }
    }

    private void a(TextView textView, boolean z) {
        boolean booleanValue = by.a(this.H, "sp_config").b("sp_key_anti_addiction_system_switch", false).booleanValue();
        if (z && booleanValue) {
            textView.setEllipsize(TextUtils.TruncateAt.END);
            textView.setSingleLine(true);
            textView.setMaxWidth(ad.a(this.H, 140.0f));
        } else {
            textView.setEllipsize(null);
            textView.setSingleLine(false);
            textView.setMaxWidth(Integer.MAX_VALUE);
        }
    }

    public void a(String str, String str2, String str3, int i) {
        if (!TextUtils.isEmpty(str)) {
            this.h.setText(str);
            a(this.h, true);
            bx.a().b(this.H, str);
        }
        if (i != -1) {
            m();
        }
        if (TextUtils.isEmpty(str3)) {
            return;
        }
        com.bumptech.glide.i.a(getActivity()).a(str3).a(new com.bumptech.glide.d.d.a.e(getActivity()), new com.excelliance.kxqp.gs.discover.common.b(getActivity())).d(com.excelliance.kxqp.gs.ui.medal.a.c.d()).c(com.excelliance.kxqp.gs.ui.medal.a.c.d()).a(this.e);
    }

    public void n() {
        final TextView textView = (TextView) com.excelliance.kxqp.ui.util.b.a("update_prop", this.s);
        if (textView != null) {
            textView.setVisibility(8);
            tp.g(new Runnable() {
                @Override
                public void run() {
                    JSONArray a2 = com.excelliance.kxqp.gs.ui.update.a.a(MineFragment.this.H, ResponseData.getUpdateData(MineFragment.this.H));
                    final int size = (a2 != null ? RankingItem.pareseRankingItems(MineFragment.this.H, a2, true).size() + 0 : 0) + com.excelliance.kxqp.gs.ui.update.local.f.a(MineFragment.this.H).a(false).size() + com.excelliance.kxqp.gs.ui.update.a.a();
                    tp.i(new Runnable() {
                        @Override
                        public void run() {
                            if (size > 0) {
                                textView.setVisibility(0);
                                com.excelliance.kxqp.ui.util.b.a(textView, String.format(com.excelliance.kxqp.swipe.a.a.getString(MineFragment.this.H, "update_prop"), Integer.valueOf(size)), "update_prop");
                            } else {
                                textView.setVisibility(8);
                            }
                        }
                    });
                }
            });
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        Log.d("MineFragment", "onResume");
        com.excelliance.kxqp.gs.ui.mine.a.c().a(this);
        tp.i(new Runnable() {
            @Override
            public void run() {
                if (MineFragment.this.getActivity() == null || MineFragment.this.getActivity().isFinishing()) {
                    return;
                }
                MineFragment.this.m();
                try {
                    boolean b2 = com.excelliance.kxqp.gs.util.g.a(MineFragment.this.H).b(MineFragment.this.H);
                    if (MineFragment.this.q != null) {
                        MineFragment.this.q.setVisibility(b2 ? 0 : 8);
                    }
                    MineFragment.this.n();
                } catch (Exception e) {
                    e.printStackTrace();
                }
                MineFragment.this.p();
            }
        });
        s();
        e();
        h();
    }

    private void o() {
        if (this.J != null) {
            this.J.e();
        }
    }

    public void p() {
        tp.c(new Runnable() {
            @Override
            public void run() {
                final String a2 = bx.a().a(MineFragment.this.H.getSharedPreferences("USERINFO", 0), com.excelliance.kxqp.gs.util.t.f, "");
                if (a2 == null || "".equals(a2)) {
                    return;
                }
                tp.i(new Runnable() {
                    @Override
                    public void run() {
                        if (MineFragment.this.getActivity() == null || MineFragment.this.getActivity().isFinishing()) {
                            return;
                        }
                        com.bumptech.glide.i.a(MineFragment.this.getActivity()).a(a2).a(new com.bumptech.glide.d.d.a.e(MineFragment.this.getActivity()), new com.excelliance.kxqp.gs.discover.common.b(MineFragment.this.getActivity())).d(com.excelliance.kxqp.gs.ui.medal.a.c.d()).c(com.excelliance.kxqp.gs.ui.medal.a.c.d()).a(MineFragment.this.e);
                    }
                });
            }
        });
    }

    private int q() {
        int u = bx.a().u(this.H);
        return u <= 0 ? bx.a().b(this.H) ? 1 : 0 : u == 4 ? 3 : 2;
    }

    private void r() {
        getActivity().overridePendingTransition(w.i(this.H, "slide_right_in"), w.i(this.H, "slide_left_out"));
    }

    protected int f() {
        return w.c(this.H, ViewRepository.VIEW_FRAGMENT_MINE_V2);
    }

    @Override
    public void onActivityResult(int i, int i2, Intent intent) {
        Log.e("MineFragment", "[data: " + intent + ",code:" + i2 + "]");
        com.excelliance.kxqp.gs.ui.mine.a.c().a(i, i2, intent);
        switch (i) {
            case 1:
                if (i2 != -1) {
                    if (i2 == 0) {
                        tp.d(new Runnable() {
                            @Override
                            public void run() {
                                by a2 = by.a(MineFragment.this.H, "sp_pre_account_config");
                                String b2 = a2.b("sp_pre_account_config", "");
                                az.i("MineFragment", "onActivityResult: ----config: " + b2);
                                if (TextUtils.equals(b2, "")) {
                                    return;
                                }
                                as.a(MineFragment.this.H, 0, b2);
                                a2.a("sp_pre_account_config", "");
                            }
                        });
                        return;
                    }
                    return;
                }
                getActivity().setResult(-1, intent);
                this.M.sendMessageDelayed(this.M.obtainMessage(1), 200L);
                try {
                    Intent intent2 = new Intent();
                    String packageName = this.H.getPackageName();
                    intent2.setComponent(new ComponentName(packageName, "com.excelliance.kxqp.gs.service.CustomIntentService"));
                    intent2.setAction(packageName + ".google.account.add.success");
                    this.H.startService(intent2);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (com.excelliance.kxqp.gs.util.b.cb(this.H)) {
                    com.excelliance.kxqp.gs.ui.gaccount.receive.a.a(this.H).a();
                    return;
                }
                return;
            case 2:
                if (i2 != -1 || intent == null || intent.getExtras() == null || intent.getExtras().getInt("flag", 0) != 1) {
                    return;
                }
                MembershipVouchersActivity.a(this.H);
                return;
            default:
                return;
        }
    }

    @Override
    protected boolean loadData() {
        com.excelliance.kxqp.f.b.a();
        return false;
    }

    @Override
    public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.H = getActivity();
        this.s = ViewRepository.getInstance(getActivity()).getView(ViewRepository.VIEW_FRAGMENT_MINE_V2);
        if (this.s == null) {
            this.s = layoutInflater.inflate(f(), viewGroup, false);
        }
        c();
        g();
        return this.s;
    }

    public void g() {
        if (!com.excean.ab_builder.c.a.r(this.H) || bs.p(this.H)) {
            return;
        }
        this.f10615a = (GoogleServiceViewModel) ViewModelProviders.of(getActivity()).get(GoogleServiceViewModel.class);
        this.f10615a.a().observe(this, new Observer<GoogleServiceViewModel.b>() {
            @Override
            public void onChanged(GoogleServiceViewModel.b bVar) {
                switch (bVar.f9553a) {
                    case 9:
                    case 10:
                        MineFragment.this.r.setTextColor(MineFragment.this.H.getResources().getColor(R.color.group_app_title));
                        MineFragment.this.r.setText(MineFragment.this.H.getString(R.string.google_suite_instiled));
                        return;
                    default:
                        return;
                }
            }
        });
    }

    @Override
    public void onClick(View view) {
        a(view);
    }

    public void b(boolean z) {
        if (this.n != null) {
            this.n.setVisibility(z ? 0 : 8);
        }
    }

    private void s() {
        if (this.u == null) {
            return;
        }
        if (com.excelliance.kxqp.gs.util.b.cu(this.H)) {
            boolean booleanValue = by.a(this.H, "sp_total_info").b("SP_GOOGLE_ACCOUNT_ENTRANCE", false).booleanValue();
            boolean a2 = ViewSwitcher.a(this.H).a();
            if (booleanValue && a2) {
                this.u.setVisibility(0);
                this.u.setTag(13);
                return;
            } else {
                this.u.setVisibility(8);
                return;
            }
        }
        this.u.setVisibility(8);
    }

    public void h() {
        boolean z = as.C(this.H) == null || as.C(this.H).size() == 0;
        boolean booleanValue = by.a(this.H, "sp_permission_guide").b("sp_key_buy_google_account_red_point", false).booleanValue();
        if (z && booleanValue) {
            this.g.setVisibility(0);
        } else {
            this.g.setVisibility(8);
        }
    }

    public void t() {
        if (this.B == null) {
            return;
        }
        if (com.excean.ab_builder.c.a.am(this.H) && aa.a(this.H)) {
            this.B.setTag(20);
            this.B.setOnClickListener(this);
            this.B.setVisibility(0);
            return;
        }
        this.B.setVisibility(8);
    }

    private void u() {
        if (this.C == null) {
            return;
        }
        if (com.excean.ab_builder.c.a.am(this.H)) {
            r.a(this.H).b().observe(getViewLifecycleOwner(), new Observer<Integer>() {
                @Override
                public void onChanged(Integer num) {
                    if (num == null) {
                        MineFragment.this.C.setVisibility(8);
                    } else {
                        MineFragment.this.C.setText(String.format(MineFragment.this.H.getString(R.string.medal_count), num));
                        MineFragment.this.C.setVisibility(0);
                    }
                }
            });
            this.C.setTag(21);
            this.C.setOnClickListener(this);
            this.C.setVisibility(0);
            return;
        }
        this.C.setVisibility(8);
    }

    @Override
    public void a(boolean z, String str, boolean z2) {
        if (z) {
            ai.a().c();
            this.v.setText(R.string.finish_identity_authentication);
            bx.a().a(this.H.getSharedPreferences("USERINFO", 0), "USER_REAL_NAME_VERIFY", 1);
            BiSendContentEvent biSendContentEvent = new BiSendContentEvent();
            biSendContentEvent.current_page = "我的页面";
            biSendContentEvent.content_type = "实名认证";
            com.excelliance.kxqp.gs.g.c.a().a(biSendContentEvent);
            String string = this.H.getString(R.string.real_name_verify_success);
            cg.a(this.H, string);
            BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
            biEventDialogShow.current_page = "我的页面";
            biEventDialogShow.dialog_type = "toast";
            biEventDialogShow.toast_name = string;
            com.excelliance.kxqp.gs.g.c.a().a(biEventDialogShow);
            return;
        }
        if (z2) {
            int c = by.a(this.H, "sp_config").c("sp_key_real_name_commit_times", 0) + 1;
            if (c == 1) {
                ai.a(this.H);
            }
            by.a(this.H, "sp_config").a("sp_key_real_name_commit_times", c);
        }
        ai.a().a(getActivity(), R.string.real_name_authentication_rules, str);
    }

    @Override
    public void a() {
        if (this.v != null) {
            this.v.setText(R.string.not_real_name);
        }
    }

    @Override
    public void a(int i) {
        final WXconfig wXconfig;
        this.z.setVisibility(i == 1 ? 0 : 8);
        if (i == 0) {
            String b2 = by.a(this.H, "sp_config").b("sp_key_get_vip_access_dialog_config_info4", "");
            if (TextUtils.isEmpty(b2)) {
                return;
            }
            try {
                wXconfig = (WXconfig) com.excelliance.kxqp.util.v.a().a(b2, WXconfig.class);
            } catch (Exception e) {
                e.printStackTrace();
                wXconfig = null;
            }
            if (wXconfig != null) {
                Log.d("MineFragment", "showUserMedal: privacyVipBean::" + wXconfig);
                this.O.setVisibility(0);
                by.a(this.H, "sp_config").a("sp_key_dismiss_limit_time", true);
                this.O.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        BiEventContent biEventContent = new BiEventContent();
                        biEventContent.current_page = "我的页面";
                        biEventContent.content_type = "小程序";
                        biEventContent.expose_banner_area = "我的页面菜单栏";
                        biEventContent.expose_banner_order = "1";
                        biEventContent.mini_program_page = "小程序加企微二维码页面";
                        com.excelliance.kxqp.gs.g.c.a().a(biEventContent);
                        af.a aVar = new af.a();
                        aVar.f14919a = "我的页面";
                        aVar.d = "我的页面私域弹窗";
                        af.a(MineFragment.this.H, wXconfig, aVar, false, "我的页面");
                    }
                });
                return;
            }
            return;
        }
        by.a(this.H, "sp_config").a("sp_key_dismiss_limit_time", false);
        this.O.setVisibility(8);
    }

    @Override
    public void a(WXconfig wXconfig) {
        if (!i() || wXconfig == null) {
            return;
        }
        if (!cd.a(wXconfig.appid) && !cd.a(wXconfig.deeplink)) {
            af.a aVar = new af.a();
            aVar.f14919a = "我的页面";
            aVar.d = "新注册用户专属福利弹窗";
            aVar.c = "新注册用户专属福利弹窗按钮";
            af.a(getActivity(), wXconfig, aVar);
        }
        by.a(this.H, "sp_total_info").a("sp_key_login_from_mine_page", 0);
    }

    public boolean i() {
        return by.a(this.H, "sp_total_info").c("sp_key_login_from_mine_page", 0) == 3;
    }

    private void v() {
        BiEventPageOpen biEventPageOpen = new BiEventPageOpen();
        biEventPageOpen.current_page = "我的页面";
        biEventPageOpen.is_elses_page = "否";
        com.excelliance.kxqp.gs.g.c.a().a(biEventPageOpen);
    }
}