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

199 lines
6.7 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.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import java.nio.charset.StandardCharsets;
import o.C15715hv;
import o.InterfaceC12851fIz;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomEditCell extends RelativeLayout {
private static byte h = 6;
private static int k = 1;
/* renamed from: o, reason: collision with root package name */
private static int f8018o;
private Drawable a;
private Drawable b;
private InterfaceC12851fIz c;
private int d;
@BindView
View divider;
private Context e;
private String f;
private int g;
private String i;
@BindView
ImageView icon;
private boolean j;
@BindView
View ripple;
@BindView
TextView text;
@BindView
TextView title;
private void l(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] ^ h);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
public CustomEditCell(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.e = context;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomCellOptions, 0, 0);
this.g = obtainStyledAttributes.getColor(5, nMh.getColor(context, R.color.f14042131100912));
this.i = obtainStyledAttributes.getString(6) != null ? obtainStyledAttributes.getString(6) : "";
this.f = obtainStyledAttributes.getString(4) != null ? obtainStyledAttributes.getString(4) : "";
this.b = obtainStyledAttributes.getDrawable(0) != null ? obtainStyledAttributes.getDrawable(0) : nMh.getDrawable(context, R.drawable.ic_edit_black_24dp);
this.a = obtainStyledAttributes.getDrawable(1) != null ? obtainStyledAttributes.getDrawable(1) : nMh.getDrawable(context, R.drawable.ripple_purple);
this.d = obtainStyledAttributes.getDimensionPixelSize(2, -1);
this.j = obtainStyledAttributes.getBoolean(3, true);
obtainStyledAttributes.recycle();
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131558939, (ViewGroup) this, true);
ButterKnife.c(this);
this.title.setText(this.i);
this.title.setTextColor(this.g);
this.text.setText(this.f);
this.text.setTextColor(this.g);
this.icon.setImageDrawable(this.b);
this.ripple.setBackground(this.a);
this.ripple.getLayoutParams().height = this.d;
if (this.j) {
this.divider.setVisibility(0);
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x0045, code lost:
l(r7, r0);
r7 = ((java.lang.String) r0[0]).intern();
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x0054, code lost:
l(r7, r0);
((java.lang.String) r0[0]).intern();
r7 = null;
r7.hashCode();
*/
/* JADX WARN: Code restructure failed: missing block: B:12:0x0062, code lost:
throw null;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x0030, code lost:
if (r7.startsWith(",*,)") != true) goto L13;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x0021, code lost:
if (r7.startsWith(",*,)") != false) goto L10;
*/
/* JADX WARN: Code restructure failed: missing block: B:8:0x0033, code lost:
r2 = com.scb.phone.view.custom.common.CustomEditCell.k + 7;
com.scb.phone.view.custom.common.CustomEditCell.f8018o = r2 % 128;
r2 = r2 % 2;
r7 = r7.substring(4);
r0 = new java.lang.Object[1];
*/
/* JADX WARN: Code restructure failed: missing block: B:9:0x0043, code lost:
if (r2 != 0) goto L15;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void setText(int r7) {
/*
r6 = this;
r0 = 2
int r1 = r0 % r0
int r1 = com.scb.phone.view.custom.common.CustomEditCell.k
int r1 = r1 + 91
int r2 = r1 % 128
com.scb.phone.view.custom.common.CustomEditCell.f8018o = r2
int r1 = r1 % r0
java.lang.String r2 = ",*,)"
r3 = 1
r4 = 0
if (r1 == 0) goto L24
android.widget.TextView r1 = r6.text
android.content.Context r5 = r6.e
java.lang.String r7 = r5.getString(r7)
boolean r2 = r7.startsWith(r2)
r5 = 9
int r5 = r5 / r4
if (r2 == 0) goto L50
goto L33
L24:
android.widget.TextView r1 = r6.text
android.content.Context r5 = r6.e
java.lang.String r7 = r5.getString(r7)
boolean r2 = r7.startsWith(r2)
if (r2 == r3) goto L33
goto L50
L33:
int r2 = com.scb.phone.view.custom.common.CustomEditCell.k
int r2 = r2 + 7
int r5 = r2 % 128
com.scb.phone.view.custom.common.CustomEditCell.f8018o = r5
int r2 = r2 % r0
r0 = 4
java.lang.String r7 = r7.substring(r0)
java.lang.Object[] r0 = new java.lang.Object[r3]
if (r2 != 0) goto L54
r6.l(r7, r0)
r7 = r0[r4]
java.lang.String r7 = (java.lang.String) r7
java.lang.String r7 = r7.intern()
L50:
r1.setText(r7)
return
L54:
r6.l(r7, r0)
r7 = r0[r4]
java.lang.String r7 = (java.lang.String) r7
r7.intern()
r7 = 0
r7.hashCode()
throw r7
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.custom.common.CustomEditCell.setText(int):void");
}
public void setText(String str) {
TextView textView = this.text;
if (str == null) {
str = "";
}
textView.setText(str);
}
public void setOnEditIconClickListener(InterfaceC12851fIz interfaceC12851fIz) {
this.c = interfaceC12851fIz;
}
}