正在查看: SpeedCash v6.5.1482 应用的 GantiPINActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpeedCash v6.5.1482 应用的 GantiPINActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bm.sc.bebasbayar.ui.activity.auth;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import androidx.annotation.CallSuper;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.res.ResourcesCompat;
import com.bm.sc.auth.ui.BottomNavigationActivity;
import com.bm.sc.auth.ui.cs.LiveChatActivity;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.helper.AuthHelper;
import com.bm.sc.bebasbayar.helper.EventHelper;
import com.bm.sc.bebasbayar.helper.FirebaseHelper;
import com.bm.sc.bebasbayar.iface.BBCallback;
import com.bm.sc.bebasbayar.setting.session.AppSession;
import com.bm.sc.bebasbayar.ui.activity.auth.GantiPINActivity;
import com.bm.sc.util.common.Var;
import java.util.HashMap;
import java.util.Objects;
public class GantiPINActivity extends AuthActivity implements View.OnClickListener {
public EditText d;
public EditText e;
public String f;
public String g;
public String h;
public int i;
public static Bundle getBundle(AuthActivity authActivity, String str, String str2, int i, String str3) {
Bundle bundle = new Bundle();
bundle.putString("phone", str);
bundle.putString("otp", str2);
bundle.putInt("state", i);
bundle.putString("type", str3);
bundle.putAll(authActivity.getGPSBundle());
return bundle;
}
public void n(String str, int i, AuthHelper.OTPResponse oTPResponse) {
if (!oTPResponse.getRc().equals("00")) {
Affinity.info(this, false, oTPResponse.getMessage());
return;
}
new AppSession(this).store(AppSession.PROPERTY_MERCHANT_PIN, str);
Affinity.toast(this, oTPResponse.getMessage());
Affinity.purge(this, BottomNavigationActivity.class);
}
public void o(int i, Boolean bool) {
finish();
}
public void p() {
this.d.requestFocus();
showKeyboard(this.d);
}
public void q() {
this.d.requestFocus();
showKeyboard(this.d);
}
@Override
public int getLayoutResource() {
return R.layout.activity_auth_ganti_pin;
}
@Override
public int getRootLayoutId() {
return R.id.layout_root;
}
public final void l() {
String obj = this.d.getText().toString();
String obj2 = this.e.getText().toString();
if (obj.isEmpty()) {
Affinity.info(this, false, "Silakan isi PIN akun Anda");
} else if (obj.equals(obj2)) {
m();
} else {
Affinity.info(this, false, "PIN tidak sesuai");
}
}
public final void m() {
final String obj = this.d.getText().toString();
HashMap hashMap = new HashMap();
hashMap.put("app_latitude", "0");
hashMap.put("app_longitude", "0");
hashMap.put("app_gps_state", "0");
hashMap.put("app_uri", Var.toString(getApp_uri(), ""));
FirebaseHelper.sendEventBoard(this, this.f, "", getClass().getSimpleName().replace("Activity", "") + "Input", hashMap);
AuthHelper.changePINv2(this, this.f, obj, this.g, this.h, new BBCallback() {
@Override
public final void do_callback(int i, Object obj2) {
GantiPINActivity.this.n(obj, i, (AuthHelper.OTPResponse) obj2);
}
});
}
public void onActivityResult(int i, int i2, Intent intent) {
super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(i, i2, intent);
m();
}
public void onBackPressed() {
Affinity.launch(this, BottomNavigationActivity.class);
}
@Override
public void onClick(View view) {
if (view.getId() == 2131362426) {
l();
} else if (view.getId() == 2131366324) {
Affinity.launch(this, LiveChatActivity.class);
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
EventHelper.sendAllEvents(this, FirebaseHelper.EVENT_SCREEN_VIEW, getClass().getSimpleName().replace("Activity", ""));
if (bundle != null) {
this.f = bundle.getString("phone", "");
this.g = bundle.getString("otp", "");
this.i = bundle.getInt("state", 0);
this.h = bundle.getString("type", "");
} else if (getIntent().getExtras() != null) {
Bundle extras = getIntent().getExtras();
this.f = extras.getString("phone", "");
this.g = extras.getString("otp", "");
this.i = extras.getInt("state", 0);
this.h = extras.getString("type", "");
} else {
this.f = "";
this.g = "";
this.i = 0;
this.h = "";
}
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.colorPrimary), PorterDuff.Mode.SRC_ATOP);
((TextView) findViewById(R.id.toolbar_title)).setText(getString(R.string.bonjour_toolbar_reset));
}
if (Var.toString(this.f, "").isEmpty() || Var.toString(this.g, "").isEmpty()) {
Affinity.info(this, -1, "Informasi", "Nomor HP dan OTP tidak boleh kosong", new BBCallback() {
@Override
public final void do_callback(int i, Object obj) {
GantiPINActivity.this.o(i, (Boolean) obj);
}
});
return;
}
this.d = (EditText) findViewById(R.id.input_pin_et);
this.e = (EditText) findViewById(R.id.input_confirm_pin_et);
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
GantiPINActivity.this.p();
}
}, 500L);
findViewById(R.id.btn_submit).setOnClickListener(this);
findViewById(R.id.toolbar_help_container).setOnClickListener(this);
}
public void onResume() {
super/*androidx.fragment.app.FragmentActivity*/.onResume();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
GantiPINActivity.this.q();
}
}, 500L);
}
@Override
@CallSuper
public void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putString("phone", this.f);
bundle.putString("otp", this.g);
bundle.putInt("state", this.i);
}
}