what-the-bank/sources/o/fKR.java

111 lines
3.6 KiB
Java

package o;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.LinearLayout;
import com.scb.phone.view.custom.ThemeSlipLayout;
import o.EZ;
/* loaded from: classes5.dex */
public abstract class fKR<T extends EZ> {
private final C6204cLu c;
public abstract void b(T t, View view);
public fKR() {
this.c = null;
}
public fKR(C6204cLu c6204cLu) {
this.c = c6204cLu;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: Multi-variable type inference failed */
public final /* synthetic */ Uri aAo_(EZ ez, Context context) throws Exception {
Bitmap bitmap;
Uri VN_;
try {
bitmap = aAl_(ez, context);
} catch (Throwable th) {
th = th;
bitmap = null;
}
try {
if (ez.b) {
StringBuilder sb = new StringBuilder();
sb.append(ez.c());
sb.append(".jpg");
VN_ = C6582cXO.VO_(bitmap, context, sb.toString());
} else {
StringBuilder sb2 = new StringBuilder();
sb2.append(ez.c());
sb2.append(".jpg");
VN_ = C6582cXO.VN_(bitmap, sb2.toString(), context);
}
if (bitmap != null) {
bitmap.recycle();
}
return VN_;
} catch (Throwable th2) {
th = th2;
if (bitmap != null) {
bitmap.recycle();
}
throw th;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ Uri aAn_(Bitmap bitmap, EZ ez, Context context) throws Exception {
try {
StringBuilder sb = new StringBuilder();
sb.append(ez.c());
sb.append(".jpg");
return C6582cXO.VN_(bitmap, sb.toString(), context);
} finally {
if (bitmap != null) {
bitmap.recycle();
}
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: Multi-variable type inference failed */
public final /* synthetic */ Bitmap aAm_(EZ ez, Context context) throws Exception {
try {
return aAl_(ez, context);
} catch (Exception unused) {
guQ.a("Bitmap throws exception", new Object[0]);
return null;
} catch (OutOfMemoryError unused2) {
guQ.a("Bitmap Out of memory error", new Object[0]);
return null;
}
}
private Bitmap aAl_(T t, Context context) {
C6204cLu c6204cLu;
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
View inflate = LayoutInflater.from(context).inflate(t.a, (ViewGroup) linearLayout, false);
b(t, inflate);
DisplayMetrics displayMetrics = new DisplayMetrics();
((WindowManager) context.getSystemService("window")).getDefaultDisplay().getMetrics(displayMetrics);
int i = displayMetrics.widthPixels;
int i2 = inflate.getLayoutParams().height;
ThemeSlipLayout themeSlipLayout = (ThemeSlipLayout) inflate.findViewById(com.scb.phone.R.id.layout_theme_slip);
if (themeSlipLayout != null && (c6204cLu = this.c) != null) {
c6204cLu.d = themeSlipLayout;
c6204cLu.e();
}
return C12946fLx.aAB_(inflate, i, i2);
}
}