导航菜单

页面标题

页面副标题

klikUMKM v2.0.1 - MainActivity.java 源代码

正在查看: klikUMKM v2.0.1 应用的 MainActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.yx.credit.indonesia.ui;

import aa.l;
import aa.q;
import aa.r;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.j0;
import androidx.viewpager2.widget.ViewPager2;
import cb.b;
import com.google.firebase.encoders.json.BuildConfig;
import com.trustdecision.mobrisk.TDRisk;
import com.yx.credit.base.YxApplication;
import com.yx.credit.base.activity.BaseFragmentActivity;
import com.yx.credit.base.entity.AppUpdateRsp;
import com.yx.credit.base.entity.UnLoginEvent;
import com.yx.credit.base.entity.UserInfo;
import com.yx.credit.base.net.k;
import com.yx.credit.indonesia.R$color;
import com.yx.credit.indonesia.R$drawable;
import com.yx.credit.indonesia.R$id;
import com.yx.credit.indonesia.R$layout;
import com.yx.credit.indonesia.R$string;
import com.yx.credit.indonesia.ui.MainActivity;
import ga.c;
import j4.i;
import j4.j;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Objects;
import java.util.Stack;
import la.h;
import org.greenrobot.eventbus.ThreadMode;
import uc.m;
import w.a;
import w.f;

public class MainActivity extends BaseFragmentActivity implements View.OnClickListener {
    public static final int X = 0;
    public ViewPager2 K;
    public LinearLayout L;
    public ImageView M;
    public TextView N;
    public LinearLayout O;
    public ImageView P;
    public TextView Q;
    public LinearLayout R;
    public ImageView S;
    public TextView T;
    public final ArrayList U = new ArrayList();
    public final f V;
    public final f W;

    public MainActivity() {
        final int i10 = 0;
        this.V = B(new a(this) {

            public final MainActivity f10031b;

            {
                this.f10031b = this;
            }

            @Override
            public final void a(Object obj) {
                MainActivity mainActivity = this.f10031b;
                int i11 = i10;
                int i12 = MainActivity.X;
                switch (i11) {
                    case 0:
                        mainActivity.H.getClass();
                        p6.f.n();
                        mainActivity.O();
                        break;
                    default:
                        mainActivity.H.getClass();
                        p6.f.n();
                        MainActivity.M();
                        break;
                }
            }
        }, new j0(3));
        final int i11 = 1;
        this.W = B(new a(this) {

            public final MainActivity f10031b;

            {
                this.f10031b = this;
            }

            @Override
            public final void a(Object obj) {
                MainActivity mainActivity = this.f10031b;
                int i112 = i11;
                int i12 = MainActivity.X;
                switch (i112) {
                    case 0:
                        mainActivity.H.getClass();
                        p6.f.n();
                        mainActivity.O();
                        break;
                    default:
                        mainActivity.H.getClass();
                        p6.f.n();
                        MainActivity.M();
                        break;
                }
            }
        }, new j0(3));
    }

    public static void M() {
        l.a.d(true, new m8.f(2));
    }

    public static void P(Context context) {
        Intent intent = new Intent(context, (Class<?>) MainActivity.class);
        intent.addFlags(TDRisk.OPTION_OAID);
        intent.addFlags(268435456);
        context.startActivity(intent);
    }

    public final void N(int i10) {
        this.K.c(i10, false);
        int j7 = j.j(R$color.color_006553);
        int j9 = j.j(R$color.color_4e5969);
        if (i10 == 0) {
            this.N.setTextColor(j7);
            this.Q.setTextColor(j9);
            this.T.setTextColor(j9);
            this.M.setImageResource(R$drawable.main_tab_home_selected);
            this.P.setImageResource(R$drawable.main_tab_order_unselect);
            this.S.setImageResource(R$drawable.main_tab_my_unselect);
            return;
        }
        if (1 == i10) {
            this.N.setTextColor(j9);
            this.Q.setTextColor(j7);
            this.T.setTextColor(j9);
            this.M.setImageResource(R$drawable.main_tab_home_unselect);
            this.P.setImageResource(R$drawable.main_tab_order_selected);
            this.S.setImageResource(R$drawable.main_tab_my_unselect);
            return;
        }
        this.N.setTextColor(j9);
        this.Q.setTextColor(j9);
        this.T.setTextColor(j7);
        this.M.setImageResource(R$drawable.main_tab_home_unselect);
        this.P.setImageResource(R$drawable.main_tab_order_unselect);
        this.S.setImageResource(R$drawable.main_tab_my_selected);
    }

    public final void O() {
        m.w(this, "android.permission.ACCESS_COARSE_LOCATION", j.m(R$string.permission_access_coarse_location_title, new Object[0]), j.m(R$string.permission_access_coarse_location_sub_title, new Object[0]), BuildConfig.FLAVOR, j.m(R$string.permission_confirm, new Object[0]), new h(this, 1));
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == this.L.getId()) {
            N(0);
        } else if (id == this.O.getId()) {
            N(1);
        } else if (id == this.R.getId()) {
            N(2);
        }
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null) {
            BaseFragmentActivity baseFragmentActivity = this.F;
            Intent intent = new Intent(baseFragmentActivity, (Class<?>) WelcomeActivity.class);
            intent.setFlags(268468224);
            baseFragmentActivity.startActivity(intent);
            return;
        }
        G();
        setContentView(R$layout.activity_main);
        J();
        K();
        this.K = (ViewPager2) findViewById(R$id.view_pager);
        this.L = (LinearLayout) findViewById(R$id.ll_homepage);
        this.M = (ImageView) findViewById(R$id.iv_homepage);
        this.N = (TextView) findViewById(R$id.tv_homepage);
        this.O = (LinearLayout) findViewById(R$id.ll_order);
        this.P = (ImageView) findViewById(R$id.iv_order);
        this.Q = (TextView) findViewById(R$id.tv_order);
        this.R = (LinearLayout) findViewById(R$id.ll_my);
        this.S = (ImageView) findViewById(R$id.iv_my);
        this.T = (TextView) findViewById(R$id.tv_my);
        this.L.setOnClickListener(this);
        this.O.setOnClickListener(this);
        this.R.setOnClickListener(this);
        ArrayList arrayList = this.U;
        arrayList.clear();
        this.K.setUserInputEnabled(false);
        arrayList.add(new c());
        arrayList.add(new ga.j());
        arrayList.add(new ga.h());
        this.K.setAdapter(new ca.a(this, arrayList));
        N(0);
        if (!q.a) {
            TDRisk.initWithOptions(YxApplication.f7325c, new TDRisk.Builder().partner("klik_id").appKey("5bcd0024681a9f8397aca4629a8f8825").country(TDRisk.COUNTRY_IDNA).appName(j.m(com.yx.credit.base.R$string.app_name, new Object[0])).disableGPS().disableSensor().disableReadPhone().disableInstallPackageList());
            q.a = true;
        }
        if (Build.VERSION.SDK_INT < 33) {
            O();
        } else {
            m.w(this, "android.permission.POST_NOTIFICATIONS", j.m(R$string.permission_post_notifications_title, new Object[0]), j.m(R$string.permission_post_notifications_sub_title, new Object[0]), j.m(R$string.permission_cancel, new Object[0]), j.m(R$string.permission_confirm, new Object[0]), new h(this, 0));
        }
        HashMap hashMap = new HashMap();
        k.a.w("https://api.klikumkm.co.id/api/indo/app/version", hashMap, AppUpdateRsp.class, true).M(b.a()).R(new aa.b(this));
        j4.m.x(this);
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        j4.m.B(this);
    }

    @bd.j(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(UnLoginEvent unLoginEvent) {
        Activity activity;
        p6.f fVar = this.H;
        Thread.currentThread().getName();
        fVar.getClass();
        p6.f.n();
        if (unLoginEvent != null) {
            i iVar = r.a;
            if (((UserInfo) iVar.f9450b) == null) {
                this.H.getClass();
                p6.f.n();
                return;
            }
            i9.a aVar = YxApplication.f7325c.f7326b;
            if (aVar == null) {
                activity = null;
            } else {
                Stack stack = aVar.f9090b;
                activity = stack.isEmpty() ? null : (Activity) stack.peek();
                Objects.toString(activity);
                aVar.a.getClass();
                p6.f.n();
            }
            if (activity != null) {
                m.x(activity, j.m(com.yx.credit.base.R$string.login_lose_efficacy, new Object[0]));
            }
            iVar.f9450b = null;
            SharedPreferences.Editor editor = (SharedPreferences.Editor) ((t8.c) iVar.f9451c).f11605c;
            if (editor != null) {
                editor.putString("content", BuildConfig.FLAVOR);
                editor.apply();
            }
            Log.d("Logger", "get is debug value false");
            if (LoginActivity.S) {
                return;
            }
            LoginActivity.S = true;
            i9.a aVar2 = YxApplication.f7325c.f7326b;
            if (aVar2 != null) {
                Stack stack2 = aVar2.f9090b;
                r1 = stack2.isEmpty() ? null : (Activity) stack2.peek();
                Objects.toString(r1);
                aVar2.a.getClass();
                p6.f.n();
            }
            Objects.toString(r1);
            Log.d("Logger", "get is debug value false");
            if (r1 != null) {
                Intent intent = new Intent(r1, (Class<?>) LoginActivity.class);
                intent.addFlags(TDRisk.OPTION_OAID);
                intent.addFlags(268435456);
                r1.startActivity(intent);
            }
        }
    }
}