298 lines
14 KiB
Java
298 lines
14 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.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.view.custom.ThemeSlipLayout;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.requesttopay.RtpScreenshotFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.BNPLSuccessScreenshotFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.LevelUpRepaymentQrScreenshotFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.ScreenshotFragment;
|
|
import java.util.Calendar;
|
|
|
|
/* renamed from: o.fLv, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public class C12944fLv {
|
|
private int a = com.scb.phone.R.layout.2131560156;
|
|
private final C6204cLu d;
|
|
|
|
@InterfaceC13391fZD
|
|
public C12944fLv(C6204cLu c6204cLu) {
|
|
this.d = c6204cLu;
|
|
}
|
|
|
|
private static int b(String str) {
|
|
return "rtp.requester".equals(str) ? com.scb.phone.R.layout.2131560137 : "BILLPAYMENT".equals(str) ? com.scb.phone.R.layout.2131558842 : "BNPL_PAYMENT".equals(str) ? com.scb.phone.R.layout.2131560058 : "LEVLEUP_LOAN_REPAYMENT_QR".equals(str) ? com.scb.phone.R.layout.2131560104 : com.scb.phone.R.layout.2131560156;
|
|
}
|
|
|
|
public static /* synthetic */ void c(C12944fLv c12944fLv, C1191Xp c1191Xp, boolean z, Context context, boolean z2, boolean z3, InterfaceC13168fSp interfaceC13168fSp) {
|
|
Uri VO_;
|
|
String valueOf = String.valueOf(Calendar.getInstance().getTimeInMillis());
|
|
StringBuilder sb = new StringBuilder();
|
|
String str = c1191Xp.l;
|
|
C14957gcv.e(valueOf, "");
|
|
if (str == null) {
|
|
str = valueOf;
|
|
}
|
|
sb.append(str);
|
|
if (z) {
|
|
sb.append("-");
|
|
sb.append(valueOf);
|
|
}
|
|
String format = String.format("TXN_%s.jpg", sb.toString());
|
|
Bitmap bitmap = null;
|
|
try {
|
|
try {
|
|
LinearLayout linearLayout = new LinearLayout(context);
|
|
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
|
|
View inflate = LayoutInflater.from(context).inflate(c12944fLv.a, (ViewGroup) linearLayout, false);
|
|
if ("rtp.requester".equals(c1191Xp.p.j())) {
|
|
new RtpScreenshotFragment().a(c1191Xp.p, inflate, context);
|
|
} else if ("BNPL_PAYMENT".equals(c1191Xp.p.j())) {
|
|
new BNPLSuccessScreenshotFragment().a(c1191Xp, inflate, context, z2);
|
|
} else if ("LEVLEUP_LOAN_REPAYMENT_QR".equals(c1191Xp.p.j())) {
|
|
LevelUpRepaymentQrScreenshotFragment levelUpRepaymentQrScreenshotFragment = new LevelUpRepaymentQrScreenshotFragment();
|
|
C1188Xn c1188Xn = c1191Xp.k;
|
|
C14957gcv.e(c1188Xn, "");
|
|
C14957gcv.e(inflate, "");
|
|
((BaseFragment) levelUpRepaymentQrScreenshotFragment).a = ButterKnife.c(levelUpRepaymentQrScreenshotFragment, inflate);
|
|
TextView textView = levelUpRepaymentQrScreenshotFragment.tvBillName;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(c1188Xn.d);
|
|
TextView textView2 = levelUpRepaymentQrScreenshotFragment.tvBillRef1;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(c1188Xn.a);
|
|
String str2 = c1188Xn.c;
|
|
if (str2 != null && str2.length() != 0) {
|
|
TextView textView3 = levelUpRepaymentQrScreenshotFragment.tvBillRef2;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
TextView textView4 = textView3;
|
|
C14957gcv.e(textView4, "");
|
|
textView4.setVisibility(0);
|
|
TextView textView5 = levelUpRepaymentQrScreenshotFragment.tvBillRef2;
|
|
if (textView5 == null) {
|
|
C14957gcv.a("");
|
|
textView5 = null;
|
|
}
|
|
textView5.setText(c1188Xn.c);
|
|
}
|
|
Bitmap bitmap2 = c1188Xn.h;
|
|
ImageView imageView = levelUpRepaymentQrScreenshotFragment.ivQrIcon;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setImageBitmap(bitmap2);
|
|
String str3 = c1188Xn.j;
|
|
if (str3 == null) {
|
|
str3 = "";
|
|
}
|
|
String str4 = c1188Xn.i;
|
|
if (str4 == null) {
|
|
str4 = "";
|
|
}
|
|
TextView textView6 = levelUpRepaymentQrScreenshotFragment.tvHeaderTitle;
|
|
if (textView6 == null) {
|
|
C14957gcv.a("");
|
|
textView6 = null;
|
|
}
|
|
textView6.setText(str3);
|
|
TextView textView7 = levelUpRepaymentQrScreenshotFragment.tvHeaderDescription;
|
|
if (textView7 == null) {
|
|
C14957gcv.a("");
|
|
textView7 = null;
|
|
}
|
|
textView7.setText(str4);
|
|
TextView textView8 = levelUpRepaymentQrScreenshotFragment.tvRemark;
|
|
if (textView8 == null) {
|
|
C14957gcv.a("");
|
|
textView8 = null;
|
|
}
|
|
String str5 = c1188Xn.f;
|
|
if (str5 == null) {
|
|
str5 = "";
|
|
}
|
|
textView8.setText(C3172asW.qI_(str5, 0));
|
|
if (C14957gcv.b(c1188Xn.g, Boolean.TRUE)) {
|
|
String str6 = c1188Xn.l;
|
|
if (str6 == null) {
|
|
str6 = "";
|
|
}
|
|
String str7 = c1188Xn.b;
|
|
if (str7 == null) {
|
|
str7 = "";
|
|
}
|
|
LinearLayout linearLayout2 = levelUpRepaymentQrScreenshotFragment.llQrSlipVertical;
|
|
if (linearLayout2 == null) {
|
|
C14957gcv.a("");
|
|
linearLayout2 = null;
|
|
}
|
|
LinearLayout linearLayout3 = linearLayout2;
|
|
C14957gcv.e(linearLayout3, "");
|
|
linearLayout3.setVisibility(8);
|
|
LinearLayout linearLayout4 = levelUpRepaymentQrScreenshotFragment.llQrSlipHorizontal;
|
|
if (linearLayout4 == null) {
|
|
C14957gcv.a("");
|
|
linearLayout4 = null;
|
|
}
|
|
LinearLayout linearLayout5 = linearLayout4;
|
|
C14957gcv.e(linearLayout5, "");
|
|
linearLayout5.setVisibility(0);
|
|
TextView textView9 = levelUpRepaymentQrScreenshotFragment.tvDescriptionLeft;
|
|
if (textView9 == null) {
|
|
C14957gcv.a("");
|
|
textView9 = null;
|
|
}
|
|
textView9.setText(C3172asW.qI_(str6, 0));
|
|
TextView textView10 = levelUpRepaymentQrScreenshotFragment.tvDescriptionRight;
|
|
if (textView10 == null) {
|
|
C14957gcv.a("");
|
|
textView10 = null;
|
|
}
|
|
textView10.setText(C3172asW.qI_(str7, 0));
|
|
} else {
|
|
String str8 = c1188Xn.l;
|
|
if (str8 == null) {
|
|
str8 = "";
|
|
}
|
|
LinearLayout linearLayout6 = levelUpRepaymentQrScreenshotFragment.llQrSlipVertical;
|
|
if (linearLayout6 == null) {
|
|
C14957gcv.a("");
|
|
linearLayout6 = null;
|
|
}
|
|
LinearLayout linearLayout7 = linearLayout6;
|
|
C14957gcv.e(linearLayout7, "");
|
|
linearLayout7.setVisibility(0);
|
|
LinearLayout linearLayout8 = levelUpRepaymentQrScreenshotFragment.llQrSlipHorizontal;
|
|
if (linearLayout8 == null) {
|
|
C14957gcv.a("");
|
|
linearLayout8 = null;
|
|
}
|
|
LinearLayout linearLayout9 = linearLayout8;
|
|
C14957gcv.e(linearLayout9, "");
|
|
linearLayout9.setVisibility(8);
|
|
TextView textView11 = levelUpRepaymentQrScreenshotFragment.tvTitle;
|
|
if (textView11 == null) {
|
|
C14957gcv.a("");
|
|
textView11 = null;
|
|
}
|
|
textView11.setText(C3172asW.qI_(str8, 0));
|
|
String str9 = c1188Xn.e;
|
|
if (str9 == null) {
|
|
str9 = "";
|
|
}
|
|
TextView textView12 = levelUpRepaymentQrScreenshotFragment.tvAmount;
|
|
if (textView12 == null) {
|
|
C14957gcv.a("");
|
|
textView12 = null;
|
|
}
|
|
textView12.setText(C3172asW.qI_(str9, 0));
|
|
String str10 = c1188Xn.b;
|
|
if (str10 != null && str10.length() != 0) {
|
|
String str11 = c1188Xn.b;
|
|
if (str11 == null) {
|
|
str11 = "";
|
|
}
|
|
TextView textView13 = levelUpRepaymentQrScreenshotFragment.tvDescription;
|
|
if (textView13 == null) {
|
|
C14957gcv.a("");
|
|
textView13 = null;
|
|
}
|
|
TextView textView14 = textView13;
|
|
C14957gcv.e(textView14, "");
|
|
textView14.setVisibility(0);
|
|
TextView textView15 = levelUpRepaymentQrScreenshotFragment.tvDescription;
|
|
if (textView15 == null) {
|
|
C14957gcv.a("");
|
|
textView15 = null;
|
|
}
|
|
textView15.setText(str11);
|
|
}
|
|
}
|
|
} else {
|
|
new ScreenshotFragment().a(c1191Xp, inflate, context);
|
|
}
|
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
|
((WindowManager) context.getSystemService("window")).getDefaultDisplay().getMetrics(displayMetrics);
|
|
int i = displayMetrics.widthPixels;
|
|
int i2 = displayMetrics.widthPixels;
|
|
ThemeSlipLayout themeSlipLayout = (ThemeSlipLayout) inflate.findViewById(com.scb.phone.R.id.layout_theme_slip);
|
|
if (themeSlipLayout != null) {
|
|
C6204cLu c6204cLu = c12944fLv.d;
|
|
c6204cLu.d = themeSlipLayout;
|
|
c6204cLu.e();
|
|
}
|
|
bitmap = C12946fLx.aAB_(inflate, i, i2 * 7);
|
|
if (z3) {
|
|
VO_ = C6582cXO.VN_(bitmap, format, context);
|
|
} else {
|
|
VO_ = C6582cXO.VO_(bitmap, context, "screen_image.jpg");
|
|
}
|
|
if (VO_ != null) {
|
|
interfaceC13168fSp.e(VO_);
|
|
}
|
|
interfaceC13168fSp.c();
|
|
if (bitmap == null) {
|
|
return;
|
|
}
|
|
} catch (Exception e) {
|
|
interfaceC13168fSp.c(e);
|
|
if (bitmap == null) {
|
|
return;
|
|
}
|
|
}
|
|
bitmap.recycle();
|
|
} catch (Throwable th) {
|
|
if (bitmap != null) {
|
|
bitmap.recycle();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public final AbstractC13163fSk<Uri> d(final C1191Xp c1191Xp, final Context context, final boolean z, final boolean z2, final boolean z3) {
|
|
this.a = b(c1191Xp.p.j());
|
|
return AbstractC13163fSk.create(new InterfaceC13170fSr(this, c1191Xp, z2, context, z3, z) { // from class: o.fLu
|
|
private boolean a;
|
|
private boolean b;
|
|
private C1191Xp c;
|
|
private Context d;
|
|
private C12944fLv e;
|
|
private boolean g;
|
|
|
|
@Override // o.InterfaceC13170fSr
|
|
public final void b(InterfaceC13168fSp interfaceC13168fSp) {
|
|
C12944fLv.c(this.e, this.c, this.b, this.d, this.a, this.g, interfaceC13168fSp);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
this.c = c1191Xp;
|
|
this.b = z2;
|
|
this.d = context;
|
|
this.a = z3;
|
|
this.g = z;
|
|
}
|
|
}).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
|
|
}
|
|
}
|