54 lines
2.1 KiB
Java
54 lines
2.1 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.fragment.chequemanagement.ChequeScreenshotFragment;
|
|
|
|
/* renamed from: o.fKV, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public final class C12887fKV {
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static /* synthetic */ Uri aAr_(C1191Xp c1191Xp, Context context, boolean z) throws Exception {
|
|
Throwable th;
|
|
Bitmap bitmap;
|
|
Uri VO_;
|
|
String format = String.format("CHEQUE_%s.jpg", c1191Xp.l);
|
|
try {
|
|
LinearLayout linearLayout = new LinearLayout(context);
|
|
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
|
|
View inflate = LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560071, (ViewGroup) linearLayout, false);
|
|
new ChequeScreenshotFragment().c(c1191Xp, inflate, context);
|
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
|
((WindowManager) context.getSystemService("window")).getDefaultDisplay().getMetrics(displayMetrics);
|
|
bitmap = C12946fLx.aAB_(inflate, displayMetrics.widthPixels, displayMetrics.widthPixels << 2);
|
|
try {
|
|
if (z) {
|
|
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;
|
|
}
|
|
}
|
|
}
|