导航菜单

页面标题

页面副标题

SpeedCash v6.5.1482 - ProfileFragment.java 源代码

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

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


package com.bm.sc.bebasbayar.ui.fragment.home;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyPermanentlyInvalidatedException;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.biometric.BiometricPrompt;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.andrognito.patternlockview.PatternLockView;
import com.andrognito.patternlockview.listener.PatternLockViewListener;
import com.andrognito.patternlockview.utils.PatternLockUtils;
import com.astuetz.PagerSlidingTabStrip;
import com.bm.sc.auth.ui.dialog.UploadFotoProfileFragment;
import com.bm.sc.auth.ui.points.PointsActivity;
import com.bm.sc.bebasbayar.BuildConfig;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.adapter.BaseAdapter;
import com.bm.sc.bebasbayar.adapter.DrawerAdapter;
import com.bm.sc.bebasbayar.adapter.entity.DocumentEntity;
import com.bm.sc.bebasbayar.adapter.entity.MenuListEntity;
import com.bm.sc.bebasbayar.adapter.entity.ProdukListEntity;
import com.bm.sc.bebasbayar.handler.FirebaseProcessor;
import com.bm.sc.bebasbayar.handler.MessageComposer;
import com.bm.sc.bebasbayar.handler.MessageSender;
import com.bm.sc.bebasbayar.handler.QRISO;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.iface.AdapterInvoker;
import com.bm.sc.bebasbayar.iface.BBCallback;
import com.bm.sc.bebasbayar.iface.MessageProcess;
import com.bm.sc.bebasbayar.message.APIMessage;
import com.bm.sc.bebasbayar.message.BaseMessage;
import com.bm.sc.bebasbayar.message.api.APIMessageWrapper;
import com.bm.sc.bebasbayar.message.mp.DetailMessage;
import com.bm.sc.bebasbayar.message.qr.DataMessage;
import com.bm.sc.bebasbayar.setting.ApiConfig;
import com.bm.sc.bebasbayar.setting.ProfileConfig;
import com.bm.sc.bebasbayar.setting.session.AppSession;
import com.bm.sc.bebasbayar.setting.session.ConfigSession;
import com.bm.sc.bebasbayar.setting.session.DataSession;
import com.bm.sc.bebasbayar.ui.LockActivity;
import com.bm.sc.bebasbayar.ui.activity.account.AlatPromosiActivity;
import com.bm.sc.bebasbayar.ui.activity.account.DetailAccountActivity;
import com.bm.sc.bebasbayar.ui.activity.account.KYCActivity;
import com.bm.sc.bebasbayar.ui.activity.account.KYCNewKtpActivity;
import com.bm.sc.bebasbayar.ui.activity.info.OpenWebViewActivity;
import com.bm.sc.bebasbayar.ui.fragment.BaseFragment;
import com.bm.sc.bebasbayar.ui.fragment.home.ProfileFragment;
import com.bm.sc.util.android.Compat;
import com.bm.sc.util.android.Device;
import com.bm.sc.util.common.Var;
import com.bm.sc.util.format.Encrypt;
import com.bm.sc.util.format.Locales;
import com.bm.sc.util.format.Mapper;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.orhanobut.dialogplus.DialogPlus;
import com.orhanobut.dialogplus.OnCancelListener;
import com.orhanobut.dialogplus.OnDismissListener;
import com.orhanobut.dialogplus.ViewHolder;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Objects;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import org.jetbrains.annotations.NotNull;

public class ProfileFragment extends BaseFragment implements AdapterInvoker<ProdukListEntity>, CompoundButton.OnCheckedChangeListener, DrawerAdapter.OnMenuItemClickListener, PatternLockViewListener, SwipeRefreshLayout.OnRefreshListener {
    public static final String DOC_KET_KEY = "bundle:doc:ket";
    public static final String IS_UPLOAD_ALLOWED_KEY = "bundle:doc:allowed";
    public static final String POPULATED_DATA_CODE_KEY = "bundle:upl:code";
    public static final String POPULATED_DATA_STATE_KEY = "bundle:upl:state";
    public static final String POPULATED_DATA_UPL_KEY = "bundle:upl";
    public Button A;
    public Button B;
    public ProgressBar C;
    public RecyclerView D;
    public DrawerAdapter E;
    public SwipeRefreshLayout F;
    public ConfigSession G;
    public AppSession H;
    public DataSession I;
    public ArrayList<DocumentEntity> K;
    public NestedScrollView L;
    public String M;
    public KeyStore N;
    public Cipher O;
    public BiometricPrompt P;
    public PatternLockView Q;
    public boolean R;
    public String W;
    public String X;
    public LinearLayout c;
    public Bundle d;
    public CardView e;
    public CardView f;
    public View g;
    public View h;
    public View i;
    public View j;
    public TextView k;
    public TextView l;
    public TextView m;
    public TextView n;
    public TextView o;
    public TextView p;
    public TextView q;
    public TextView r;
    public ImageView s;
    public ImageView t;
    public ImageView u;
    public ImageView v;
    public ImageView w;
    public ImageView x;
    public Button y;
    public Button z;
    public final String TAG = ProfileFragment.class.getSimpleName();
    public HashMap<String, String> J = new HashMap<>();
    public int S = 0;
    public String T = "https://www.speedcash.co.id/";
    public String U = "https://www.speedcash.co.id/";
    public String V = "https://www.speedcash.co.id/";
    public String Y = "";

    public class a implements Animation.AnimationListener {
        public final String a;
        public final View b;

        public a(String str, View view) {
            this.a = str;
            this.b = view;
        }

        @Override
        public void onAnimationEnd(Animation animation) {
            if (this.a.equals("fade_out") || this.a.equals("slide_out_down")) {
                this.b.setVisibility(8);
            } else if (this.a.equals("fade_in") || this.a.equals("slide_down")) {
                this.b.setVisibility(0);
            }
        }

        @Override
        public void onAnimationRepeat(Animation animation) {
        }

        @Override
        public void onAnimationStart(Animation animation) {
        }
    }

    public class b implements RequestListener<Bitmap> {
        public final String a;

        public b(String str) {
            this.a = str;
        }

        public void c(String str) {
            ProfileFragment.this.I0(str);
        }

        public void d(Bitmap bitmap) {
            ProfileFragment.this.s.setImageBitmap(bitmap);
            ProfileFragment.this.s.setVisibility(0);
            ProfileFragment.this.n.setVisibility(8);
        }

        public boolean onResourceReady(final Bitmap bitmap, Object obj, Target<Bitmap> target, DataSource dataSource, boolean z) {
            new Handler(Looper.getMainLooper()).post(new Runnable() {
                @Override
                public final void run() {
                    ProfileFragment.b.this.d(bitmap);
                }
            });
            return false;
        }

        public boolean onLoadFailed(@Nullable GlideException glideException, Object obj, Target<Bitmap> target, boolean z) {
            Handler handler = new Handler(Looper.getMainLooper());
            final String str = this.a;
            handler.post(new Runnable() {
                @Override
                public final void run() {
                    ProfileFragment.b.this.c(str);
                }
            });
            return false;
        }
    }

    public class c implements MessageProcess {
        public c() {
        }

        @Override
        public void afterProcess(BaseMessage baseMessage) {
            APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(baseMessage);
            if (aPIMessageWrapper.isOK()) {
                int size = aPIMessageWrapper.getData().size();
                if (ProfileFragment.this.E != null) {
                    ProfileFragment.this.E.updateMyVoucher(size);
                }
            }
        }

        @Override
        public void backgroundProcess(long j, long j2, boolean z) {
        }

        @Override
        public void preProcess() {
        }
    }

    public class d implements MessageProcess {
        public d() {
        }

        @Override
        public void afterProcess(BaseMessage baseMessage) {
            APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(baseMessage);
            ArrayList arrayList = (ArrayList) aPIMessageWrapper.getMap().get("data");
            ProfileFragment.this.W = Var.toString(((HashMap) arrayList.get(0)).get("transfer_desc"), "");
            ProfileFragment.this.Y = Var.toString(((HashMap) arrayList.get(0)).get("account_desc"), "");
            ProfileFragment.this.X = Var.toString(((HashMap) arrayList.get(0)).get("transfer_title"), "");
            if (aPIMessageWrapper.isOK()) {
                ProfileFragment.this.updateStatusSCPlus("berhasil");
                ProfileFragment.this.I.store(DataSession.KEY_IS_SUDAH_PROSES_KYC, String.valueOf(true));
                ProfileFragment.this.I.store(DataSession.KEY_KYC_DOCUMENT_STATUS, String.valueOf(aPIMessageWrapper.getResponse_code()));
            } else {
                String response_code = aPIMessageWrapper.getResponse_code();
                response_code.hashCode();
                if (response_code.equals(QRISO.POI_METHOD_STATIC)) {
                    ProfileFragment.this.updateStatusSCPlus("awal");
                    ProfileFragment.this.I.store(DataSession.KEY_IS_SUDAH_PROSES_KYC, String.valueOf(false));
                    ProfileFragment.this.I.store(DataSession.KEY_KYC_DOCUMENT_STATUS, String.valueOf(aPIMessageWrapper.getResponse_code()));
                } else if (response_code.equals("13")) {
                    ProfileFragment.this.updateStatusSCPlus("gagal");
                    ProfileFragment.this.I.store(DataSession.KEY_IS_SUDAH_PROSES_KYC, String.valueOf(false));
                    ProfileFragment.this.I.store(DataSession.KEY_KYC_DOCUMENT_STATUS, String.valueOf(aPIMessageWrapper.getResponse_code()));
                } else {
                    ProfileFragment.this.updateStatusSCPlus("gagal");
                }
            }
            if (aPIMessageWrapper.getResponse_code().isEmpty()) {
                return;
            }
            ProfileFragment.this.b0(aPIMessageWrapper.getResponse_code());
        }

        @Override
        public void backgroundProcess(long j, long j2, boolean z) {
        }

        @Override
        public void preProcess() {
        }
    }

    public class e implements MessageProcess {
        public final String a;

        public e(String str) {
            this.a = str;
        }

        @Override
        public void afterProcess(BaseMessage baseMessage) {
            if (ProfileFragment.this.isViewDestroyed()) {
                return;
            }
            DetailMessage detailMessage = new DetailMessage(baseMessage);
            if (detailMessage.isOK()) {
                HashMap hashMap = new HashMap();
                hashMap.put("ibu_kandung", detailMessage.getValueFromAdditional_data(14));
                hashMap.put("pekerjaan", detailMessage.getValueFromAdditional_data(39));
                hashMap.put("jenis_usaha", detailMessage.getValueFromAdditional_data(38));
                hashMap.put("ym", detailMessage.getValueFromAdditional_data(18));
                hashMap.put("gtalk", detailMessage.getValueFromAdditional_data(19));
                hashMap.put("whatsapp", detailMessage.getValueFromAdditional_data(22));
                hashMap.put("telegram", detailMessage.getValueFromAdditional_data(37));
                hashMap.put("bbm", detailMessage.getValueFromAdditional_data(34));
                ProfileFragment.this.H.store(AppSession.PROPERTY_OWNER_NAME, detailMessage.getValueFromAdditional_data(0));
                ProfileFragment.this.H.store(AppSession.PROPERTY_MERCHANT_NAME, detailMessage.getValueFromAdditional_data(7));
                ProfileFragment.this.H.store(AppSession.PROPERTY_LEVEL, detailMessage.getValueFromAdditional_data(16));
                ProfileFragment.this.H.store(AppSession.PROPERTY_GENDER, detailMessage.getValueFromAdditional_data(35));
                ProfileFragment.this.H.store(AppSession.PROPERTY_HANDPHONE, detailMessage.getValueFromAdditional_data(5));
                ProfileFragment.this.H.store(AppSession.PROPERTY_EMAIL, detailMessage.getValueFromAdditional_data(11));
                ProfileFragment.this.H.store(AppSession.PROPERTY_ADDRESS, detailMessage.getValueFromAdditional_data(1));
                ProfileFragment.this.H.store(AppSession.PROPERTY_PROVINCE, detailMessage.getValueFromAdditional_data(4));
                ProfileFragment.this.H.store(AppSession.PROPERTY_CITY, detailMessage.getValueFromAdditional_data(3));
                ProfileFragment.this.H.store(AppSession.PROPERTY_POSTCODE, detailMessage.getValueFromAdditional_data(2));
                String str = "0";
                String replaceFirst = ProfileFragment.this.H.retrieve(AppSession.PROPERTY_HANDPHONE).replaceFirst("^62", "0");
                ProfileFragment.this.k.setText(ProfileFragment.this.H.retrieve(AppSession.PROPERTY_OWNER_NAME));
                ProfileFragment.this.l.setText(replaceFirst);
                Bundle bundle = new Bundle();
                ArrayList arrayList = new ArrayList();
                ArrayList<String> arrayList2 = new ArrayList<>();
                ProfileFragment.this.K = new ArrayList();
                Iterator<HashMap> it = detailMessage.getData_detail().iterator();
                String str2 = "";
                String str3 = str2;
                while (it.hasNext()) {
                    HashMap next = it.next();
                    HashMap hashMap2 = new HashMap();
                    DocumentEntity documentEntity = new DocumentEntity();
                    Iterator<HashMap> it2 = it;
                    String str4 = str;
                    String replaceAll = Var.toString(next.get("status"), str).replaceAll("[^0-9]", "");
                    String var = Var.toString(next.get("kode_dokumen"), "");
                    HashMap hashMap3 = hashMap;
                    String var2 = Var.toString(next.get("nama_dokumen"), "");
                    String str5 = str3;
                    String var3 = Var.toString(next.get("id"), "");
                    String str6 = str2;
                    String var4 = Var.toString(next.get("ket_verifikasi"), "");
                    documentEntity.setId(var3);
                    documentEntity.setKet_verifikasi(var4);
                    documentEntity.setNama_dokumen(var2);
                    documentEntity.setKode_dokumen(var);
                    documentEntity.setStatus(replaceAll);
                    ProfileFragment.this.K.add(documentEntity);
                    arrayList2.add(var);
                    arrayList.add(replaceAll);
                    String str7 = ProfileFragment.this.TAG;
                    StringBuilder sb = new StringBuilder();
                    sb.append("afterProcess: ASDASD : ");
                    sb.append(replaceAll);
                    sb.append(" - ");
                    sb.append(var4);
                    sb.append(" - ");
                    sb.append(var);
                    if (documentEntity.getId().equals("1")) {
                        str6 = replaceAll;
                        str3 = str5;
                    } else {
                        str3 = replaceAll;
                    }
                    bundle.putSerializable(ProfileFragment.POPULATED_DATA_UPL_KEY, hashMap2);
                    ProfileFragment.this.J = hashMap2;
                    ProfileFragment.this.M = var4;
                    it = it2;
                    str = str4;
                    hashMap = hashMap3;
                    str2 = str6;
                }
                String str8 = str2;
                String str9 = str3;
                ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_EDIT_ALLOWED_KEY, detailMessage.isOK());
                ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_IDCARD_VALID_KEY, str8.equals("1"));
                ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_IDCARD_WAIT_KEY, str8.equals("3"));
                ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_SELFIE_VALID_KEY, str9.equals("1"));
                ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_SELFIE_WAIT_KEY, str9.equals("3"));
                ProfileFragment.this.d.putSerializable(ProfileFragment.POPULATED_DATA_UPL_KEY, ProfileFragment.this.J);
                ProfileFragment.this.d.putString(ProfileFragment.DOC_KET_KEY, ProfileFragment.this.M);
                ProfileFragment.this.d.putStringArrayList(ProfileFragment.POPULATED_DATA_CODE_KEY, arrayList2);
                ProfileFragment.this.d.putSerializable(ProfileFragment.POPULATED_DATA_STATE_KEY, ProfileFragment.this.K);
                ProfileFragment.this.d.putStringArrayList(DetailAccountActivity.POPULATED_ADD_DATA_KEY, detailMessage.getAdditional_datas());
                ProfileFragment.this.d.putSerializable(DetailAccountActivity.POPULATED_ADD_DATA_ACCOUNT, hashMap);
            }
            if (this.a.equals(QRISO.POI_METHOD_STATIC)) {
                ProfileFragment.this.updateStatusSCPlus("awal");
            } else if (this.a.equals("13")) {
                ProfileFragment.this.updateStatusSCPlus("gagal");
            } else if (this.a.equals("00")) {
                ProfileFragment.this.updateStatusSCPlus("berhasil");
            }
        }

        @Override
        public void backgroundProcess(long j, long j2, boolean z) {
        }

        @Override
        public void preProcess() {
            ProfileFragment.this.d.putBoolean(DetailAccountActivity.IS_EDIT_ALLOWED_KEY, false);
        }
    }

    public class f extends BiometricPrompt.AuthenticationCallback {
        public final BBCallback a;

        public f(BBCallback bBCallback) {
            this.a = bBCallback;
        }

        public void b(int i, Boolean bool) {
            if (!bool.booleanValue()) {
                ProfileFragment.this.P.cancelAuthentication();
            } else {
                ProfileFragment.this.startActivityForResult(new Intent("android.settings.SETTINGS"), 11111);
            }
        }

        public void onAuthenticationError(int i, @NonNull CharSequence charSequence) {
            super.onAuthenticationError(i, charSequence);
            Affinity.toast(ProfileFragment.this.getActivity(), charSequence.toString());
            if (i == 13) {
                this.a.do_callback(1, Boolean.FALSE);
            }
            ProfileFragment.this.R = true;
            if (i == 11) {
                Affinity.confirm(ProfileFragment.this.getActivity(), ProfileFragment.this.getString(R.string.title_warning), ProfileFragment.this.getString(R.string.title_lock_finger3), new BBCallback() {
                    @Override
                    public final void do_callback(int i2, Object obj) {
                        ProfileFragment.f.this.b(i2, (Boolean) obj);
                    }
                });
            }
        }

        public void onAuthenticationFailed() {
            super.onAuthenticationFailed();
        }

        public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult authenticationResult) {
            super.onAuthenticationSucceeded(authenticationResult);
            ProfileFragment.this.H.remove(AppSession.PROPERTY_FINGERPRINT);
            ProfileFragment.this.R = false;
            this.a.do_callback(1, Boolean.TRUE);
        }
    }

    public class g extends BiometricPrompt.AuthenticationCallback {
        public final BBCallback a;

        public g(BBCallback bBCallback) {
            this.a = bBCallback;
        }

        public void b(int i, Boolean bool) {
            if (!bool.booleanValue()) {
                ProfileFragment.this.P.cancelAuthentication();
            } else {
                ProfileFragment.this.startActivityForResult(new Intent("android.settings.SETTINGS"), 11111);
            }
        }

        public void onAuthenticationError(int i, @NonNull CharSequence charSequence) {
            super.onAuthenticationError(i, charSequence);
            Affinity.toast(ProfileFragment.this.getActivity(), charSequence.toString());
            if (i == 13) {
                this.a.do_callback(1, Boolean.FALSE);
            }
            ProfileFragment.this.R = false;
            if (i == 11) {
                Affinity.confirm(ProfileFragment.this.getActivity(), ProfileFragment.this.getString(R.string.title_warning), ProfileFragment.this.getString(R.string.title_lock_finger3), new BBCallback() {
                    @Override
                    public final void do_callback(int i2, Object obj) {
                        ProfileFragment.g.this.b(i2, (Boolean) obj);
                    }
                });
            }
        }

        public void onAuthenticationFailed() {
            super.onAuthenticationFailed();
        }

        public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult authenticationResult) {
            super.onAuthenticationSucceeded(authenticationResult);
            ProfileFragment.this.H.store(AppSession.PROPERTY_FINGERPRINT, BuildConfig.PREF_KEY);
            ProfileFragment.this.R = true;
            this.a.do_callback(1, Boolean.TRUE);
        }
    }

    public class h implements MessageProcess {
        public h() {
        }

        @Override
        public void afterProcess(BaseMessage baseMessage) {
            APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(baseMessage);
            if (aPIMessageWrapper.isOK()) {
                ProfileFragment.this.E.updateMyListCart(Integer.parseInt(Var.toString(aPIMessageWrapper.getData().get(0).get(APIMessage.INDEX_TOTAL), "0")));
            } else if (aPIMessageWrapper.getResponse_code().equals(MessageSender.DISCONNECT_INTERNET)) {
                Affinity.info(ProfileFragment.this.getBaseActivity(), false, ProfileFragment.this.getString(R.string.error_connection_offline));
            } else {
                Affinity.info(ProfileFragment.this.getActivity(), false, Var.toString(aPIMessageWrapper.getResponse_description(), ""));
            }
        }

        @Override
        public void backgroundProcess(long j, long j2, boolean z) {
        }

        @Override
        public void preProcess() {
        }
    }

    public void A0(int i, String str) {
        if (str == null || str.isEmpty() || Var.toString(str, "null").equalsIgnoreCase("null")) {
            return;
        }
        LinkedHashMap<String, Object> jsonToMap = Mapper.jsonToMap(str);
        this.T = Var.toString(jsonToMap.get("facebook"), "");
        this.U = Var.toString(jsonToMap.get("instagram"), "");
        this.V = Var.toString(jsonToMap.get("tik_tok"), "");
    }

    public void B0(View view) {
        J0();
    }

    public void C0(View view) {
        J0();
    }

    public void D0(View view) {
        this.c.setVisibility(8);
    }

    public static void h0(DialogPlus dialogPlus) {
    }

    public void i0(View view) {
        Affinity.logout(requireActivity(), true);
    }

    public void k0(DialogPlus dialogPlus) {
        this.R = true;
    }

    public void l0(DialogPlus dialogPlus, BBCallback bBCallback, View view) {
        dialogPlus.dismiss();
        this.R = true;
        bBCallback.do_callback(1, Boolean.FALSE);
    }

    public void m0(BBCallback bBCallback, int i, Boolean bool) {
        if (bool.booleanValue()) {
            this.R = true;
            bBCallback.do_callback(1, Boolean.FALSE);
            startActivity(new Intent("android.settings.SETTINGS"));
        }
    }

    public void n0(DialogPlus dialogPlus, final BBCallback bBCallback, View view) {
        dialogPlus.dismiss();
        if (Device.isFingerprintAuthAvailable(getBaseActivity())) {
            Z(bBCallback);
        } else {
            Affinity.info(getBaseActivity(), 2, getString(R.string.title_warning), getString(R.string.title_lock_finger3), new BBCallback() {
                @Override
                public final void do_callback(int i, Object obj) {
                    ProfileFragment.this.m0(bBCallback, i, (Boolean) obj);
                }
            });
        }
    }

    public void p0(View view) {
        Affinity.logout(getBaseActivity(), true);
    }

    public void q0(BBCallback bBCallback, int i, Boolean bool) {
        if (bool.booleanValue()) {
            startActivityForResult(new Intent("android.settings.SETTINGS"), 11111);
            return;
        }
        this.P.cancelAuthentication();
        this.R = true;
        bBCallback.do_callback(1, Boolean.FALSE);
    }

    public void r0(BBCallback bBCallback, int i, Boolean bool) {
        if (bool.booleanValue()) {
            startActivityForResult(new Intent("android.settings.SETTINGS"), 11111);
            return;
        }
        this.P.cancelAuthentication();
        this.R = false;
        bBCallback.do_callback(1, Boolean.FALSE);
    }

    public void s0(int i, Boolean bool) {
        AppSession appSession;
        bool.booleanValue();
        if (this.p == null || (appSession = this.H) == null) {
            return;
        }
        this.p.setText(Locales.moneyNoFraction(appSession.retrieve(AppSession.PROPERTY_POIN)).replace("Rp", ""));
    }

    public void t0() {
        this.L.requestFocus();
        this.L.scrollTo(0, 0);
    }

    public void u0(View view) {
        Affinity.launch(getActivity(), PointsActivity.class, null);
    }

    public static void x0(DialogPlus dialogPlus, Activity activity, Class cls, Bundle bundle, View view) {
        dialogPlus.dismiss();
        Affinity.launch(activity, cls, bundle);
    }

    public static void y0(String str, String str2) {
    }

    public void z0(int i, String str) {
        if (str == null || str.isEmpty() || Var.toString(str, "null").equalsIgnoreCase("null")) {
            return;
        }
        LinkedHashMap<String, Object> jsonToMap = Mapper.jsonToMap(str);
        this.T = Var.toString(jsonToMap.get("facebook"), "");
        this.U = Var.toString(jsonToMap.get("instagram"), "");
        this.V = Var.toString(jsonToMap.get("tik_tok"), "");
    }

    public final void E0(String str, String str2) {
        this.s.setVisibility(0);
        this.n.setVisibility(8);
        String encryptStr = Encrypt.encryptStr(this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID), Encrypt.KEY_UPLOAD_FOTO_PROFILE);
        String str3 = str + "profile/" + this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID);
        try {
            str3 = str + "profile/" + URLEncoder.encode(encryptStr, "UTF-8");
        } catch (UnsupportedEncodingException e2) {
            StringBuilder sb = new StringBuilder();
            sb.append("encode str error");
            sb.append(e2.getMessage());
        }
        Glide.with(this).asBitmap().load(str3).apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true).dontAnimate().override(300, 300).placeholder(R.drawable.ic_jay_user_icon).error(R.drawable.ic_jay_user_icon)).apply(RequestOptions.circleCropTransform()).addListener(new b(str2)).into(this.s);
    }

    public final void F0() {
        this.H.store("prop:app:merchantid_currentStep", String.valueOf(this.S));
    }

    public final void G0() {
        String e0 = e0(this.H.retrieve(AppSession.PROPERTY_OWNER_NAME));
        String replaceFirst = this.H.retrieve(AppSession.PROPERTY_HANDPHONE).replaceFirst("^62", "0");
        this.k.setText(this.H.retrieve(AppSession.PROPERTY_OWNER_NAME));
        this.l.setText(replaceFirst);
        this.m.setText("ID SpeedCash : " + this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID));
        String retrieveMap = this.G.retrieveMap(ConfigSession.PROPERTY_URL, ConfigSession.KEY_URL_SC_IMAGE);
        if (retrieveMap == null || retrieveMap.isEmpty()) {
            I0(e0);
        } else {
            E0(retrieveMap, e0);
        }
    }

    public final void H0(View view) {
        RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.bb_drawer_list);
        this.D = recyclerView;
        recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
        ProfileConfig.renewMenu(requireActivity());
        DrawerAdapter drawerAdapter = new DrawerAdapter(ProfileConfig.getListProfileMenu(requireActivity(), this.H.isTesterUser()), this, getActivity());
        this.E = drawerAdapter;
        this.D.setAdapter(drawerAdapter);
    }

    public final void I0(String str) {
        this.s.setVisibility(8);
        this.n.setText(str);
        this.n.setVisibility(0);
    }

    public final void J0() {
        Intent intent = Var.toBoolean(this.G.retrieveMap(ConfigSession.PROPERTY_CUSTOM_CONFIG, ConfigSession.KEY_USE_NEW_KYC_BIGVISION), true) ? new Intent((Context) getActivity(), (Class<?>) KYCNewKtpActivity.class) : new Intent((Context) getActivity(), (Class<?>) KYCActivity.class);
        intent.putExtras(this.d);
        startActivityForResult(intent, 12888);
    }

    public final void T(View view, String str) {
        str.hashCode();
        Animation loadAnimation = !str.equals("slide_out_down") ? !str.equals("fade_out") ? null : AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out) : AnimationUtils.loadAnimation(getActivity(), R.anim.slide_out_down);
        loadAnimation.setAnimationListener(new a(str, view));
        view.startAnimation(loadAnimation);
    }

    public final void U() {
        MessageComposer messageComposer = new MessageComposer(10, "api/v1/transaction/resume");
        messageComposer.setRequest_method(MessageComposer.GET);
        messageComposer.setData_type(2);
        messageComposer.addMessage("user_id", this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID));
        messageComposer.addMessage(DataMessage.ID_OUTLET, this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID));
        messageComposer.addMessage("user_uuid", Device.getDeviceUUID(getActivity()).toString());
        messageComposer.addMessage(BaseMessage.INDEX_VIA, "BB ANDROID");
        messageComposer.setShowProgressRegular(false);
        messageComposer.setIs_encrypted(false);
        messageComposer.setMessageProcess(new h());
        new MessageSender(getActivity(), messageComposer).execute();
    }

    @TargetApi(23)
    public final boolean V() {
        try {
            this.O = Cipher.getInstance("AES/CBC/PKCS7Padding");
            try {
                this.N.load(null);
                this.O.init(1, (SecretKey) this.N.getKey("JogjaKita", null));
                return true;
            } catch (KeyPermanentlyInvalidatedException unused) {
                return false;
            } catch (IOException e2) {
                e = e2;
                throw new RuntimeException("Failed to init Cipher", e);
            } catch (InvalidKeyException e3) {
                e = e3;
                throw new RuntimeException("Failed to init Cipher", e);
            } catch (KeyStoreException e4) {
                e = e4;
                throw new RuntimeException("Failed to init Cipher", e);
            } catch (NoSuchAlgorithmException e5) {
                e = e5;
                throw new RuntimeException("Failed to init Cipher", e);
            } catch (UnrecoverableKeyException e6) {
                e = e6;
                throw new RuntimeException("Failed to init Cipher", e);
            } catch (CertificateException e7) {
                e = e7;
                throw new RuntimeException("Failed to init Cipher", e);
            }
        } catch (NoSuchAlgorithmException | NoSuchPaddingException e8) {
            throw new RuntimeException("Failed to get Cipher!", e8);
        }
    }

    public final void W(boolean z) {
        if (!this.H.retrieve(AppSession.PROPERTY_SMARTLOCK_PROPERTIES).isEmpty()) {
            Affinity.purge(getActivity(), LockActivity.class, LockActivity.getBundle(this.H.isFingerSet(), this.H.retrieve(AppSession.PROPERTY_SMARTLOCK_PROPERTIES)));
            try {
                Toast makeText = Toast.makeText((Context) getActivity(), (CharSequence) getString(R.string.berhasil_dikunci), 1);
                makeText.setGravity(17, 0, 0);
                makeText.show();
                return;
            } catch (Exception e2) {
                e2.toString();
                return;
            }
        }
        View inflate = LayoutInflater.from(getActivity()).inflate(R.layout.widget_input_lock_pattern_dialog, (ViewGroup) null, false);
        PatternLockView patternLockView = (PatternLockView) inflate.findViewById(R.id.pattern_lock_view);
        this.Q = patternLockView;
        patternLockView.addPatternLockListener(this);
        buildUiPatternLock();
        final DialogPlus create = DialogPlus.newDialog(requireActivity()).setContentHolder(new ViewHolder(inflate)).setContentWidth(-1).setContentHeight(-2).setCancelable(false).setOnDismissListener(new OnDismissListener() {
            public final void onDismiss(DialogPlus dialogPlus) {
                ProfileFragment.h0(dialogPlus);
            }
        }).setContentBackgroundResource(R.color.colorTransparent).setGravity(17).create();
        create.show();
        View holderView = create.getHolderView();
        View findViewById = holderView.findViewById(R.id.button_cancel);
        View findViewById2 = holderView.findViewById(R.id.button_logout);
        if (z) {
            findViewById2.setVisibility(0);
            findViewById2.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ProfileFragment.this.i0(view);
                }
            });
        } else {
            findViewById2.setVisibility(8);
        }
        findViewById.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                create.dismiss();
            }
        });
    }

    public final void X(final BBCallback<Boolean> bBCallback) {
        final DialogPlus create = DialogPlus.newDialog(getBaseActivity()).setContentHolder(new ViewHolder(View.inflate(getActivity(), R.layout.dialog_off_quick_login, null))).setCancelable(false).setOnCancelListener(new OnCancelListener() {
            public final void onCancel(DialogPlus dialogPlus) {
                ProfileFragment.this.k0(dialogPlus);
            }
        }).setContentWidth(-1).setContentHeight(-2).setGravity(80).setContentBackgroundResource(R.drawable.border_thin).create();
        create.show();
        View holderView = create.getHolderView();
        holderView.findViewById(R.id.btn_quick_login).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ProfileFragment.this.l0(create, bBCallback, view);
            }
        });
        holderView.findViewById(R.id.btn_turn_off).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ProfileFragment.this.n0(create, bBCallback, view);
            }
        });
    }

    public final void Y() {
        final DialogPlus create = DialogPlus.newDialog(getBaseActivity()).setGravity(17).setContentHolder(new ViewHolder(View.inflate(getActivity(), R.layout.dialog_quick_login, null))).setCancelable(true).setContentWidth(-1).setContentHeight(-2).setGravity(80).setContentBackgroundResource(R.drawable.border_thin).create();
        create.show();
        View holderView = create.getHolderView();
        holderView.findViewById(R.id.btn_quick_login).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                create.dismiss();
            }
        });
        holderView.findViewById(R.id.btn_logout).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ProfileFragment.this.p0(view);
            }
        });
    }

    public final void Z(final BBCallback<Boolean> bBCallback) {
        this.P = new BiometricPrompt(getBaseActivity(), ContextCompat.getMainExecutor(getBaseActivity()), new f(bBCallback));
        BiometricPrompt.PromptInfo build = new BiometricPrompt.PromptInfo.Builder().setTitle(getString(R.string.label_dialog_login_title)).setSubtitle(getString(R.string.label_dialog_login_subtitle)).setNegativeButtonText("Kembali").build();
        if (Affinity.checkFingerprint(getActivity()) != 0 && Affinity.checkFingerprint(getActivity()) != -1) {
            if (Affinity.checkFingerprint(getActivity()) == 11) {
                Affinity.confirm(getActivity(), getString(R.string.title_warning), getString(R.string.title_lock_finger3), new BBCallback() {
                    @Override
                    public final void do_callback(int i, Object obj) {
                        ProfileFragment.this.q0(bBCallback, i, (Boolean) obj);
                    }
                });
            }
        } else {
            c0();
            if (V()) {
                this.P.authenticate(build, new BiometricPrompt.CryptoObject(this.O));
            }
        }
    }

    public final void a0(final BBCallback<Boolean> bBCallback) {
        this.P = new BiometricPrompt(getBaseActivity(), ContextCompat.getMainExecutor(getBaseActivity()), new g(bBCallback));
        BiometricPrompt.PromptInfo build = new BiometricPrompt.PromptInfo.Builder().setTitle(getString(R.string.label_dialog_login_title)).setSubtitle(getString(R.string.label_dialog_login_subtitle)).setNegativeButtonText("Kembali").build();
        if (Affinity.checkFingerprint(getActivity()) != 0 && Affinity.checkFingerprint(getActivity()) != -1) {
            if (Affinity.checkFingerprint(getActivity()) == 11) {
                Affinity.confirm(getActivity(), getString(R.string.title_warning), getString(R.string.title_lock_finger3), new BBCallback() {
                    @Override
                    public final void do_callback(int i, Object obj) {
                        ProfileFragment.this.r0(bBCallback, i, (Boolean) obj);
                    }
                });
            }
        } else {
            c0();
            if (V()) {
                this.P.authenticate(build, new BiometricPrompt.CryptoObject(this.O));
            }
        }
    }

    @Override
    public void adapterResult(BaseAdapter baseAdapter, ProdukListEntity produkListEntity, int i) {
    }

    public final void b0(String str) {
        DetailMessage detailMessage = new DetailMessage(this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID), this.H.retrieve(AppSession.PROPERTY_MERCHANT_PIN), this.H.retrieve(AppSession.PROPERTY_AUTH_TOKEN));
        detailMessage.setProductCode(DetailMessage.INC_PRODUCT_CODE_ACCOUNT);
        MessageComposer messageComposer = new MessageComposer(1, "");
        messageComposer.setRequest_method(MessageComposer.POST);
        messageComposer.setData_type(1);
        messageComposer.setIs_credential(true);
        messageComposer.setShowProgressRegular(false);
        messageComposer.setIs_encrypted(true);
        messageComposer.setIs_cacheable(true);
        messageComposer.setMessageProcess(new e(str));
        MessageSender messageSender = new MessageSender(getActivity(), messageComposer);
        messageSender.setRequestMessage(detailMessage);
        messageSender.execute();
    }

    public void buildUiPatternLock() {
        this.Q.setViewMode(0);
        this.Q.setInStealthMode(false);
        this.Q.setTactileFeedbackEnabled(true);
        this.Q.setInputEnabled(true);
        this.Q.setDotCount(3);
        this.Q.setAspectRatioEnabled(true);
        this.Q.setAspectRatio(2);
        this.Q.setNormalStateColor(getResources().getColor(R.color.colorBackground));
        this.Q.setCorrectStateColor(getResources().getColor(R.color.LimeGreen));
        this.Q.setWrongStateColor(getResources().getColor(R.color.colorSecondary));
        this.Q.setDotAnimationDuration(PagerSlidingTabStrip.DEF_VALUE_TAB_TEXT_ALPHA);
        this.Q.setPathEndAnimationDuration(100);
    }

    @TargetApi(23)
    public final void c0() {
        try {
            this.N = KeyStore.getInstance("AndroidKeyStore");
        } catch (Exception e2) {
            e2.printStackTrace();
        }
        try {
            KeyGenerator keyGenerator = KeyGenerator.getInstance("AES", "AndroidKeyStore");
            try {
                this.N.load(null);
                keyGenerator.init(new KeyGenParameterSpec.Builder("JogjaKita", 3).setBlockModes("CBC").setUserAuthenticationRequired(false).setEncryptionPaddings("PKCS7Padding").build());
                keyGenerator.generateKey();
            } catch (IOException | InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertificateException e3) {
                throw new RuntimeException(e3);
            }
        } catch (NoSuchAlgorithmException | NoSuchProviderException e4) {
            throw new RuntimeException("Failed to get KeyGenerator instance", e4);
        }
    }

    public final void d0() {
        Affinity.refreshBalance(getActivity(), new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                ProfileFragment.this.s0(i, (Boolean) obj);
            }
        });
    }

    public final String e0(String str) {
        if (str == null || str.isEmpty()) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        int i = 0;
        for (String str2 : str.trim().split("\\s+")) {
            if (!str2.isEmpty()) {
                sb.append(str2.charAt(0));
                i++;
            }
            if (i == 2) {
                break;
            }
        }
        return sb.toString().toUpperCase();
    }

    public final void f0(MenuListEntity menuListEntity) {
        String variableName;
        if (menuListEntity == null || (variableName = menuListEntity.getVariableName()) == null) {
            return;
        }
        switch (variableName) {
            case "MENU_KEBIJAKAN_PRIVASI":
                String var = Var.toString(new ConfigSession(getContext()).retrieveMap(ConfigSession.PROPERTY_URL, ConfigSession.KEY_URL_PRIVACY_POLICY), "https://www.speedcash.co.id/kebijakan-privasi-speedcash-privasi-policy");
                Bundle bundle = new Bundle();
                bundle.putString("url", var);
                bundle.putString(FirebaseProcessor.KEY_TITLE, getActivity().getString(R.string.action_tnc));
                bundle.putBoolean("dynamic_title", true);
                Intent intent = new Intent((Context) getActivity(), (Class<?>) OpenWebViewActivity.class);
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case "MENU_SYARAT_DAN_KETENTUAN":
                String var2 = Var.toString(new ConfigSession(getContext()).retrieveMap(ConfigSession.PROPERTY_URL, ConfigSession.KEY_URL_SYARAT_KETENTUAN), "https://www.speedcash.co.id/syarat-dan-ketentuan-penggunaan-speedcash-terms-and-conditions");
                Bundle bundle2 = new Bundle();
                bundle2.putString("url", var2);
                bundle2.putString(FirebaseProcessor.KEY_TITLE, getActivity().getString(R.string.action_tnc));
                bundle2.putBoolean("dynamic_title", true);
                Intent intent2 = new Intent((Context) getActivity(), (Class<?>) OpenWebViewActivity.class);
                intent2.putExtras(bundle2);
                startActivity(intent2);
                break;
            case "MENU_KUNCI_APLIKASI":
                setLock();
                break;
            default:
                if (menuListEntity.getActivity() != null) {
                    Intent intent3 = new Intent((Context) getActivity(), menuListEntity.getActivity());
                    if (menuListEntity.getBundle() != null) {
                        intent3.putExtras(menuListEntity.getBundle());
                    }
                    startActivity(intent3);
                    break;
                }
                break;
        }
    }

    public void fetchDocumentStatus() {
        MessageComposer messageComposer = new MessageComposer(7, "ro/customer/check_kyc");
        messageComposer.setRequest_method(MessageComposer.GET);
        messageComposer.setData_type(2);
        messageComposer.setShowProgressRegular(false);
        messageComposer.addMessage("user_uuid", Device.getDeviceUUID(getActivity()).toString());
        messageComposer.addMessage("user_id", this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID));
        messageComposer.addMessage(BaseMessage.INDEX_VIA, "BB ANDROID");
        messageComposer.addMessage(BaseMessage.INDEX_APP_ID, "SPEEDCASH");
        messageComposer.setMessageProcess(new d());
        new MessageSender(getActivity(), messageComposer).execute();
    }

    public final void g0(View view) {
        this.s = (ImageView) view.findViewById(R.id.iv_profile_picture);
        this.n = (TextView) view.findViewById(R.id.profile_initials);
        this.k = (TextView) view.findViewById(R.id.tv_profil_nama_pemilik);
        this.l = (TextView) view.findViewById(R.id.tv_profil_notlep_pemilik);
        this.m = (TextView) view.findViewById(R.id.tv_id_sc);
        this.t = (ImageView) view.findViewById(R.id.iv_profile_plus);
        this.u = (ImageView) view.findViewById(R.id.iv_copy_id_sc);
        this.f = view.findViewById(R.id.iv_edit_profile);
        this.c = (LinearLayout) view.findViewById(R.id.container_upgrade_sc);
        this.g = view.findViewById(R.id.container_safe_account_sc);
        this.r = (TextView) view.findViewById(R.id.tv_step_safe_account);
        this.o = (TextView) view.findViewById(R.id.progressText);
        this.C = (ProgressBar) view.findViewById(R.id.progress_bar_safe_sc);
        this.v = (ImageView) view.findViewById(R.id.iv_next_safe_account);
        this.w = (ImageView) view.findViewById(R.id.iv_close_safe_account);
        this.p = (TextView) view.findViewById(R.id.tv_sc_coin);
        this.e = view.findViewById(R.id.btn_rating_app);
        TextView textView = (TextView) view.findViewById(R.id.tv_version_app);
        this.q = textView;
        textView.setText("v6.5.1 (482)");
        this.h = view.findViewById(R.id.btn_facebook);
        this.i = view.findViewById(R.id.btn_instagram);
        this.j = view.findViewById(R.id.btn_tiktok);
        this.z = (Button) view.findViewById(R.id.btn_logout);
        this.u.setOnClickListener(this);
        this.f.setOnClickListener(this);
        this.g.setOnClickListener(this);
        this.w.setOnClickListener(this);
        this.e.setOnClickListener(this);
        this.h.setOnClickListener(this);
        this.i.setOnClickListener(this);
        this.j.setOnClickListener(this);
        this.z.setOnClickListener(this);
        this.R = this.H.isFingerSet();
        SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeRefreshLayout);
        this.F = swipeRefreshLayout;
        swipeRefreshLayout.setOnRefreshListener(this);
        NestedScrollView findViewById = view.findViewById(R.id.ns_nested);
        this.L = findViewById;
        findViewById.post(new Runnable() {
            @Override
            public final void run() {
                ProfileFragment.this.t0();
            }
        });
        view.findViewById(R.id.mcd_poin).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                ProfileFragment.this.u0(view2);
            }
        });
    }

    @Override
    public Activity getInvokerActivity() {
        return getActivity();
    }

    @Override
    public void onActivityResult(int i, int i2, Intent intent) {
        if (i == 12999 && i2 == -1) {
            fetchDocumentStatus();
        } else if ((i == 12888 || i == 12889) && i2 == -1) {
            fetchDocumentStatus();
        }
        super.onActivityResult(i, i2, intent);
    }

    @Override
    public void onChangePinClicked(final Activity activity, final Class<?> cls, @Nullable final Bundle bundle) {
        Affinity.dialogSetPin(activity);
        final DialogPlus create = DialogPlus.newDialog(getBaseActivity()).setContentHolder(new ViewHolder(View.inflate(getActivity(), R.layout.dialog_confirm_change_pin, null))).setCancelable(true).setContentWidth(-1).setContentHeight(-2).setGravity(80).setContentBackgroundResource(R.drawable.panel_white_rounded_top1).create();
        create.show();
        View holderView = create.getHolderView();
        holderView.findViewById(R.id.close_dialog_iv).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                create.dismiss();
            }
        });
        holderView.findViewById(R.id.dialog_btn_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                create.dismiss();
            }
        });
        holderView.findViewById(R.id.dialog_btn_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ProfileFragment.x0(create, activity, cls, bundle, view);
            }
        });
    }

    @Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
    }

    @Override
    public void onCleared() {
    }

    @Override
    public void onClick(View view) {
        int i;
        if (view == this.u) {
            Affinity.copy1(requireActivity(), this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID), "ID SpeedCash berhasil disalin");
            return;
        }
        if (view == this.y) {
            startActivity(new Intent((Context) getActivity(), (Class<?>) AlatPromosiActivity.class));
            return;
        }
        if (view == this.f) {
            ?? newInstance = new UploadFotoProfileFragment().newInstance();
            newInstance.setListener(new UploadFotoProfileFragment.UploadListener() {
                @Override
                public final void onUploadSuccess(String str, String str2) {
                    ProfileFragment.y0(str, str2);
                }
            });
            if (getFragmentManager() != null) {
                newInstance.show(getFragmentManager(), "upload_image");
                return;
            }
            return;
        }
        if (view == this.w) {
            T(this.g, "slide_out_down");
            return;
        }
        if (view == this.e) {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.bm.sc.bebasbayar"));
            intent.addFlags(268435456);
            startActivity(intent);
            return;
        }
        if (view == this.h) {
            Intent intent2 = new Intent("android.intent.action.VIEW", Uri.parse(this.T));
            intent2.addFlags(268435456);
            startActivity(intent2);
            return;
        }
        if (view == this.i) {
            Intent intent3 = new Intent("android.intent.action.VIEW", Uri.parse(this.U));
            intent3.addFlags(268435456);
            startActivity(intent3);
        } else if (view == this.j) {
            Intent intent4 = new Intent("android.intent.action.VIEW", Uri.parse(this.V));
            intent4.addFlags(268435456);
            startActivity(intent4);
        } else if (view == this.z) {
            onLogOut();
        } else {
            if (view != this.g || (i = this.S) >= 4) {
                return;
            }
            this.S = i + 1;
            F0();
            updateStatusSafeAccount();
        }
    }

    @Override
    public void onComplete(List<PatternLockView.Dot> list) {
        try {
            StringBuilder sb = new StringBuilder();
            sb.append("Pattern complete: ");
            sb.append(PatternLockUtils.patternToString(this.Q, list));
            String var = Var.toString(PatternLockUtils.patternToString(this.Q, list), "");
            this.H.store(AppSession.PROPERTY_SMARTLOCK_PROPERTIES, var);
            Affinity.purge(getActivity(), LockActivity.class, LockActivity.getBundle(this.H.isFingerSet(), var));
            try {
                Toast makeText = Toast.makeText((Context) getActivity(), (CharSequence) getString(R.string.berhasil_dikunci), 1);
                makeText.setGravity(17, 0, 0);
                makeText.show();
            } catch (Exception e2) {
                e2.toString();
            }
        } catch (Exception e3) {
            StringBuilder sb2 = new StringBuilder();
            sb2.append("Error onComplete karena: ");
            sb2.append(e3);
        }
    }

    @Override
    @SuppressLint({"ObsoleteSdkInt"})
    public View onCreateView(@NotNull LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.fragment_profile_v2, viewGroup, false);
        this.G = new ConfigSession(getActivity());
        this.H = new AppSession(getActivity());
        this.I = new DataSession(getActivity());
        this.d = new Bundle();
        String retrieve = this.H.retrieve("prop:app:merchantid_currentStep");
        if (retrieve == null || retrieve.isEmpty()) {
            this.S = 0;
        } else {
            this.S = Integer.parseInt(retrieve);
        }
        g0(inflate);
        H0(inflate);
        G0();
        d0();
        Compat.setTransparentStatusBar(getActivity());
        ApiConfig.fetchConfig(getActivity(), R.xml.sc_url_sosmed, "sc_url_sosmed", new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                ProfileFragment.this.z0(i, (String) obj);
            }
        });
        U();
        return inflate;
    }

    @Override
    public void onLock() {
        setLock();
    }

    @Override
    public void onLogOut() {
        setLogOut();
    }

    @Override
    public void onMenuItemClick(MenuListEntity menuListEntity) {
        f0(menuListEntity);
    }

    @Override
    public void onProgress(List<PatternLockView.Dot> list) {
        StringBuilder sb = new StringBuilder();
        sb.append("Pattern progress: ");
        sb.append(PatternLockUtils.patternToString(this.Q, list));
    }

    @Override
    public void onRefresh() {
        this.F.setRefreshing(true);
        Affinity.getRefreshData(getActivity(), this.H, this.I);
        this.F.setRefreshing(false);
    }

    @Override
    public void onResume() {
        super.onResume();
        String retrieve = this.I.retrieve(DataSession.KEY_KYC_DOCUMENT_STATUS);
        boolean equals = "true".equals(this.H.retrieve("KYC_SUCCESS_DISPLAYED"));
        if ("00".equals(retrieve) && equals) {
            this.c.setVisibility(8);
        } else {
            fetchDocumentStatus();
        }
        G0();
        updateMyVoucher();
        updateStatusSafeAccount();
        g0(getView());
        H0(getView());
        G0();
        d0();
        Compat.setTransparentStatusBar(getActivity());
        ApiConfig.fetchConfig(getActivity(), R.xml.sc_url_sosmed, "sc_url_sosmed", new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                ProfileFragment.this.A0(i, (String) obj);
            }
        });
        U();
    }

    @Override
    public void onStarted() {
    }

    @Override
    public void onSwitcherSmartLogin(Boolean bool, BBCallback<Boolean> bBCallback) {
        if (bool.booleanValue()) {
            a0(bBCallback);
        } else {
            X(bBCallback);
        }
    }

    public void setLock() {
        if (!this.H.isFingerSet()) {
            W(false);
            return;
        }
        Affinity.purge(getActivity(), LockActivity.class, LockActivity.getBundle(this.H.isFingerSet(), ""));
        try {
            Toast makeText = Toast.makeText((Context) getActivity(), (CharSequence) getString(R.string.berhasil_dikunci), 1);
            makeText.setGravity(17, 0, 0);
            makeText.show();
        } catch (Exception e2) {
            e2.toString();
        }
    }

    public void setLogOut() {
        if (!Device.isSensorAvailable(getBaseActivity())) {
            W(true);
        } else if (this.R) {
            Affinity.purge(getActivity(), LockActivity.class, LockActivity.getBundle(this.H.isFingerSet(), ""));
        } else {
            Y();
        }
    }

    @Override
    public void setUserVisibleHint(boolean z) {
        super.setUserVisibleHint(z);
        if (z) {
            fetchDocumentStatus();
            H0(getView());
        }
    }

    public void updateMyVoucher() {
        String str;
        try {
            str = Var.toString(this.H.retrieve(AppSession.PROPERTY_MERCHANT_ID), "");
        } catch (Exception e2) {
            Objects.requireNonNull(e2.getMessage());
            str = null;
        }
        if (str == null || str.equals("")) {
            return;
        }
        APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper();
        aPIMessageWrapper.setItem(DataMessage.ID_OUTLET, str);
        MessageComposer messageComposer = new MessageComposer(2, "reward-point/get-redeemed-vouchers");
        messageComposer.setShowProgressRegular(false);
        messageComposer.setIs_encrypted(false);
        messageComposer.setMessageProcess(new c());
        MessageSender messageSender = new MessageSender(getActivity(), messageComposer);
        messageSender.setRequestMessage(aPIMessageWrapper);
        messageSender.execute();
    }

    public void updateStatusSCPlus(String str) {
        View inflate;
        LayoutInflater layoutInflater = getLayoutInflater();
        this.c.removeAllViews();
        if (str.equals("awal")) {
            inflate = layoutInflater.inflate(R.layout.status_upgrade_sc_plus_awal, (ViewGroup) this.c, false);
            Button button = (Button) inflate.findViewById(R.id.btn_upgrade_scplus_awal);
            this.A = button;
            button.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ProfileFragment.this.B0(view);
                }
            });
        } else if (str.equals("gagal")) {
            inflate = layoutInflater.inflate(R.layout.status_upgrade_sc_plus_ditolak, (ViewGroup) this.c, false);
            this.B = (Button) inflate.findViewById(R.id.btn_upgrade_scplus_ditolak);
            TextView textView = (TextView) inflate.findViewById(R.id.textViewStatus);
            TextView textView2 = (TextView) inflate.findViewById(R.id.textViewStatus2);
            TextView textView3 = (TextView) inflate.findViewById(R.id.textViewStatus3);
            if (!this.W.equalsIgnoreCase("")) {
                textView.setText(Html.fromHtml(this.X));
                textView2.setText(Html.fromHtml(this.W));
                textView3.setText(Html.fromHtml(this.Y));
            }
            this.B.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ProfileFragment.this.C0(view);
                }
            });
        } else {
            inflate = layoutInflater.inflate(R.layout.status_upgrade_sc_plus_sukses, (ViewGroup) this.c, false);
            ImageView imageView = (ImageView) inflate.findViewById(R.id.iv_close_upgrade_succes);
            this.x = imageView;
            imageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    ProfileFragment.this.D0(view);
                }
            });
            this.H.store("KYC_SUCCESS_DISPLAYED", "true");
        }
        this.c.addView(inflate);
    }

    public void updateStatusSafeAccount() {
        this.C.setProgress(this.S);
        this.o.setText(this.S + "/4");
        int i = this.S;
        if (i <= 1) {
            this.C.setProgressDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.progress_foreground_step0_1));
        } else if (i <= 3) {
            this.C.setProgressDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.progress_foreground_step2_3));
        } else if (i == 4) {
            this.C.setProgressDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.progress_foreground_step_4));
        }
        int i2 = this.S;
        if (i2 == 0) {
            this.r.setText("Atur PIN yang kuat sebagai lapisan keamanan");
        } else if (i2 == 1) {
            this.r.setText("Verifikasi email kamu");
        } else if (i2 == 2) {
            this.r.setText("Upgrade ke SpeedCash Plus");
        } else if (i2 == 3) {
            this.r.setText("Aktifkan Quick Login");
        } else if (i2 == 4) {
            this.r.setText("Akun SpeedCash kamu 100% aman terproteksi");
        }
        if (this.S == 4) {
            this.v.setVisibility(4);
        }
    }
}