导航菜单

页面标题

页面副标题

Easycash v3.75.13 - AccountSecurityActivity.java 源代码

正在查看: Easycash v3.75.13 应用的 AccountSecurityActivity.java JAVA 源代码文件

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


package com.fintopia.lender.module.account;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.OnClick;
import com.fintopia.lender.R;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.events.SetPasswordEvent;
import com.fintopia.lender.module.gesture.GesturePasswordActivity;
import com.fintopia.lender.module.gesture.InputGestureActivity;
import com.fintopia.lender.module.gesture.models.GestureUsedType;
import com.fintopia.lender.module.utils.GesturePasswordManager;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.utils.ThirdPartEventUtils;
import com.lingyue.supertoolkit.widgets.BaseUtils;
import io.reactivex.disposables.Disposable;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

public class AccountSecurityActivity extends LenderCommonActivity {
    public static final int REQUEST_CODE_GESTURE_INPUT = 105;
    public static final int REQUEST_CODE_GESTURE_PASSWORD_CONFIGURE = 106;

    @BindView(5606)
    TextView tvChangePassword;

    @BindView(5671)
    TextView tvGesturePassword;

    private void K() {
        if (this.userSession.b().c) {
            this.tvChangePassword.setText(getString(R.string.lender_change_login_password));
        } else {
            this.tvChangePassword.setText(getString(R.string.lender_set_login_password));
        }
    }

    private void L() {
        if (GesturePasswordManager.h(this)) {
            this.tvGesturePassword.setText(R.string.lender_open);
        } else {
            this.tvGesturePassword.setText(R.string.lender_closed);
        }
    }

    public static void startAccountSecurityActivity(Activity activity) {
        activity.startActivity(new Intent(activity, (Class<?>) AccountSecurityActivity.class));
    }

    @Override
    protected void A() {
        K();
        L();
    }

    @OnClick({5606})
    public void changePassword() {
        if (BaseUtils.l()) {
            return;
        }
        if (!this.userSession.b().c) {
            SetPasswordActivity.startSetPasswordActivity(this);
        } else {
            ThirdPartEventUtils.y(this, "lender_accsecurity_changepsw");
            ChangePasswordActivity.startChangePasswordActivity(this);
        }
    }

    @Override
    public int getLayoutID() {
        return R.layout.account_security_activity;
    }

    @Override
    protected void onActivityResult(int i, int i2, Intent intent) {
        super.onActivityResult(i, i2, intent);
        if (i != 105) {
            if (i == 106 && i2 == -1) {
                L();
                return;
            }
            return;
        }
        if (i2 == -1) {
            L();
            GesturePasswordActivity.startGesturePasswordActivity(this, 106);
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onSetPasswordEvent(SetPasswordEvent setPasswordEvent) {
        if (setPasswordEvent != null) {
            K();
        }
    }

    @Override
    public Disposable runOnActiveEvent(Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.a(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnCreated(@NonNull Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.b(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnDestroy(@NonNull Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.c(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.d(this, lifecycleEvent, runnable);
    }

    @Override
    public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.e(this, lifecycleEventArr, runnable);
    }

    @OnClick({5336})
    public void setGesturePassword() {
        if (GesturePasswordManager.h(this)) {
            GesturePasswordActivity.startGesturePasswordActivity(this, 106);
        } else {
            InputGestureActivity.startInputGestureActivityForResult(this, GestureUsedType.SETTING, 105);
        }
    }
}