131 lines
4.5 KiB
Java
131 lines
4.5 KiB
Java
package com.scb.phone.view.custom.webview;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.webkit.WebChromeClient;
|
|
import android.webkit.WebSettings;
|
|
import android.webkit.WebView;
|
|
import o.C12956fMd;
|
|
import o.C14957gcv;
|
|
import o.InterfaceC12921fLV;
|
|
import o.InterfaceC12922fLZ;
|
|
import o.InterfaceC12954fMb;
|
|
import o.RunnableC10451eEl;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class SCBWebView extends WebView {
|
|
private /* synthetic */ SCBWebView(Context context, byte b) {
|
|
this(context, (AttributeSet) null);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public SCBWebView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public SCBWebView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
|
|
public final void b(String str, String str2) {
|
|
C14957gcv.e(str, "");
|
|
String str3 = str2;
|
|
String str4 = (str3 == null || str3.length() == 0) ? str : null;
|
|
if (str4 == null) {
|
|
StringBuilder sb = new StringBuilder("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
|
|
sb.append(str2);
|
|
sb.append("\"/>");
|
|
sb.append(str);
|
|
str4 = sb.toString();
|
|
}
|
|
loadDataWithBaseURL("file:///android_asset/", str4, "text/html", "utf-8", null);
|
|
}
|
|
|
|
public static /* synthetic */ void setAdvanceWebView$default(SCBWebView sCBWebView, InterfaceC12954fMb interfaceC12954fMb, WebChromeClient webChromeClient, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
webChromeClient = new WebChromeClient();
|
|
}
|
|
sCBWebView.setAdvanceWebView(interfaceC12954fMb, webChromeClient);
|
|
}
|
|
|
|
public final void setAdvanceWebView(InterfaceC12954fMb interfaceC12954fMb, WebChromeClient webChromeClient) {
|
|
C14957gcv.e(interfaceC12954fMb, "");
|
|
C14957gcv.e(webChromeClient, "");
|
|
setWebChromeClient(webChromeClient);
|
|
WebSettings settings = getSettings();
|
|
settings.setJavaScriptEnabled(interfaceC12954fMb.aA_());
|
|
settings.setDomStorageEnabled(interfaceC12954fMb.P_());
|
|
settings.setBuiltInZoomControls(interfaceC12954fMb.F_());
|
|
settings.setDisplayZoomControls(interfaceC12954fMb.G_());
|
|
Integer N = interfaceC12954fMb.N();
|
|
if (N != null) {
|
|
settings.setTextZoom(N.intValue());
|
|
}
|
|
Boolean K_ = interfaceC12954fMb.K_();
|
|
if (K_ != null) {
|
|
clearCache(K_.booleanValue());
|
|
clearHistory();
|
|
}
|
|
}
|
|
|
|
public final void setJavascriptInterface(InterfaceC12921fLV interfaceC12921fLV, String str) {
|
|
C14957gcv.e(interfaceC12921fLV, "");
|
|
C14957gcv.e(str, "");
|
|
addJavascriptInterface(new C12956fMd(interfaceC12921fLV), str);
|
|
}
|
|
|
|
public static /* synthetic */ void a(SCBWebView sCBWebView, InterfaceC12922fLZ interfaceC12922fLZ) {
|
|
C14957gcv.e(interfaceC12922fLZ, "");
|
|
C14957gcv.e("", "");
|
|
sCBWebView.post(new RunnableC10451eEl("", interfaceC12922fLZ, sCBWebView));
|
|
}
|
|
|
|
public final void setWebViewBackgroundColor(int i) {
|
|
setBackgroundColor(nMh.getColor(getContext(), i));
|
|
}
|
|
|
|
public final int e() {
|
|
return computeVerticalScrollRange();
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV {
|
|
private RVV() {
|
|
}
|
|
|
|
public /* synthetic */ RVV(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(String str, InterfaceC12922fLZ interfaceC12922fLZ, SCBWebView sCBWebView) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(interfaceC12922fLZ, "");
|
|
C14957gcv.e(sCBWebView, "");
|
|
String b = str.length() == 0 ? interfaceC12922fLZ.b() : null;
|
|
if (b == null) {
|
|
b = interfaceC12922fLZ.d(str);
|
|
}
|
|
sCBWebView.evaluateJavascript(b, null);
|
|
}
|
|
|
|
public final void setAdvanceWebView(InterfaceC12954fMb interfaceC12954fMb) {
|
|
C14957gcv.e(interfaceC12954fMb, "");
|
|
setAdvanceWebView$default(this, interfaceC12954fMb, null, 2, null);
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public SCBWebView(Context context) {
|
|
this(context, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
|
|
static {
|
|
new RVV((byte) 0);
|
|
}
|
|
}
|