Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
package com.tencent.open.c;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.widget.RelativeLayout;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class a extends RelativeLayout {
private static final String a = a.class.getName();
private Rect b;
private boolean c;
private InterfaceC0018a d;
/* compiled from: ProGuard */
/* renamed from: com.tencent.open.c.a$a, reason: collision with other inner class name */
public interface InterfaceC0018a {
void a();
void a(int i);
}
public a(Context context) {
super(context);
this.b = null;
this.c = false;
this.d = null;
if (this.b == null) {
this.b = new Rect();
}
}
public void a(InterfaceC0018a interfaceC0018a) {
this.d = interfaceC0018a;
}
@Override // android.widget.RelativeLayout, android.view.View
protected void onMeasure(int i, int i2) {
int size = View.MeasureSpec.getSize(i2);
Activity activity = (Activity) getContext();
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(this.b);
int height = (activity.getWindowManager().getDefaultDisplay().getHeight() - this.b.top) - size;
InterfaceC0018a interfaceC0018a = this.d;
if (interfaceC0018a != null && size != 0) {
if (height > 100) {
interfaceC0018a.a((Math.abs(this.b.height()) - getPaddingBottom()) - getPaddingTop());
} else {
interfaceC0018a.a();
}
}
super.onMeasure(i, i2);
}
}

View File

@@ -0,0 +1,30 @@
package com.tencent.open.c;
import android.content.Context;
import android.webkit.WebSettings;
import android.webkit.WebView;
import java.lang.reflect.Method;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class b extends WebView {
public b(Context context) {
super(context);
}
@Override // android.webkit.WebView, android.view.ViewGroup, android.view.View
protected void onAttachedToWindow() {
super.onAttachedToWindow();
WebSettings settings = getSettings();
if (settings == null) {
return;
}
try {
Method method = settings.getClass().getMethod("removeJavascriptInterface", String.class);
if (method != null) {
method.invoke(this, "searchBoxJavaBridge_");
}
} catch (Exception unused) {
}
}
}

View File

@@ -0,0 +1,96 @@
package com.tencent.open.c;
import android.content.Context;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import com.tencent.open.a.f;
import com.tencent.open.web.security.SecureJsInterface;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class c extends b {
public static boolean a;
private KeyEvent b;
private com.tencent.open.web.security.a c;
public c(Context context) {
super(context);
}
@Override // android.webkit.WebView, android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
int unicodeChar;
f.b("openSDK_LOG.SecureWebView", "-->dispatchKeyEvent, is device support: " + a);
if (!a) {
return super.dispatchKeyEvent(keyEvent);
}
if (keyEvent.getAction() != 0) {
return super.dispatchKeyEvent(keyEvent);
}
int keyCode = keyEvent.getKeyCode();
if (keyCode == 4) {
return super.dispatchKeyEvent(keyEvent);
}
if (keyCode == 66) {
return super.dispatchKeyEvent(keyEvent);
}
if (keyCode == 67) {
com.tencent.open.web.security.a.b = true;
return super.dispatchKeyEvent(keyEvent);
}
if (keyEvent.getUnicodeChar() == 0) {
return super.dispatchKeyEvent(keyEvent);
}
if (!SecureJsInterface.isPWDEdit || (((unicodeChar = keyEvent.getUnicodeChar()) < 33 || unicodeChar > 95) && (unicodeChar < 97 || unicodeChar > 125))) {
return super.dispatchKeyEvent(keyEvent);
}
this.b = new KeyEvent(0, 17);
return super.dispatchKeyEvent(this.b);
}
@Override // android.webkit.WebView, android.view.View
public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
f.c("openSDK_LOG.SecureWebView", "-->create input connection, is edit: " + SecureJsInterface.isPWDEdit);
InputConnection onCreateInputConnection = super.onCreateInputConnection(editorInfo);
f.a("openSDK_LOG.SecureWebView", "-->onCreateInputConnection, inputConn is " + onCreateInputConnection);
if (onCreateInputConnection == null) {
a = false;
return onCreateInputConnection;
}
a = true;
this.c = new com.tencent.open.web.security.a(super.onCreateInputConnection(editorInfo), false);
return this.c;
}
@Override // android.webkit.WebView, android.view.View, android.view.KeyEvent.Callback
public boolean onKeyDown(int i, KeyEvent keyEvent) {
int unicodeChar;
f.b("openSDK_LOG.SecureWebView", "-->onKeyDown, is device support: " + a);
if (!a) {
return super.onKeyDown(i, keyEvent);
}
if (keyEvent.getAction() != 0) {
return super.onKeyDown(i, keyEvent);
}
int keyCode = keyEvent.getKeyCode();
if (keyCode == 4) {
return super.onKeyDown(i, keyEvent);
}
if (keyCode == 66) {
return super.onKeyDown(i, keyEvent);
}
if (keyCode == 67) {
com.tencent.open.web.security.a.b = true;
return super.onKeyDown(i, keyEvent);
}
if (keyEvent.getUnicodeChar() == 0) {
return super.onKeyDown(i, keyEvent);
}
if (!SecureJsInterface.isPWDEdit || (((unicodeChar = keyEvent.getUnicodeChar()) < 33 || unicodeChar > 95) && (unicodeChar < 97 || unicodeChar > 125))) {
return super.onKeyDown(i, keyEvent);
}
this.b = new KeyEvent(0, 17);
return super.onKeyDown(this.b.getKeyCode(), this.b);
}
}