what-the-bank/sources/com/scb/phone/view/custom/common/CustomRiskAssessmentDialogF...

98 lines
3.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.common;
import android.content.Context;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.SpannedString;
import android.text.TextUtils;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.DialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import java.nio.charset.StandardCharsets;
/* loaded from: classes5.dex */
public class CustomRiskAssessmentDialogFragment extends DialogFragment {
private static byte a = 6;
private static int b = 0;
private static int e = 1;
@BindView
TextView mRiskCode;
@BindView
TextView mRiskLevel;
@BindView
TextView mRiskLevelValue;
private void f(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] ^ a);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r14v7, types: [android.text.SpannableString, android.text.Spannable] */
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
int i = 2 % 2;
int i2 = b + 57;
e = i2 % 128;
int i3 = i2 % 2;
View inflate = layoutInflater.inflate(R.layout.2131560240, viewGroup, false);
ButterKnife.c(this, inflate);
if (getDialog() != null) {
int i4 = b + 33;
e = i4 % 128;
int i5 = i4 % 2;
getDialog().requestWindowFeature(1);
}
Bundle arguments = getArguments();
this.mRiskCode.setText(arguments.getString("RISK_CODE"));
this.mRiskLevel.setText(R.string.risk_level);
TextView textView = this.mRiskLevelValue;
int i6 = arguments.getInt("RISK_LEVEL");
Context context = textView.getContext();
String string = context.getString(i6);
if (string.startsWith(",*,)")) {
int i7 = b + 103;
e = i7 % 128;
int i8 = i7 % 2;
Object[] objArr = new Object[1];
f(string.substring(4), objArr);
string = ((String) objArr[0]).intern();
CharSequence text = context.getText(i6);
if (text instanceof Spanned) {
?? spannableString = new SpannableString(string);
TextUtils.copySpansFrom((SpannedString) text, 0, string.length(), Object.class, spannableString, 0);
string = spannableString;
}
}
textView.setText(string);
return inflate;
}
@OnClick
public void onClickConfirm() {
getTargetFragment().onActivityResult(7000, -1, null);
getDialog().dismiss();
}
@OnClick
public void onClickCancel() {
getTargetFragment().onActivityResult(7000, 0, null);
getDialog().dismiss();
}
}