拼多多跨境 v1.0.0版本的 MD5 值为:46d7e086dc764eefcdcf4fedc6f7a054
以下内容为反编译后的 n.java 源代码,内容仅作参考
package co.median.android;
import H0.E;
import H0.K;
import android.content.Context;
import android.os.Bundle;
import android.util.JsonReader;
import android.util.JsonToken;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.webkit.ValueCallback;
import android.webkit.WebBackForwardList;
import android.webkit.WebChromeClient;
import android.webkit.WebHistoryItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.io.IOException;
import java.io.StringReader;
public class n extends WebView implements L0.i {
private WebViewClient f6927g;
private WebChromeClient f6928h;
private boolean f6929i;
private GestureDetector f6930j;
private boolean f6931k;
GestureDetector.SimpleOnGestureListener f6932l;
class a extends GestureDetector.SimpleOnGestureListener {
a() {
}
@Override
public boolean onDown(MotionEvent motionEvent) {
return true;
}
@Override
public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f2, float f3) {
n.f(n.this);
return false;
}
@Override
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f2, float f3) {
n.f(n.this);
return false;
}
}
public class b implements ValueCallback {
b() {
}
@Override
public void onReceiveValue(String str) {
JsonReader jsonReader = new JsonReader(new StringReader(str));
jsonReader.setLenient(true);
try {
if (jsonReader.peek() != JsonToken.NULL) {
if (jsonReader.peek() == JsonToken.STRING && (str = jsonReader.nextString()) == null) {
return;
}
K.f471a = str;
}
} catch (IOException unused) {
K.f471a = "GoNativeGetJsResultsError";
}
}
}
public interface c {
}
public n(Context context) {
super(context);
this.f6927g = null;
this.f6928h = null;
this.f6929i = true;
this.f6931k = false;
this.f6932l = new a();
this.f6930j = new GestureDetector(context, this.f6932l);
}
static c f(n nVar) {
nVar.getClass();
return null;
}
public static boolean g() {
return false;
}
@Override
public void a(String str) {
evaluateJavascript(str, new b());
}
@Override
public void b(String str) {
super.loadUrl(str);
}
@Override
public void c(Bundle bundle) {
saveState(bundle);
}
@Override
public boolean canGoForward() {
WebBackForwardList copyBackForwardList = copyBackForwardList();
WebHistoryItem itemAtIndex = copyBackForwardList.getItemAtIndex(copyBackForwardList.getCurrentIndex() + 1);
return (itemAtIndex == null || !"file:///android_asset/offline.html".equals(itemAtIndex.getUrl())) ? super.canGoForward() : copyBackForwardList.getItemAtIndex(copyBackForwardList.getCurrentIndex() + 2) != null;
}
@Override
public boolean d() {
WebChromeClient webChromeClient = this.f6928h;
if (webChromeClient == null || !(webChromeClient instanceof k)) {
return false;
}
return ((k) webChromeClient).d();
}
@Override
public void e(Bundle bundle) {
restoreState(bundle);
}
@Override
public int getMaxHorizontalScroll() {
return computeHorizontalScrollRange() - getWidth();
}
@Deprecated
public c getOnSwipeListener() {
return null;
}
@Override
public int getWebViewScrollX() {
return getScrollX();
}
@Override
public int getWebViewScrollY() {
return getScrollY();
}
@Override
public void goBack() {
WebHistoryItem webHistoryItem;
int i2;
try {
WebBackForwardList copyBackForwardList = copyBackForwardList();
int currentIndex = copyBackForwardList.getCurrentIndex() - 1;
while (true) {
if (currentIndex < 0) {
webHistoryItem = null;
i2 = 0;
break;
} else {
webHistoryItem = copyBackForwardList.getItemAtIndex(currentIndex);
if (!webHistoryItem.getUrl().equals("file:///android_asset/offline.html")) {
i2 = currentIndex - copyBackForwardList.getCurrentIndex();
break;
}
currentIndex--;
}
}
if (webHistoryItem == null || this.f6927g.shouldOverrideUrlLoading(this, webHistoryItem.getUrl())) {
return;
}
super.goBackOrForward(i2);
} catch (Exception unused) {
super.goBack();
}
}
@Override
public void goForward() {
WebBackForwardList copyBackForwardList = copyBackForwardList();
WebHistoryItem itemAtIndex = copyBackForwardList.getItemAtIndex(copyBackForwardList.getCurrentIndex() + 1);
if (itemAtIndex == null || !"file:///android_asset/offline.html".equals(itemAtIndex.getUrl())) {
super.goForward();
} else if (copyBackForwardList.getItemAtIndex(copyBackForwardList.getCurrentIndex() + 2) != null) {
goBackOrForward(2);
}
}
@Override
public void loadUrl(String str) {
if (str == null) {
return;
}
if ("file:///offline.html".equals(str)) {
str = "file:///android_asset/offline.html";
}
if (str.startsWith("javascript:")) {
a(str.substring(11));
return;
}
WebViewClient webViewClient = this.f6927g;
if (webViewClient == null || !webViewClient.shouldOverrideUrlLoading(this, str)) {
super.loadUrl(str);
}
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
this.f6930j.onTouchEvent(motionEvent);
return super.onTouchEvent(motionEvent);
}
@Override
public void reload() {
WebViewClient webViewClient = this.f6927g;
if (webViewClient != null && (webViewClient instanceof E) && ((E) webViewClient).a(this, getUrl(), true)) {
return;
}
super.reload();
}
@Override
public void scrollTo(int i2, int i3) {
super.scrollTo(i2, i3);
}
@Override
public void setCheckLoginSignup(boolean z2) {
this.f6929i = z2;
}
@Deprecated
public void setOnSwipeListener(c cVar) {
}
@Override
public void setWebChromeClient(WebChromeClient webChromeClient) {
this.f6928h = webChromeClient;
super.setWebChromeClient(webChromeClient);
}
@Override
public void setWebViewClient(WebViewClient webViewClient) {
this.f6927g = webViewClient;
super.setWebViewClient(webViewClient);
}
@Override
public void zoomBy(float f2) {
super.zoomBy(f2);
this.f6931k = true;
}
@Override
public boolean zoomOut() {
this.f6931k = false;
return super.zoomOut();
}
}