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

76 lines
3.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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 com.scb.phone.view.fragment.investment.BaseInvestmentSuccessFragment;
import java.util.Arrays;
import java.util.Calendar;
/* renamed from: o.fLw, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12945fLw {
private final C6204cLu e;
@InterfaceC13391fZD
public C12945fLw(C6204cLu c6204cLu) {
C14957gcv.e(c6204cLu, "");
this.e = c6204cLu;
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
public static final Uri aAD_(C12945fLw c12945fLw, OI oi, Context context, String str, boolean z) {
C14957gcv.e(c12945fLw, "");
C14957gcv.e(oi, "");
C14957gcv.e(context, "");
C14957gcv.e(str, "");
StringBuilder sb = new StringBuilder();
sb.append(oi.a);
if (z) {
sb.append("-");
sb.append(Calendar.getInstance().getTimeInMillis());
}
gcH gch = gcH.d;
String format = String.format("FUND_%s.jpg", Arrays.copyOf(new Object[]{sb}, 1));
C14957gcv.c((Object) format, "");
Bitmap bitmap = null;
try {
LayoutInflater from = LayoutInflater.from(context);
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
C14866gag c14866gag = C14866gag.c;
View inflate = from.inflate(com.scb.phone.R.layout.2131560103, (ViewGroup) linearLayout, false);
new BaseInvestmentSuccessFragment().d(oi, inflate, context, str);
C14957gcv.c(inflate, "");
View findViewById = inflate.findViewById(com.scb.phone.R.id.layout_theme_slip);
ThemeSlipLayout themeSlipLayout = findViewById instanceof ThemeSlipLayout ? (ThemeSlipLayout) findViewById : null;
if (themeSlipLayout != null) {
C6204cLu c6204cLu = c12945fLw.e;
c6204cLu.d = themeSlipLayout;
c6204cLu.e();
}
DisplayMetrics displayMetrics = new DisplayMetrics();
Object systemService = context.getSystemService("window");
WindowManager windowManager = systemService instanceof WindowManager ? (WindowManager) systemService : null;
if (windowManager != null) {
windowManager.getDefaultDisplay().getMetrics(displayMetrics);
}
C13396fZU c13396fZU = new C13396fZU(Integer.valueOf(displayMetrics.widthPixels), Integer.valueOf(inflate.getLayoutParams().height));
bitmap = C12946fLx.aAB_(inflate, ((Number) c13396fZU.d).intValue(), ((Number) c13396fZU.e).intValue());
return C6582cXO.VN_(bitmap, format, context);
} finally {
if (bitmap != null) {
bitmap.recycle();
}
}
}
}