138 lines
5.7 KiB
Java
138 lines
5.7 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 android.widget.TextView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.view.custom.easycash.CustomEasycashCommonSuccessView;
|
||
|
import com.scb.phone.view.fragment.easycash.EasycashScreenShotFragment;
|
||
|
import java.util.List;
|
||
|
import java.util.UUID;
|
||
|
import java.util.concurrent.Callable;
|
||
|
|
||
|
/* renamed from: o.fLf, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class C12928fLf {
|
||
|
public static AbstractC13163fSk<Uri> e(final List<C0613Kq> list, final C0605Kk c0605Kk, final Context context, final boolean z, final boolean z2, final int i, final boolean z3) {
|
||
|
return AbstractC13163fSk.fromCallable(new Callable(c0605Kk, z3, list, context, z2, i, z) { // from class: o.fLb
|
||
|
private C0605Kk a;
|
||
|
private boolean b;
|
||
|
private List c;
|
||
|
private boolean d;
|
||
|
private Context e;
|
||
|
private boolean h;
|
||
|
private int i;
|
||
|
|
||
|
@Override // java.util.concurrent.Callable
|
||
|
public final Object call() {
|
||
|
return C12928fLf.aAs_(this.a, this.b, this.c, this.e, this.d, this.i, this.h);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = c0605Kk;
|
||
|
this.b = z3;
|
||
|
this.c = list;
|
||
|
this.e = context;
|
||
|
this.d = z2;
|
||
|
this.i = i;
|
||
|
this.h = z;
|
||
|
}
|
||
|
}).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static /* synthetic */ Uri aAs_(C0605Kk c0605Kk, boolean z, List list, Context context, boolean z2, int i, boolean z3) throws Exception {
|
||
|
Throwable th;
|
||
|
Bitmap bitmap;
|
||
|
Uri VO_;
|
||
|
String obj = UUID.randomUUID().toString();
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
String str = c0605Kk.c;
|
||
|
C14957gcv.e(obj, "");
|
||
|
if (str == null) {
|
||
|
str = obj;
|
||
|
}
|
||
|
sb.append(str);
|
||
|
if (z) {
|
||
|
sb.append("_");
|
||
|
sb.append(obj);
|
||
|
}
|
||
|
String format = String.format("lending_%s.jpg", sb.toString());
|
||
|
try {
|
||
|
LinearLayout linearLayout = new LinearLayout(context);
|
||
|
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
|
||
|
int i2 = 0;
|
||
|
View inflate = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560087, (ViewGroup) linearLayout, false);
|
||
|
if (z2) {
|
||
|
inflate.findViewById(com.scb.phone.R.id.end_slip).setVisibility(0);
|
||
|
inflate.findViewById(com.scb.phone.R.id.root_layout).setBackground(nMh.getDrawable(context, com.scb.phone.R.drawable.slip_bg));
|
||
|
} else {
|
||
|
inflate.findViewById(com.scb.phone.R.id.root_layout).setBackgroundColor(nMh.getColor(context, com.scb.phone.R.color.f14042131100912));
|
||
|
}
|
||
|
if (c0605Kk.b != null) {
|
||
|
TextView textView = (TextView) inflate.findViewById(com.scb.phone.R.id.text_reference_id);
|
||
|
textView.setVisibility(0);
|
||
|
textView.setText(c0605Kk.b);
|
||
|
}
|
||
|
if (c0605Kk.e != null) {
|
||
|
TextView textView2 = (TextView) inflate.findViewById(com.scb.phone.R.id.text_loan_app_id);
|
||
|
textView2.setVisibility(0);
|
||
|
textView2.setText(c0605Kk.e);
|
||
|
}
|
||
|
EasycashScreenShotFragment easycashScreenShotFragment = new EasycashScreenShotFragment();
|
||
|
ButterKnife.c(easycashScreenShotFragment, inflate);
|
||
|
easycashScreenShotFragment.titleSuccessTextView.setText(c0605Kk.f);
|
||
|
if (gjJ.a(c0605Kk.d)) {
|
||
|
easycashScreenShotFragment.descriptionText.setText(c0605Kk.d);
|
||
|
easycashScreenShotFragment.descriptionText.setVisibility(0);
|
||
|
}
|
||
|
if (gjJ.a(c0605Kk.b)) {
|
||
|
easycashScreenShotFragment.refIdTextView.setText(c0605Kk.b);
|
||
|
}
|
||
|
if (gjJ.a(c0605Kk.e)) {
|
||
|
easycashScreenShotFragment.loanAppIdTextView.setText(c0605Kk.e);
|
||
|
}
|
||
|
if (gjJ.a(c0605Kk.a)) {
|
||
|
easycashScreenShotFragment.dateTimeTextView.setText(c0605Kk.a);
|
||
|
}
|
||
|
CustomEasycashCommonSuccessView customEasycashCommonSuccessView = new CustomEasycashCommonSuccessView(context);
|
||
|
while (i2 < list.size()) {
|
||
|
C0613Kq c0613Kq = (C0613Kq) list.get(i2);
|
||
|
i2++;
|
||
|
customEasycashCommonSuccessView.a(c0613Kq, i2, z2, i);
|
||
|
}
|
||
|
easycashScreenShotFragment.successCommonView.addView(customEasycashCommonSuccessView);
|
||
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||
|
((WindowManager) context.getSystemService("window")).getDefaultDisplay().getMetrics(displayMetrics);
|
||
|
bitmap = C12946fLx.aAB_(inflate, displayMetrics.widthPixels, displayMetrics.widthPixels << 2);
|
||
|
try {
|
||
|
if (z3) {
|
||
|
VO_ = C6582cXO.VN_(bitmap, format, context);
|
||
|
} else {
|
||
|
VO_ = C6582cXO.VO_(bitmap, context, "screen_image.jpg");
|
||
|
}
|
||
|
if (bitmap != null) {
|
||
|
bitmap.recycle();
|
||
|
}
|
||
|
return VO_;
|
||
|
} catch (Throwable th2) {
|
||
|
th = th2;
|
||
|
if (bitmap != null) {
|
||
|
bitmap.recycle();
|
||
|
}
|
||
|
throw th;
|
||
|
}
|
||
|
} catch (Throwable th3) {
|
||
|
th = th3;
|
||
|
bitmap = null;
|
||
|
}
|
||
|
}
|
||
|
}
|