导航菜单

页面标题

页面副标题

SpeedCash v6.5.1482 - OTPActivity.java 源代码

正在查看: SpeedCash v6.5.1482 应用的 OTPActivity.java JAVA 源代码文件

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


package com.bm.sc.bebasbayar.ui.activity.auth;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bm.sc.auth.ui.cs.LiveChatActivity;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.adapter.entity.OnBoardTimeLineEntity;
import com.bm.sc.bebasbayar.adapter.list.OnBoardTimeLineAdapter;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.helper.AuthHelper;
import com.bm.sc.bebasbayar.iface.BBCallback;
import com.bm.sc.bebasbayar.iface.NotificationListener;
import com.bm.sc.bebasbayar.message.mp.LoginMessage;
import com.bm.sc.bebasbayar.service.BBFourDigitReceiver;
import com.bm.sc.bebasbayar.service.BBNotificationService;
import com.bm.sc.bebasbayar.ui.activity.auth.OTPActivity;
import com.bm.sc.util.android.Compat;
import com.bm.sc.util.common.Var;
import com.orhanobut.dialogplus.DialogPlus;
import com.orhanobut.dialogplus.ViewHolder;
import in.aabhasjindal.otptextview.OTPListener;
import in.aabhasjindal.otptextview.OtpTextView;
import java.util.ArrayList;
import java.util.Date;
import java.util.Objects;

public class OTPActivity extends AuthActivity implements View.OnClickListener, NotificationListener, OTPListener, OnBoardTimeLineAdapter.Callback {
    public static final int STATE_CHANGE_PIN = 3;
    public static final int STATE_LOGIN = 2;
    public static final int STATE_LOGIN_FINGER = 4;
    public static final int STATE_LOGIN_PIN = 6;
    public static final int STATE_LOGIN_SMS = 7;
    public static final int STATE_LOGIN_WA = 5;
    public static final int STATE_REGISTER = 1;
    public static final int STATE_RESET = 0;
    public final String d = getClass().getSimpleName();
    public String e;
    public OtpTextView f;
    public BBFourDigitReceiver g;
    public TextView h;
    public TextView i;
    public TextView j;
    public TextView k;
    public ArrayList<OnBoardTimeLineEntity> l;
    public OnBoardTimeLineAdapter m;
    public DialogPlus n;
    public String o;
    public String p;
    public String q;
    public String r;
    public String s;
    public int t;

    public class a implements BBFourDigitReceiver.FourDigitReceiverListener {
        public a() {
        }

        @Override
        public void onError(String str) {
            String unused = OTPActivity.this.d;
        }

        @Override
        public void onSuccess(String str) {
            String unused = OTPActivity.this.d;
            StringBuilder sb = new StringBuilder();
            sb.append("Receive OTP:");
            sb.append(str);
            OTPActivity.this.f.setOTP(str);
        }
    }

    public class b extends CountDownTimer {
        public b(long j, long j2) {
            super(j, j2);
        }

        @Override
        public void onFinish() {
            OTPActivity oTPActivity = OTPActivity.this;
            oTPActivity.k = (TextView) oTPActivity.findViewById(R.id.tv_warning);
            if (OTPActivity.this.e != null) {
                OTPActivity.this.k.setText("Mohon membuka pesan " + OTPActivity.this.e + " anda untuk melihat kode OTP");
            } else {
                OTPActivity.this.k.setText("Mohon membuka pesan SMS / WA anda untuk melihat kode OTP");
            }
            OTPActivity.this.k.setVisibility(0);
        }

        @Override
        public void onTick(long j) {
        }
    }

    public static boolean I(Context context) {
        return NotificationManagerCompat.getEnabledListenerPackages(context).contains(context.getPackageName());
    }

    public void J(int i, AuthHelper.LoginMessageNew loginMessageNew) {
        if (!loginMessageNew.getRc().equals("00")) {
            Affinity.info(this, false, loginMessageNew.getMessage());
        } else {
            this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), true, true, false, false));
            this.m.refreshList(this.l);
        }
    }

    public void K() {
        this.f.requestFocusOTP();
        this.f.performClick();
        g0(this.t, this.p);
    }

    public void L() {
        this.f.requestFocusOTP();
        this.f.performClick();
        g0(this.t, this.p);
    }

    public void M() {
        if (!I(this)) {
            k0();
            return;
        }
        i0();
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                OTPActivity.this.L();
            }
        }, 500L);
        h0();
    }

    public void N() {
        this.f.performClick();
    }

    public void O(String str, int i, AuthHelper.OTPResponse oTPResponse) {
        if (!oTPResponse.getRc().equals("00")) {
            Affinity.info(this, -1, getString(R.string.title_warning), oTPResponse.getMessage(), new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.T(i2, (Boolean) obj);
                }
            });
            return;
        }
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Kode OTP berhasil dikirim", oTPResponse.getDate(), true, true, true, false));
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), false, true, false, false));
        this.m.refreshList(this.l);
        if (str.equalsIgnoreCase("call")) {
            this.r = oTPResponse.getToken();
            Intent intent = new Intent();
            String str2 = this.r;
            if (str2 != null) {
                intent.putExtra("phoneCaller", str2);
            }
            sendBroadcast(intent);
        }
    }

    public void P(int i, Boolean bool) {
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Gagal mengirim OTP", new Date(), false, false, false, true));
        this.m.notifyItemChanged(0);
    }

    public void Q(int i, AuthHelper.OTPResponse oTPResponse) {
        if (!oTPResponse.getRc().equals("00")) {
            Affinity.info(this, -1, getString(R.string.title_warning), oTPResponse.getMessage(), new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.P(i2, (Boolean) obj);
                }
            });
            return;
        }
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Kode OTP berhasil dikirim", oTPResponse.getDate(), true, true, true, false));
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), false, true, false, false));
        this.m.refreshList(this.l);
    }

    public void R(int i, Boolean bool) {
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Gagal mengirim OTP", new Date(), false, false, false, true));
        this.m.notifyItemChanged(0);
    }

    public void S(int i, AuthHelper.OTPResponse oTPResponse) {
        if (!oTPResponse.getRc().equals("00")) {
            Affinity.info(this, -1, getString(R.string.title_warning), oTPResponse.getMessage(), new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.R(i2, (Boolean) obj);
                }
            });
            return;
        }
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Kode OTP berhasil dikirim", oTPResponse.getDate(), true, true, true, false));
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), false, true, false, false));
        this.m.refreshList(this.l);
    }

    public void T(int i, Boolean bool) {
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "Gagal mengirim OTP", new Date(), false, false, false, true));
        this.m.notifyItemChanged(0);
    }

    public void U(String str) {
        this.f.setOTP(str);
    }

    public void W(int i, Boolean bool) {
        Affinity.purge(this, BonjourActivity.class);
    }

    public void X(final String str, int i, AuthHelper.OTPResponse oTPResponse) {
        if (oTPResponse.getRc().equals("00")) {
            this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "", oTPResponse.getDate(), true, true, false, false));
            this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), true, true, false, false));
            this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), false, true, false, false));
            this.m.refreshList(this.l);
            new Handler().postDelayed(new Runnable() {
                @Override
                public final void run() {
                    OTPActivity.this.V(str);
                }
            }, 1000L);
            return;
        }
        if (oTPResponse.getRc().equals(LoginMessage.RC_OTP_INVALID) || !this.s.equals("not:wa:otp")) {
            Affinity.info(this, 1, "Informasi", oTPResponse.getMessage(), new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.W(i2, (Boolean) obj);
                }
            });
        } else {
            Affinity.info(this, false, oTPResponse.getMessage());
        }
    }

    public void Y(String str) {
        this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), true, true, false, false));
        this.m.refreshList(this.l);
        Affinity.purge(this, GantiPINActivity.class, GantiPINActivity.getBundle(this, this.o, str, 0, this.p));
    }

    public void Z(final String str, int i, AuthHelper.OTPResponse oTPResponse) {
        if (!oTPResponse.getRc().equals("00")) {
            Affinity.info(this, false, oTPResponse.getMessage());
            this.f.setOTP("");
            return;
        }
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "", oTPResponse.getDate(), true, true, false, false));
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), true, true, false, false));
        this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), false, true, false, false));
        this.m.refreshList(this.l);
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                OTPActivity.this.Y(str);
            }
        }, 1000L);
    }

    public void a0(String str) {
        this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), true, true, false, false));
        this.m.refreshList(this.l);
        Affinity.purge(this, RegisterActivity.class, RegisterActivity.getBundle(this, this.o, str, this.p));
    }

    public void b0(final String str, int i, AuthHelper.OTPResponse oTPResponse) {
        if (!oTPResponse.getRc().equals("00")) {
            Affinity.info(this, false, oTPResponse.getMessage());
            this.f.setOTP("");
            return;
        }
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "", oTPResponse.getDate(), true, true, false, false));
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), true, true, false, false));
        this.l.set(2, new OnBoardTimeLineEntity(this.q, "", new Date(), false, true, false, false));
        this.m.refreshList(this.l);
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                OTPActivity.this.a0(str);
            }
        }, 1000L);
    }

    public void c0(View view) {
        h0();
        startActivityForResult(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"), 2374);
    }

    public void d0() {
        this.f.requestFocusOTP();
        this.f.performClick();
        g0(this.t, this.p);
    }

    public void e0(View view) {
        this.n.dismiss();
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                OTPActivity.this.d0();
            }
        }, 500L);
        h0();
    }

    public static Bundle getBundle(AuthActivity authActivity, String str, int i, int i2) {
        Bundle bundle = new Bundle();
        bundle.putAll(authActivity.getGPSBundle());
        bundle.putString("phone", str);
        bundle.putInt("state", i);
        bundle.putInt("is_wa", i2);
        return bundle;
    }

    public final void V(String str) {
        AuthHelper.doLoginv2(this, this.o, "", str, 2, this.p, new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                OTPActivity.this.J(i, (AuthHelper.LoginMessageNew) obj);
            }
        });
    }

    public final void g0(int i, final String str) {
        this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "tunggu sebentar ya...", new Date(), false, true, true, false));
        this.m.refreshList(this.l);
        if (i == 2) {
            AuthHelper.requestOTPv2(this, this.o, 2, str, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.Q(i2, (AuthHelper.OTPResponse) obj);
                }
            });
        } else if (i == 0 || i == 3) {
            AuthHelper.requestOTPv2(this, this.o, 0, str, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.S(i2, (AuthHelper.OTPResponse) obj);
                }
            });
        } else {
            AuthHelper.requestOTPv2(this, this.o, 1, str, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.O(str, i2, (AuthHelper.OTPResponse) obj);
                }
            });
        }
    }

    @Override
    public int getLayoutResource() {
        return R.layout.activity_otp;
    }

    @Override
    public int getRootLayoutId() {
        return 0;
    }

    public final void h0() {
        new b(60000L, 1000L).start();
    }

    public final void i0() {
        PackageManager packageManager = getPackageManager();
        packageManager.setComponentEnabledSetting(new ComponentName((Context) this, (Class<?>) BBNotificationService.class), 2, 1);
        packageManager.setComponentEnabledSetting(new ComponentName((Context) this, (Class<?>) BBNotificationService.class), 1, 1);
    }

    public final void j0(int i, final String str) {
        if (i == 2) {
            AuthHelper.validateOTPv2(this, this.o, str, 2, this.p, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.X(str, i2, (AuthHelper.OTPResponse) obj);
                }
            });
        } else if (i == 0 || i == 3) {
            AuthHelper.validateOTPv2(this, this.o, str, 0, this.p, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.Z(str, i2, (AuthHelper.OTPResponse) obj);
                }
            });
        } else {
            AuthHelper.validateOTPv2(this, this.o, str, 1, this.p, new BBCallback() {
                @Override
                public final void do_callback(int i2, Object obj) {
                    OTPActivity.this.b0(str, i2, (AuthHelper.OTPResponse) obj);
                }
            });
        }
    }

    public final void k0() {
        DialogPlus create = DialogPlus.newDialog(this).setContentHolder(new ViewHolder(View.inflate(this, R.layout.dialog_confirm_activate_notif, null))).setCancelable(false).setContentWidth(-1).setContentHeight(-2).setGravity(80).setContentBackgroundResource(R.drawable.panel_white_rounded_top1).create();
        this.n = create;
        create.show();
        View holderView = this.n.getHolderView();
        holderView.findViewById(R.id.confirm_notif_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                OTPActivity.this.c0(view);
            }
        });
        holderView.findViewById(R.id.confirm_notif_manual).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                OTPActivity.this.e0(view);
            }
        });
    }

    public void onActivityResult(int i, int i2, @Nullable Intent intent) {
        if (i != 2374) {
            super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(i, i2, intent);
        } else if (I(this)) {
            DialogPlus dialogPlus = this.n;
            if (dialogPlus != null) {
                dialogPlus.dismiss();
            }
            new Handler().postDelayed(new Runnable() {
                @Override
                public final void run() {
                    OTPActivity.this.K();
                }
            }, 500L);
        }
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == 2131365026) {
            this.e = "WhatsApp";
            this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading, "WhatsApp", this.o)));
            g0(this.t, this.e);
        } else if (view.getId() != 2131365025) {
            if (view.getId() == 2131366324) {
                Affinity.launch(this, LiveChatActivity.class);
            }
        } else {
            if (this.p.equalsIgnoreCase("call")) {
                this.e = "call";
                this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading_call, this.o)));
            } else {
                this.e = "SMS";
                this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading, "SMS", this.o)));
            }
            g0(this.t, this.e);
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        int i;
        super.onCreate(bundle);
        if (this.s == null) {
            this.s = "not:wa:otp";
        }
        if (bundle != null) {
            this.o = bundle.getString("phone", "");
            this.t = bundle.getInt("state", 1);
            i = bundle.getInt("is_wa", 0);
        } else if (getIntent().getExtras() != null) {
            Bundle extras = getIntent().getExtras();
            this.o = extras.getString("phone", "");
            this.t = extras.getInt("state", 1);
            int i2 = extras.getInt("is_wa", 0);
            this.s = extras.getString("wa:otp", "not:wa:otp");
            i = i2;
        } else {
            this.o = "";
            this.t = 1;
            i = 0;
        }
        StringBuilder sb = new StringBuilder();
        sb.append("onCreate: phone : ");
        sb.append(this.o);
        StringBuilder sb2 = new StringBuilder();
        sb2.append("onCreate: state : ");
        sb2.append(this.t);
        StringBuilder sb3 = new StringBuilder();
        sb3.append("onCreate: isWA : ");
        sb3.append(i);
        int color = ResourcesCompat.getColor(getResources(), R.color.colorTransparent, (Resources.Theme) null);
        Toolbar toolbar = this.bb_toolbar;
        if (toolbar != null) {
            toolbar.setBackgroundColor(color);
            this.bb_toolbar.setNavigationIcon(R.drawable.ic_chevron_left_primary_24dp);
            Drawable navigationIcon = this.bb_toolbar.getNavigationIcon();
            Objects.requireNonNull(navigationIcon);
            navigationIcon.setColorFilter(getResources().getColor(R.color.new_button_text_color), PorterDuff.Mode.SRC_ATOP);
            TextView textView = (TextView) findViewById(R.id.toolbar_title);
            int i3 = this.t;
            if (i3 == 2) {
                textView.setText(getString(R.string.bonjour_toolbar_login));
                this.q = "Masuk akun";
            } else if (i3 == 0 || i3 == 3) {
                this.q = "Buat PIN baru";
                textView.setText(getString(R.string.bonjour_toolbar_reset));
            } else {
                textView.setText(getString(R.string.bonjour_toolbar_register));
                this.q = "Isi data akun";
            }
        }
        if ((i == 0 && this.t == 2) || ((i == 0 && this.t == 3) || (i == 0 && this.t == 0))) {
            this.p = "SMS";
        } else if (i == 0 && this.t == 1) {
            this.p = "call";
        } else {
            this.p = "WhatsApp";
        }
        ArrayList<OnBoardTimeLineEntity> arrayList = new ArrayList<>();
        this.l = arrayList;
        arrayList.add(new OnBoardTimeLineEntity("Kirim kode otp", "tunggu sebentar ya...", new Date(), false, false, false, false));
        this.l.add(new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), false, false, false, false));
        this.l.add(new OnBoardTimeLineEntity(this.q, "", new Date(), false, false, false, false));
        OnBoardTimeLineAdapter onBoardTimeLineAdapter = new OnBoardTimeLineAdapter(this, this.l);
        this.m = onBoardTimeLineAdapter;
        onBoardTimeLineAdapter.setCallback(this);
        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.timeline_rv);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setNestedScrollingEnabled(false);
        recyclerView.setAdapter(this.m);
        this.j = (TextView) findViewById(R.id.otp_subheading_tv);
        this.h = (TextView) findViewById(R.id.otp_retry_wa);
        this.i = (TextView) findViewById(R.id.otp_retry_sms);
        if (this.p.equalsIgnoreCase("call")) {
            this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading_call, this.o)));
            this.h.setVisibility(8);
            this.i.setText("Missed Call");
        } else if (this.p.equalsIgnoreCase("sms")) {
            this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading, this.p, this.o)));
            this.h.setVisibility(8);
        } else {
            this.j.setText(Compat.Html_fromHtml(getString(R.string.bonjour_otp_subheading, this.p, this.o)));
            this.h.setVisibility(0);
        }
        this.f = findViewById(R.id.input_otp);
        findViewById(R.id.toolbar_help_container).setOnClickListener(this);
        BBNotificationService bBNotificationService = new BBNotificationService();
        if (this.s.equals("not:wa:otp")) {
            this.f.setOtpListener(this);
            bBNotificationService.setListener(this);
            new Handler().postDelayed(new Runnable() {
                @Override
                public final void run() {
                    OTPActivity.this.M();
                }
            }, 1000L);
        } else {
            findViewById(R.id.ly_retry_layout).setVisibility(8);
            this.f.setOTP("0912");
            this.l.set(0, new OnBoardTimeLineEntity("Kirim kode otp", "tunggu sebentar ya...", new Date(), false, true, true, false));
            this.m.refreshList(this.l);
            j0(this.t, this.s);
        }
        BBFourDigitReceiver bBFourDigitReceiver = new BBFourDigitReceiver();
        this.g = bBFourDigitReceiver;
        bBFourDigitReceiver.setFourDigitReceiverListener(new a());
    }

    public void onInteractionListener() {
    }

    public void onOTPComplete(String str) {
        this.l.set(1, new OnBoardTimeLineEntity("Verifikasi kode otp", "", new Date(), false, true, true, false));
        this.m.refreshList(this.l);
        j0(this.t, str);
    }

    public void onPause() {
        super/*androidx.fragment.app.FragmentActivity*/.onPause();
        try {
            BBFourDigitReceiver bBFourDigitReceiver = this.g;
            if (bBFourDigitReceiver != null) {
                unregisterReceiver(bBFourDigitReceiver);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void onResume() {
        super/*androidx.fragment.app.FragmentActivity*/.onResume();
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction("android.intent.action.last_four_digit");
        if (Build.VERSION.SDK_INT >= 33) {
            registerReceiver(this.g, intentFilter, 2);
        } else {
            registerReceiver(this.g, intentFilter);
        }
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                OTPActivity.this.N();
            }
        }, 500L);
    }

    @Override
    public void onfinish(boolean z) {
        if (Var.toBoolean(Boolean.valueOf(z), false)) {
            this.h.setOnClickListener(this);
            this.i.setOnClickListener(this);
            if (this.h.getVisibility() == 8) {
                this.i.setBackgroundResource(R.drawable.bb_background_gradient_round);
                this.i.setTextColor(getResources().getColor(R.color.White));
                return;
            } else {
                this.h.setBackgroundResource(R.drawable.bb_background_gradient_round);
                this.i.setBackgroundResource(R.drawable.panel_new_button_rounded_thin);
                this.i.setTextColor(getResources().getColor(R.color.new_button_text_color));
                return;
            }
        }
        this.h.setOnClickListener(null);
        this.i.setOnClickListener(null);
        if (this.h.getVisibility() == 8) {
            this.i.setBackgroundResource(R.drawable.panel_smoke_rounded_4dp);
            this.i.setTextColor(getResources().getColor(R.color.White));
        } else {
            this.h.setBackgroundResource(R.drawable.panel_smoke_rounded_4dp);
            this.i.setBackgroundResource(R.drawable.panel_white_rounded);
            this.i.setTextColor(getResources().getColor(R.color.LightGrey));
        }
    }

    @Override
    public void sendEvent(String str, String str2, String str3, String str4, ArrayList<String> arrayList) {
        if (str4.contains(":")) {
            final String trim = str4.split("#")[1].trim();
            new Handler(Looper.getMainLooper()).post(new Runnable() {
                @Override
                public final void run() {
                    OTPActivity.this.U(trim);
                }
            });
        }
    }

    public static Bundle getBundle(String str, int i, int i2, String str2) {
        Bundle bundle = new Bundle();
        bundle.putString("phone", str);
        bundle.putInt("state", i);
        bundle.putInt("is_wa", i2);
        bundle.putString("wa:otp", str2);
        return bundle;
    }
}