what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/BaseReviewFragment.java

496 lines
22 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.transferandpay;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Base64;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.prelogin.QuickOperationSuccessActivity;
import com.scb.phone.view.activity.prelogin.quicktopup.ModifyQuickTopUpActivity;
import com.scb.phone.view.activity.transferandpay.SuccessActivity;
import com.scb.phone.view.custom.common.CustomScheduleView;
import com.scb.phone.view.custom.transferandpay.CustomNoteItem;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayStatus;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget;
import java.nio.charset.StandardCharsets;
import o.C1168Xb;
import o.C1189Xo;
import o.C6583cXR;
/* loaded from: classes5.dex */
public class BaseReviewFragment extends Hilt_BaseReviewFragment {
private static byte c = 6;
private static int d = 0;
private static int h = 1;
@BindView
public CustomNoteItem billerNote;
@BindView
View customAdditionalFeeLayout;
@BindView
CustomTransferAndPayItem customAmount;
@BindView
protected CustomTransferAndPayItem customDue;
@BindView
public CustomTransferAndPayItem customFees;
@BindView
CustomScheduleView customScheduleView;
@BindView
protected CustomTransferAndPaySource customSource;
@BindView
CustomTransferAndPayStatus customStatus;
@BindView
public CustomTransferAndPayTarget customTarget;
@BindView
CustomTransferAndPayItem fixedTransferInterest;
@BindView
CustomTransferAndPayItem fixedTransferWithholdingTax;
@BindView
public View fullDivider;
public C1189Xo g;
@BindView
TextView modifyQuickTopUpButton;
@BindView
TextView quickTopUpTextView;
@BindView
LinearLayout scheduleContainer;
@BindView
public CustomNoteItem userNote;
private void p(String str, Object[] objArr) {
byte[] decode = Base64.decode(str, 0);
byte[] bArr = new byte[decode.length];
for (int i = 0; i < decode.length; i++) {
bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ c);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
public void a(C1189Xo c1189Xo, View view, Context context) {
String b;
CharSequence charSequence;
String str;
ButterKnife.c(this, view);
if (!e(c1189Xo.j())) {
if (TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j())) {
this.customSource.setSourceName(c1189Xo.ac);
this.customSource.setAccountNumber(c1189Xo.Z);
} else if (!TextUtils.equals("BNPL_PAYMENT", c1189Xo.j())) {
this.customSource.setSourceName(c1189Xo.b());
if (!TextUtils.isEmpty(c1189Xo.d())) {
this.customSource.setAccountNumber(c1189Xo.d());
}
} else {
this.customSource.setAvatar(c1189Xo.Q.toString());
CustomTransferAndPaySource customTransferAndPaySource = this.customSource;
if (TextUtils.isEmpty(c1189Xo.f)) {
b = c1189Xo.b();
} else {
b = c1189Xo.f;
}
customTransferAndPaySource.setSourceName(b);
this.customSource.setAccountNumber(c1189Xo.d());
this.customSource.setAccountBalance(c1189Xo.ae);
}
} else if (TextUtils.isEmpty(c1189Xo.ac)) {
this.customSource.setSourceName(c1189Xo.Z);
this.customSource.setSourceNameGrayColor(getContext());
} else {
this.customSource.setSourceName(c1189Xo.ac);
this.customSource.setAccountNumber(c1189Xo.Z);
}
if (c1189Xo.Q == null) {
if (e(c1189Xo.j()) || TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j())) {
if (TextUtils.equals("MOB", c1189Xo.ab)) {
this.customSource.setAvatar(C6583cXR.VS_(getContext(), R.drawable.icon_prompt_pay_mobile).toString());
} else if (TextUtils.equals("CID", c1189Xo.ab)) {
this.customSource.setAvatar(C6583cXR.VS_(getContext(), R.drawable.icon_prompt_pay_cid).toString());
}
}
} else {
Uri uri = c1189Xo.Q;
if (uri != null && !Uri.EMPTY.equals(uri)) {
this.customSource.setAvatar(uri.toString());
}
}
if (("QTOPUP".equals(c1189Xo.j()) || "rtp.payer".equals(c1189Xo.j()) || "rtp.payer.notification".equals(c1189Xo.j())) && c1189Xo.k != null) {
this.customSource.setAccountBalance(c1189Xo.k);
}
Context context2 = context;
while ((context2 instanceof ContextWrapper) && !(context2 instanceof Activity)) {
context2 = ((ContextWrapper) context2).getBaseContext();
}
if (!e(c1189Xo.j())) {
if (!TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j()) && !TextUtils.equals("BSCANC_SUCCESS_FUNCTION", c1189Xo.j())) {
if (TextUtils.equals("BNPL_PAYMENT", c1189Xo.j())) {
this.customTarget.setTargetName(c1189Xo.e());
this.customTarget.setBillerAvatar(c1189Xo.l);
this.customTarget.setReferenceNumbers(c1189Xo.h);
String str2 = c1189Xo.ad;
String str3 = c1189Xo.aj;
if (str3 == null || str3.isEmpty() || str2 == null || str2.isEmpty()) {
charSequence = "rtp.payer.notification";
} else {
charSequence = "rtp.payer.notification";
this.customTarget.setReferenceNo1(context.getString(R.string.ebill_selected_reference, str2, str3));
}
String str4 = c1189Xo.ah;
String str5 = c1189Xo.ai;
if (str5 != null && !str5.isEmpty() && str4 != null && !str4.isEmpty()) {
this.customTarget.setReferenceNo2(context.getString(R.string.ebill_selected_reference, str4, str5));
}
String str6 = c1189Xo.ag;
String str7 = c1189Xo.am;
if (str7 != null && !str7.isEmpty() && str6 != null && !str6.isEmpty()) {
this.customTarget.setReferenceNo3(context.getString(R.string.ebill_selected_reference, str6, str7));
}
} else {
charSequence = "rtp.payer.notification";
this.customTarget.setTargetName(c1189Xo.e());
if (c1189Xo.N) {
this.customTarget.setReferenceNumbers(c1189Xo.t);
} else {
CustomTransferAndPayTarget customTransferAndPayTarget = this.customTarget;
if (c1189Xo.s != null && !c1189Xo.s.isEmpty()) {
str = c1189Xo.s;
} else {
str = c1189Xo.t;
}
customTransferAndPayTarget.setReferenceNumbers(str);
if ((TextUtils.equals("PURCHASE_TRANSFER_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_TOPUP_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_BILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_CREDIT_CARD_FUNCTION", c1189Xo.j())) && c1189Xo.al != null && !c1189Xo.al.isEmpty()) {
this.customTarget.setReferenceNo1(c1189Xo.al);
}
}
}
} else {
charSequence = "rtp.payer.notification";
if (c1189Xo.aj != null && !c1189Xo.aj.isEmpty()) {
this.customTarget.setReferenceNo1(c1189Xo.al);
}
if (c1189Xo.ai != null && !c1189Xo.ai.isEmpty()) {
this.customTarget.setReferenceNo2(c1189Xo.ak);
}
if (c1189Xo.am != null && !c1189Xo.am.isEmpty()) {
this.customTarget.setReferenceNo3(c1189Xo.ap);
}
this.customTarget.setTargetName(c1189Xo.m);
this.customTarget.setReferenceNumbers(c1189Xo.v);
}
} else {
if (TextUtils.isEmpty(c1189Xo.T)) {
this.customTarget.setTargetName(c1189Xo.U);
this.customTarget.setTargetNameGrayColor(getContext());
} else {
this.customTarget.setTargetName(c1189Xo.T);
this.customTarget.setReferenceNumbers(c1189Xo.U);
}
charSequence = "rtp.payer.notification";
}
if (e(c1189Xo.j())) {
if (TextUtils.equals("MOB", c1189Xo.Y)) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.icon_prompt_pay_mobile).toString());
} else if (TextUtils.equals("CID", c1189Xo.Y)) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.icon_prompt_pay_cid).toString());
}
} else if (TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("BILLPAYMENT", c1189Xo.j())) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.biller_place_holder).toString());
} else if (TextUtils.equals("LOANPAYMENT", c1189Xo.j())) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.loan_icon_placeholder).toString());
} else if (TextUtils.equals("PURCHASE_TRANSFER_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_TOPUP_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_BILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_CREDIT_CARD_FUNCTION", c1189Xo.j())) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.shop_large).toString());
} else {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.bankicon_place_holder).toString());
}
if (c1189Xo.q == null || Uri.EMPTY.equals(c1189Xo.q)) {
if (c1189Xo.x != null && !c1189Xo.x.isEmpty()) {
if (TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("BILLPAYMENT", c1189Xo.j())) {
this.customTarget.setBillerAvatar(c1189Xo.x);
} else if (TextUtils.equals("LOANPAYMENT", c1189Xo.j())) {
this.customTarget.setAvatar(c1189Xo.x, R.drawable.loan_icon_placeholder);
} else {
this.customTarget.setAvatar(c1189Xo.x);
}
} else if (TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("BILLPAYMENT", c1189Xo.j())) {
this.customTarget.setBillerAvatar(c1189Xo.l);
} else if (TextUtils.equals("LOANPAYMENT", c1189Xo.j())) {
this.customTarget.setAvatar(C6583cXR.VS_(getContext(), R.drawable.loan_icon_placeholder).toString());
}
} else if (TextUtils.equals("PURCHASE_TRANSFER_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_TOPUP_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_BILL_PAYMENT_FUNCTION", c1189Xo.j()) || TextUtils.equals("PURCHASE_CREDIT_CARD_FUNCTION", c1189Xo.j())) {
this.customTarget.setShopAvatar(c1189Xo.q.toString());
} else {
this.customTarget.setAvatar(c1189Xo.q.toString());
}
String str8 = c1189Xo.z;
if (!TextUtils.isEmpty(str8)) {
this.customTarget.setFavoriteName(str8);
} else if (context2 instanceof SuccessActivity) {
this.customTarget.setAddFavoriteButtonVisible(true);
}
this.customAmount.setValue(c1189Xo.j.c);
CustomTransferAndPayItem customTransferAndPayItem = this.customAmount;
C1168Xb c1168Xb = c1189Xo.j;
customTransferAndPayItem.amountInfo.setVisibility(0);
customTransferAndPayItem.amountInfo.setValues(c1168Xb);
this.customAmount.mBottomSpace.setVisibility(8);
this.customFees.setValue(c1189Xo.m());
this.customDue.setValue(c1189Xo.w);
if (TextUtils.isEmpty(c1189Xo.O)) {
this.billerNote.setVisibility(8);
if ((getActivity() instanceof QuickOperationSuccessActivity) || TextUtils.isEmpty(c1189Xo.aH)) {
this.customFees.mDividerView.setVisibility(8);
}
} else {
this.billerNote.setTitle(context.getString(R.string.review_biller_note));
this.billerNote.setText(c1189Xo.O);
this.billerNote.setVisibility(0);
if ((getActivity() instanceof QuickOperationSuccessActivity) || TextUtils.isEmpty(c1189Xo.aH)) {
this.billerNote.divider.setVisibility(8);
}
}
if ("QTOPUPSETUP".equals(c1189Xo.j())) {
this.customFees.setVisibility(8);
} else if (TextUtils.equals("rtp.requester", c1189Xo.j()) || TextUtils.equals("rtp.detail", c1189Xo.j())) {
if (c1189Xo.m() == null) {
this.customFees.setVisibility(8);
}
if (!TextUtils.isEmpty(c1189Xo.w)) {
this.customFees.mDividerView.setVisibility(TextUtils.isEmpty(c1189Xo.w) ^ true ? 0 : 8);
this.customDue.setVisibility(0);
}
c(R.string.request_to_pay_review_payer, context);
a(context);
e(context);
d(R.string.request_to_pay_review_note, context);
if (TextUtils.equals("rtp.detail", c1189Xo.j())) {
this.customStatus.setVisibility(0);
this.customStatus.setRequestDateText(c1189Xo.au);
this.customStatus.setStatusText(c1189Xo.aB);
}
} else {
if (!TextUtils.equals("rtp.payer", c1189Xo.j())) {
if (!TextUtils.equals(charSequence, c1189Xo.j()) && !TextUtils.equals("RTP_EBILL_PAYMENT_FUNCTION", c1189Xo.j())) {
this.customFees.setVisibility(0);
this.customFees.mDividerView.setVisibility(!TextUtils.isEmpty(c1189Xo.w) || !TextUtils.isEmpty(c1189Xo.aH) || !TextUtils.isEmpty(c1189Xo.O) ? 0 : 8);
}
}
d(R.string.request_to_pay_incoming_note, context);
c(R.string.request_to_pay_review_payer_for_payee, context);
this.customFees.mDividerView.setVisibility(!TextUtils.isEmpty(c1189Xo.w) || !TextUtils.isEmpty(c1189Xo.O) ? 0 : 8);
this.customDue.setVisibility(!TextUtils.isEmpty(c1189Xo.w) ? 0 : 8);
}
if (!TextUtils.isEmpty(c1189Xo.aH)) {
this.userNote.setTitle(context.getString(R.string.request_to_pay_incoming_note));
this.userNote.setText(c1189Xo.aH);
this.userNote.divider.setVisibility(c1189Xo.P != null ? 0 : 8);
} else {
this.userNote.setVisibility(8);
}
if (c1189Xo.B != null && !c1189Xo.B.isEmpty()) {
this.quickTopUpTextView.setVisibility(0);
this.customAmount.mDividerView.setVisibility(8);
if ("QTOPUPSETUP".equals(c1189Xo.j())) {
this.quickTopUpTextView.setText(R.string.review_quick_top_up_setup_text);
}
}
if (c1189Xo.K && (!(getContext() instanceof QuickOperationSuccessActivity) || !(getContext() instanceof SuccessActivity))) {
this.g = c1189Xo;
this.modifyQuickTopUpButton.setVisibility(0);
}
if (c1189Xo.at != null) {
this.customFees.scheduleFeeText.setVisibility(0);
this.customFees.mDividerView.setVisibility(0);
this.billerNote.divider.setVisibility(0);
this.scheduleContainer.setVisibility(0);
this.customScheduleView.setScheduleView(c1189Xo.at, false);
}
if ("FIXED_TRANSFER".equals(c1189Xo.j())) {
this.customAdditionalFeeLayout.setVisibility(0);
this.customAmount.setText(getContext().getString(R.string.fixed_transfer_title_net_amount));
this.customFees.setText(getContext().getString(R.string.fixed_transfer_title_total_fee));
this.fixedTransferInterest.setValue(c1189Xo.az);
this.fixedTransferWithholdingTax.setValue(c1189Xo.aD);
}
if ("rtp.requester".equals(c1189Xo.j())) {
this.customFees.mDividerView.setVisibility(0);
this.customDue.mDividerView.setVisibility(this.billerNote.getVisibility() == 0 ? 0 : 8);
}
}
private static boolean e(String str) {
return TextUtils.equals("rtp.requester", str) || TextUtils.equals("rtp.payer", str) || TextUtils.equals("rtp.payer.notification", str) || TextUtils.equals("rtp.detail", str);
}
/* JADX INFO: Access modifiers changed from: protected */
public final void c(int i, Context context) {
int i2 = 2 % 2;
CustomTransferAndPaySource customTransferAndPaySource = this.customSource;
String string = context.getString(i);
if (string.startsWith(",*,)")) {
int i3 = h + 61;
d = i3 % 128;
int i4 = i3 % 2;
Object[] objArr = new Object[1];
p(string.substring(4), objArr);
string = ((String) objArr[0]).intern();
}
customTransferAndPaySource.setText(string);
int i5 = d + 33;
h = i5 % 128;
if (i5 % 2 == 0) {
int i6 = 8 / 0;
}
}
private void a(Context context) {
int i = 2 % 2;
int i2 = h + 51;
d = i2 % 128;
Object obj = null;
if (i2 % 2 != 0) {
context.getString(R.string.request_to_pay_review_requester).startsWith(",*,)");
obj.hashCode();
throw null;
}
CustomTransferAndPayTarget customTransferAndPayTarget = this.customTarget;
String string = context.getString(R.string.request_to_pay_review_requester);
if (string.startsWith(",*,)")) {
Object[] objArr = new Object[1];
p(string.substring(4), objArr);
string = ((String) objArr[0]).intern();
}
customTransferAndPayTarget.setText(string);
int i3 = d + 31;
h = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
}
private void e(Context context) {
int i = 2 % 2;
int i2 = d + 21;
h = i2 % 128;
int i3 = i2 % 2;
CustomTransferAndPayItem customTransferAndPayItem = this.customAmount;
String string = context.getString(R.string.request_to_pay_review_amount);
if (string.startsWith(",*,)")) {
int i4 = h + 91;
d = i4 % 128;
int i5 = i4 % 2;
String substring = string.substring(4);
Object[] objArr = new Object[1];
if (i5 != 0) {
p(substring, objArr);
string = ((String) objArr[0]).intern();
int i6 = 15 / 0;
} else {
p(substring, objArr);
string = ((String) objArr[0]).intern();
}
}
customTransferAndPayItem.setText(string);
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x002c, code lost:
if (r6.startsWith(",*,)") != false) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x001f, code lost:
if (r6.startsWith(",*,)") != true) goto L10;
*/
/* JADX WARN: Code restructure failed: missing block: B:5:0x002e, code lost:
r7 = new java.lang.Object[1];
p(r6.substring(4), r7);
r6 = ((java.lang.String) r7[0]).intern();
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void d(int r6, android.content.Context r7) {
/*
r5 = this;
r0 = 2
int r1 = r0 % r0
int r1 = com.scb.phone.view.fragment.transferandpay.BaseReviewFragment.h
int r1 = r1 + 87
int r2 = r1 % 128
com.scb.phone.view.fragment.transferandpay.BaseReviewFragment.d = r2
int r1 = r1 % r0
r2 = 1
r3 = 0
java.lang.String r4 = ",*,)"
if (r1 == 0) goto L22
com.scb.phone.view.custom.transferandpay.CustomNoteItem r1 = r5.billerNote
java.lang.String r6 = r7.getString(r6)
boolean r7 = r6.startsWith(r4)
r4 = 84
int r4 = r4 / r3
if (r7 == r2) goto L2e
goto L40
L22:
com.scb.phone.view.custom.transferandpay.CustomNoteItem r1 = r5.billerNote
java.lang.String r6 = r7.getString(r6)
boolean r7 = r6.startsWith(r4)
if (r7 == 0) goto L40
L2e:
r7 = 4
java.lang.String r6 = r6.substring(r7)
java.lang.Object[] r7 = new java.lang.Object[r2]
r5.p(r6, r7)
r6 = r7[r3]
java.lang.String r6 = (java.lang.String) r6
java.lang.String r6 = r6.intern()
L40:
r1.setTitle(r6)
int r6 = com.scb.phone.view.fragment.transferandpay.BaseReviewFragment.d
int r6 = r6 + 29
int r7 = r6 % 128
com.scb.phone.view.fragment.transferandpay.BaseReviewFragment.h = r7
int r6 = r6 % r0
if (r6 == 0) goto L4f
return
L4f:
r6 = 0
throw r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.transferandpay.BaseReviewFragment.d(int, android.content.Context):void");
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
public void onModifyButtonClick() {
Intent intent = new Intent(getActivity(), (Class<?>) ModifyQuickTopUpActivity.class);
intent.putExtra("com.scb.phone.EXTRA_REVIEW", this.g);
startActivity(intent);
}
}