what-the-bank/sources/com/scb/phone/view/custom/item/ItemAdditionalMetaDataCusto...

694 lines
26 KiB
Java

package com.scb.phone.view.custom.item;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.GlideException;
import com.scb.phone.R;
import com.scb.phone.components.ItemCustom;
import java.io.File;
import java.io.FileOutputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import o.AbstractC14961gcz;
import o.C14866gag;
import o.C14957gcv;
import o.InterfaceC12830fIe;
import o.InterfaceC14894gbR;
import o.InterfaceC6871cdb;
import o.LHy;
import o.PNS;
import o.QG;
import o.XL;
import o.fHN;
import o.gbF;
import o.guQ;
import o.pyT;
/* loaded from: classes5.dex */
public final class ItemAdditionalMetaDataCustom extends ItemCustom<QG> {
private InterfaceC12830fIe a;
private HashMap<String, Boolean> b;
@BindView
public LinearLayout container;
private fHN d;
private List<XL> e;
/* loaded from: classes5.dex */
public final class TypeTextListView_ViewBinding implements Unbinder {
private TypeTextListView d;
public TypeTextListView_ViewBinding(TypeTextListView typeTextListView, View view) {
this.d = typeTextListView;
typeTextListView.tvTitle = (TextView) pyT.e(view, R.id.tv_title, "field 'tvTitle'", TextView.class);
typeTextListView.tvDescription = (TextView) pyT.e(view, R.id.tv_description, "field 'tvDescription'", TextView.class);
typeTextListView.divider = pyT.a(view, R.id.divider, "field 'divider'");
}
@Override // butterknife.Unbinder
public final void a() {
TypeTextListView typeTextListView = this.d;
if (typeTextListView == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
typeTextListView.tvTitle = null;
typeTextListView.tvDescription = null;
typeTextListView.divider = null;
}
}
/* loaded from: classes5.dex */
public final class TypeTextView_ViewBinding implements Unbinder {
private TypeTextView b;
public TypeTextView_ViewBinding(TypeTextView typeTextView, View view) {
this.b = typeTextView;
typeTextView.titleTextView = (TextView) pyT.e(view, R.id.title_text_view, "field 'titleTextView'", TextView.class);
typeTextView.headerTextView = (TextView) pyT.e(view, R.id.header_text_view, "field 'headerTextView'", TextView.class);
typeTextView.descriptionTextView = (TextView) pyT.e(view, R.id.description_text_view, "field 'descriptionTextView'", TextView.class);
typeTextView.divider = pyT.a(view, R.id.divider, "field 'divider'");
}
@Override // butterknife.Unbinder
public final void a() {
TypeTextView typeTextView = this.b;
if (typeTextView == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
typeTextView.titleTextView = null;
typeTextView.headerTextView = null;
typeTextView.descriptionTextView = null;
typeTextView.divider = null;
}
}
/* loaded from: classes5.dex */
public final class TypeMiniQrView_ViewBinding implements Unbinder {
private TypeMiniQrView e;
public TypeMiniQrView_ViewBinding(TypeMiniQrView typeMiniQrView, View view) {
this.e = typeMiniQrView;
typeMiniQrView.tvTitle = (TextView) pyT.e(view, R.id.qr_code_description_text, "field 'tvTitle'", TextView.class);
typeMiniQrView.imageQrCode = (ImageView) pyT.e(view, R.id.qr_code_image, "field 'imageQrCode'", ImageView.class);
typeMiniQrView.tvHeader = (TextView) pyT.e(view, R.id.qr_reference_id_text, "field 'tvHeader'", TextView.class);
typeMiniQrView.tvDescription = (TextView) pyT.e(view, R.id.qr_code_description, "field 'tvDescription'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
TypeMiniQrView typeMiniQrView = this.e;
if (typeMiniQrView == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
typeMiniQrView.tvTitle = null;
typeMiniQrView.imageQrCode = null;
typeMiniQrView.tvHeader = null;
typeMiniQrView.tvDescription = null;
}
}
/* loaded from: classes5.dex */
public final class TypeTextWithImageView_ViewBinding implements Unbinder {
private TypeTextWithImageView d;
public TypeTextWithImageView_ViewBinding(TypeTextWithImageView typeTextWithImageView, View view) {
this.d = typeTextWithImageView;
typeTextWithImageView.titleTextView = (TextView) pyT.e(view, R.id.title_text_view, "field 'titleTextView'", TextView.class);
typeTextWithImageView.headerTextView = (TextView) pyT.e(view, R.id.header_text_view, "field 'headerTextView'", TextView.class);
typeTextWithImageView.descriptionTextView = (TextView) pyT.e(view, R.id.description_text_view, "field 'descriptionTextView'", TextView.class);
typeTextWithImageView.imageView = (ImageView) pyT.e(view, R.id.image_chubb, "field 'imageView'", ImageView.class);
typeTextWithImageView.divider = pyT.a(view, R.id.divider, "field 'divider'");
}
@Override // butterknife.Unbinder
public final void a() {
TypeTextWithImageView typeTextWithImageView = this.d;
if (typeTextWithImageView == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
typeTextWithImageView.titleTextView = null;
typeTextWithImageView.headerTextView = null;
typeTextWithImageView.descriptionTextView = null;
typeTextWithImageView.imageView = null;
typeTextWithImageView.divider = null;
}
}
public static final /* synthetic */ void a(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom) {
fHN fhn = itemAdditionalMetaDataCustom.d;
if (fhn != null) {
int size = itemAdditionalMetaDataCustom.b.size();
HashMap<String, Boolean> hashMap = itemAdditionalMetaDataCustom.b;
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Map.Entry<String, Boolean> entry : hashMap.entrySet()) {
if (entry.getValue().booleanValue()) {
linkedHashMap.put(entry.getKey(), entry.getValue());
}
}
if (size == linkedHashMap.size()) {
fhn.s();
}
}
}
public static final /* synthetic */ void c(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, String str) {
if (itemAdditionalMetaDataCustom.d != null) {
itemAdditionalMetaDataCustom.b.put(str, Boolean.TRUE);
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemAdditionalMetaDataCustom(Context context) {
super(context);
C14957gcv.e(context, "");
this.b = new HashMap<>();
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemAdditionalMetaDataCustom(Context context, fHN fhn) {
super(context);
C14957gcv.e(context, "");
this.b = new HashMap<>();
this.d = fhn;
if (fhn != null) {
this.a = new RVV(this);
}
}
/* loaded from: classes5.dex */
public static final class RVV implements InterfaceC12830fIe {
private ItemAdditionalMetaDataCustom b;
RVV(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom) {
this.b = itemAdditionalMetaDataCustom;
}
@Override // o.InterfaceC12830fIe
public final void e(String str) {
C14957gcv.e(str, "");
ItemAdditionalMetaDataCustom.c(this.b, str);
ItemAdditionalMetaDataCustom.a(this.b);
}
}
@Override // com.scb.phone.components.ItemCustom
public final void a(Context context) {
C14957gcv.e(context, "");
LayoutInflater.from(context).inflate(R.layout.2131558964, (ViewGroup) this, true);
ButterKnife.c(this);
}
/* loaded from: classes5.dex */
public final class TypeMiniQrView extends LinearLayout {
private ItemAdditionalMetaDataCustom c;
public String d;
@BindView
public ImageView imageQrCode;
@BindView
public TextView tvDescription;
@BindView
public TextView tvHeader;
@BindView
public TextView tvTitle;
public /* synthetic */ TypeMiniQrView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context) {
this(itemAdditionalMetaDataCustom, context, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private TypeMiniQrView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context, byte b) {
super(context, null, 0);
C14957gcv.e(context, "");
this.c = itemAdditionalMetaDataCustom;
LayoutInflater.from(getContext()).inflate(R.layout.2131559198, (ViewGroup) this, true);
setOrientation(1);
ButterKnife.c(this, getRootView());
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes5.dex */
public static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR<Bitmap, C14866gag> {
private XL c;
private TypeMiniQrView e;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Bitmap bitmap) {
Bitmap bitmap2 = bitmap;
TypeMiniQrView typeMiniQrView = this.e;
C14957gcv.c(bitmap2, "");
typeMiniQrView.apL_(bitmap2, this.c);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
IeS(TypeMiniQrView typeMiniQrView, XL xl) {
super(1);
this.e = typeMiniQrView;
this.c = xl;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes5.dex */
public static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private TypeMiniQrView b;
private XL c;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
Throwable th2 = th;
TypeMiniQrView typeMiniQrView = this.b;
C14957gcv.c((Object) th2, "");
TypeMiniQrView.c(typeMiniQrView, th2, this.c);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
Sts(TypeMiniQrView typeMiniQrView, XL xl) {
super(1);
this.b = typeMiniQrView;
this.c = xl;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void apL_(Bitmap bitmap, XL xl) {
File file = new File(getContext().getCacheDir(), "pullslip");
if (!file.exists()) {
file.mkdirs();
}
String str = this.d;
ImageView imageView = null;
if (str == null) {
C14957gcv.a("");
str = null;
}
FileOutputStream fileOutputStream = new FileOutputStream(new File(file, str), false);
try {
bitmap.compress(Bitmap.CompressFormat.JPEG, 70, fileOutputStream);
gbF.d(fileOutputStream, null);
ImageView imageView2 = this.imageQrCode;
if (imageView2 != null) {
imageView = imageView2;
} else {
C14957gcv.a("");
}
imageView.setImageBitmap(bitmap);
InterfaceC12830fIe interfaceC12830fIe = this.c.a;
if (interfaceC12830fIe != null) {
String str2 = xl.i;
interfaceC12830fIe.e(str2 != null ? str2 : "");
}
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
gbF.d(fileOutputStream, th);
throw th2;
}
}
}
public static /* synthetic */ void e(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void d(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static final /* synthetic */ void c(TypeMiniQrView typeMiniQrView, Throwable th, XL xl) {
guQ.e(th);
ImageView imageView = typeMiniQrView.imageQrCode;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setVisibility(8);
InterfaceC12830fIe interfaceC12830fIe = typeMiniQrView.c.a;
if (interfaceC12830fIe != null) {
String str = xl.i;
interfaceC12830fIe.e(str != null ? str : "");
}
}
public final void setTvTitle(TextView textView) {
C14957gcv.e(textView, "");
this.tvTitle = textView;
}
public final void setTvHeader(TextView textView) {
C14957gcv.e(textView, "");
this.tvHeader = textView;
}
public final void setTvDescription(TextView textView) {
C14957gcv.e(textView, "");
this.tvDescription = textView;
}
public final void setImageQrCode(ImageView imageView) {
C14957gcv.e(imageView, "");
this.imageQrCode = imageView;
}
public final void setFileName(String str) {
C14957gcv.e(str, "");
this.d = str;
}
}
/* loaded from: classes5.dex */
public final class TypeTextView extends LinearLayout {
final ItemAdditionalMetaDataCustom a;
@BindView
public TextView descriptionTextView;
@BindView
public View divider;
@BindView
public TextView headerTextView;
@BindView
public TextView titleTextView;
public /* synthetic */ TypeTextView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context) {
this(itemAdditionalMetaDataCustom, context, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private TypeTextView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context, byte b) {
super(context, null, 0);
C14957gcv.e(context, "");
this.a = itemAdditionalMetaDataCustom;
LayoutInflater.from(getContext()).inflate(R.layout.2131559199, (ViewGroup) this, true);
setOrientation(1);
ButterKnife.c(this, getRootView());
}
public final void setTitleTextView(TextView textView) {
C14957gcv.e(textView, "");
this.titleTextView = textView;
}
public final void setHeaderTextView(TextView textView) {
C14957gcv.e(textView, "");
this.headerTextView = textView;
}
public final void setDivider(View view) {
C14957gcv.e(view, "");
this.divider = view;
}
public final void setDescriptionTextView(TextView textView) {
C14957gcv.e(textView, "");
this.descriptionTextView = textView;
}
}
/* loaded from: classes5.dex */
public final class TypeTextListView extends LinearLayout {
final ItemAdditionalMetaDataCustom a;
@BindView
public View divider;
@BindView
public TextView tvDescription;
@BindView
public TextView tvTitle;
public /* synthetic */ TypeTextListView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context) {
this(itemAdditionalMetaDataCustom, context, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private TypeTextListView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context, byte b) {
super(context, null, 0);
C14957gcv.e(context, "");
this.a = itemAdditionalMetaDataCustom;
LayoutInflater.from(getContext()).inflate(R.layout.2131559200, (ViewGroup) this, true);
setOrientation(1);
ButterKnife.c(this, getRootView());
}
public final void setTvTitle(TextView textView) {
C14957gcv.e(textView, "");
this.tvTitle = textView;
}
public final void setTvDescription(TextView textView) {
C14957gcv.e(textView, "");
this.tvDescription = textView;
}
public final void setDivider(View view) {
C14957gcv.e(view, "");
this.divider = view;
}
}
/* loaded from: classes5.dex */
public final class TypeTextWithImageView extends LinearLayout {
private ItemAdditionalMetaDataCustom c;
@BindView
public TextView descriptionTextView;
@BindView
public View divider;
@BindView
public TextView headerTextView;
@BindView
public ImageView imageView;
@BindView
public TextView titleTextView;
public /* synthetic */ TypeTextWithImageView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context) {
this(itemAdditionalMetaDataCustom, context, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private TypeTextWithImageView(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, Context context, byte b) {
super(context, null, 0);
C14957gcv.e(context, "");
this.c = itemAdditionalMetaDataCustom;
LayoutInflater.from(getContext()).inflate(R.layout.2131559201, (ViewGroup) this, true);
setOrientation(1);
ButterKnife.c(this, getRootView());
}
/* JADX WARN: Multi-variable type inference failed */
public final View a(XL xl, int i) {
C14957gcv.e(xl, "");
TextView textView = this.titleTextView;
List list = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(xl.g);
TextView textView2 = this.headerTextView;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(xl.d);
TextView textView3 = this.descriptionTextView;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(xl.b);
if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
Glide.e(getContext()).b().a(xl.a).b(new PNS().c(R.color.f3122131099820).a(LHy.c)).a().d(new HBt(this.c, i, xl, this)).b();
} else {
try {
Bitmap bitmap = (Bitmap) Glide.e(getContext()).b().a(xl.a).a().b(new PNS().c(R.color.f3122131099820).a(LHy.c)).b().get();
ImageView imageView = this.imageView;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setImageBitmap(bitmap);
} catch (Exception e) {
guQ.a("Can't get bitmap from cache: ".concat(String.valueOf(e.getMessage())), new Object[0]);
}
InterfaceC12830fIe interfaceC12830fIe = this.c.a;
if (interfaceC12830fIe != null) {
String str = xl.a;
if (str == null) {
str = "";
}
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append(str);
interfaceC12830fIe.e(sb.toString());
}
}
View view = this.divider;
if (view == null) {
C14957gcv.a("");
view = null;
}
List list2 = this.c.e;
if (list2 == null) {
C14957gcv.a("");
} else {
list = list2;
}
view.setVisibility(i == list.size() + (-1) ? 8 : 0);
View rootView = getRootView();
C14957gcv.c(rootView, "");
return rootView;
}
/* loaded from: classes5.dex */
public static final class HBt implements InterfaceC6871cdb<Bitmap> {
private ItemAdditionalMetaDataCustom a;
private XL b;
private TypeTextWithImageView c;
private int e;
HBt(ItemAdditionalMetaDataCustom itemAdditionalMetaDataCustom, int i, XL xl, TypeTextWithImageView typeTextWithImageView) {
this.a = itemAdditionalMetaDataCustom;
this.e = i;
this.b = xl;
this.c = typeTextWithImageView;
}
@Override // o.InterfaceC6871cdb
public final /* synthetic */ boolean e(Bitmap bitmap) {
Bitmap bitmap2 = bitmap;
ImageView imageView = this.c.imageView;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setImageBitmap(bitmap2);
InterfaceC12830fIe interfaceC12830fIe = this.a.a;
if (interfaceC12830fIe == null) {
return true;
}
int i = this.e;
String str = this.b.a;
String str2 = str != null ? str : "";
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append(str2);
interfaceC12830fIe.e(sb.toString());
return true;
}
@Override // o.InterfaceC6871cdb
public final boolean b(GlideException glideException) {
guQ.e(glideException);
InterfaceC12830fIe interfaceC12830fIe = this.a.a;
if (interfaceC12830fIe == null) {
return false;
}
int i = this.e;
String str = this.b.a;
if (str == null) {
str = "";
}
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append(str);
interfaceC12830fIe.e(sb.toString());
return false;
}
}
public final void setTitleTextView(TextView textView) {
C14957gcv.e(textView, "");
this.titleTextView = textView;
}
public final void setImageView(ImageView imageView) {
C14957gcv.e(imageView, "");
this.imageView = imageView;
}
public final void setHeaderTextView(TextView textView) {
C14957gcv.e(textView, "");
this.headerTextView = textView;
}
public final void setDivider(View view) {
C14957gcv.e(view, "");
this.divider = view;
}
public final void setDescriptionTextView(TextView textView) {
C14957gcv.e(textView, "");
this.descriptionTextView = textView;
}
}
/* JADX WARN: Failed to find 'out' block for switch in B:68:0x0100. Please report as an issue. */
/* JADX WARN: Removed duplicated region for block: B:93:0x0409 */
/* JADX WARN: Removed duplicated region for block: B:99:0x0415 A[SYNTHETIC] */
@Override // com.scb.phone.components.ItemCustom
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void setUpWithDisplay(o.QG r20) {
/*
Method dump skipped, instructions count: 1094
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.custom.item.ItemAdditionalMetaDataCustom.setUpWithDisplay(o.QG):void");
}
public final void setContainer(LinearLayout linearLayout) {
C14957gcv.e(linearLayout, "");
this.container = linearLayout;
}
static {
new Sts((byte) 0);
}
}