开发专用 v00.00.26版本的 MD5 值为:27d23588b440d1fe24ff30607dd0eda9
以下内容为反编译后的 f.java 源代码,内容仅作参考
package com.uzmap.pkg.uzcore;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.util.SparseArray;
import android.view.View;
import android.webkit.GeolocationPermissions;
import android.webkit.JsResult;
import android.webkit.SslErrorHandler;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import com.deepe.sdk.DeepSetting;
import com.deepe.sdk.OptResult;
import com.deepe.sdk.ViewEntity;
import com.uzmap.pkg.openapi.WebViewProvider;
import com.uzmap.pkg.uzcore.h.m;
import com.uzmap.pkg.uzcore.q;
import com.uzmap.pkg.uzcore.uzmodule.ActivityResult;
import com.uzmap.pkg.uzcore.uzmodule.UZModuleContext;
import java.util.Hashtable;
import org.json.JSONObject;
public class f {
protected com.uzmap.pkg.uzcore.i.b.i a;
private Context c;
private boolean d;
private com.uzmap.pkg.uzcore.h.s e;
private String f;
private a g;
private SparseArray<ActivityResult> h;
private SparseArray<com.uzmap.pkg.uzcore.uzmodule.a> i;
private i j;
private e k = e.a();
private String l;
private static Hashtable<String, f> m = new Hashtable<>();
static boolean b = false;
public interface a {
void deliverConsoleMessage(com.uzmap.pkg.uzcore.i.j jVar);
void deliverHtml5Event(com.uzmap.pkg.uzcore.a aVar, String str, Object obj);
void deliverJsError(String str);
void deliverPageFinished(WebViewProvider webViewProvider, String str);
void deliverPageStarted(WebViewProvider webViewProvider, String str, Bitmap bitmap);
void deliverProgressChanged(WebViewProvider webViewProvider, int i);
boolean deliverReceivedError(com.uzmap.pkg.uzcore.a aVar, int i, String str, String str2);
View getVideoLoadingProgressView();
boolean onCloseWindow(ViewEntity viewEntity);
boolean onCreateWindow(ViewEntity viewEntity, OptResult optResult);
boolean onDownloadStart(String str, String str2, String str3, String str4, long j);
void onFirstPageFinish();
boolean onGeolocationPermissionsShowPrompt(String str, GeolocationPermissions.Callback callback);
boolean onHideCustomView();
boolean onJsAlert(String str, String str2, JsResult jsResult);
void onLoadResource(String str);
boolean onPrivacyAgreed();
void onReceivedPageTitle(WebViewProvider webViewProvider, String str);
boolean onReceivedSslError(SslErrorHandler sslErrorHandler, SslError sslError);
void onRequestFocus(View view);
boolean onShowCustomView(View view, int i, WebChromeClient.CustomViewCallback customViewCallback);
boolean onShowFileChooser(ValueCallback<Uri[]> valueCallback, WebChromeClient.FileChooserParams fileChooserParams);
boolean requestAppInImmerseState();
void requestAppidle(boolean z, int i);
boolean requestConnectivityListen(boolean z);
boolean requestFinishApp(boolean z);
boolean requestForceFinishAppWidthAlert(String str, String str2, String str3);
boolean requestFullScreen(boolean z, boolean z2);
boolean requestHandlderIntent(String str);
boolean requestHideCustomView();
boolean requestKeepScreenOn(boolean z);
boolean requestNativeAccess(WebViewProvider webViewProvider, UZModuleContext uZModuleContext);
boolean requestOrientation(int i);
boolean requestRebootApp(String str);
boolean requestRemoveLaunchView(boolean z, d dVar);
boolean requestShouldForbiddenAccess(String str, String str2, String str3);
boolean requestShouldOverrideUrlLoading(WebViewProvider webViewProvider, String str);
boolean requestShowCustomView(com.uzmap.pkg.uzcore.i.l lVar, int i);
boolean requestShowLaunchView(boolean z, d dVar);
boolean requestStartActivity(Intent intent, int i, boolean z);
int requestVisualHeight(boolean z);
int requestVisualWidth(boolean z);
}
private f(Context context) {
this.c = context;
com.uzmap.pkg.uzcore.i.b.i iVar = new com.uzmap.pkg.uzcore.i.b.i();
this.a = iVar;
iVar.a(context);
this.h = new SparseArray<>();
this.i = new SparseArray<>();
}
private boolean C() {
return aa.a().k();
}
public static f a(Context context) {
if (context == null) {
return null;
}
f d = d(context);
if (d != null) {
return d;
}
f fVar = new f(context);
a(context, fVar);
return fVar;
}
private static void a(Context context, f fVar) {
m.put(UZCoreUtil.activityToStr(context), fVar);
}
public static f b(Context context) {
if (context == null) {
return null;
}
return a(context);
}
private static void c(Context context) {
m.remove(UZCoreUtil.activityToStr(context));
}
private static f d(Context context) {
return m.get(UZCoreUtil.activityToStr(context));
}
public final View A() {
a aVar = this.g;
if (aVar != null) {
return aVar.getVideoLoadingProgressView();
}
return null;
}
public final boolean B() {
a aVar = this.g;
if (aVar != null) {
return aVar.onHideCustomView();
}
return false;
}
public com.uzmap.pkg.uzcore.h.s a() {
return this.e;
}
public final void a(int i) {
a aVar = this.g;
if (aVar != null) {
aVar.requestOrientation(i);
}
}
public final void a(Intent intent) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(intent);
}
public final void a(View view) {
a aVar = this.g;
if (aVar != null) {
aVar.onRequestFocus(view);
}
}
public final void a(com.uzmap.pkg.uzcore.a aVar, int i) {
a aVar2 = this.g;
if (aVar2 != null) {
aVar2.deliverProgressChanged(aVar.i(), i);
}
}
public final void a(com.uzmap.pkg.uzcore.a aVar, com.uzmap.pkg.uzcore.uzmodule.b.e eVar) {
a aVar2 = this.g;
if (aVar2 != null) {
aVar2.deliverHtml5Event(aVar, eVar.c, eVar.d());
}
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(eVar);
}
public final void a(com.uzmap.pkg.uzcore.a aVar, String str) {
a aVar2 = this.g;
if (aVar2 != null) {
aVar2.deliverPageFinished(aVar.i(), str);
}
}
public final void a(com.uzmap.pkg.uzcore.a aVar, String str, Bitmap bitmap) {
a aVar2 = this.g;
if (aVar2 != null) {
aVar2.deliverPageStarted(aVar.i(), str, bitmap);
}
}
public void a(com.uzmap.pkg.uzcore.b.d dVar) {
if (this.j == null) {
i iVar = new i(this);
this.j = iVar;
iVar.a(dVar);
}
}
public void a(a aVar) {
this.g = aVar;
}
public void a(final m.a aVar, boolean z) {
Activity a2 = com.deepe.c.a.a.a(this.c);
if (a2 == null) {
return;
}
com.uzmap.pkg.uzcore.h.m a3 = com.uzmap.pkg.uzcore.h.m.a(a2);
a3.a(aVar.a, aVar.b);
a3.a(new m.b() {
@Override
public boolean a() {
if (f.this.c()) {
if (f.this.s()) {
return false;
}
f.this.a((com.uzmap.pkg.uzcore.uzmodule.b.u) null, false);
return true;
}
if (aVar.a()) {
return true;
}
f.this.a((com.uzmap.pkg.uzcore.uzmodule.b.u) null, false);
return false;
}
});
a3.a(d(), g().a);
a3.a(z);
if (a3.isShown()) {
return;
}
a3.e();
}
public void a(com.uzmap.pkg.uzcore.h.s sVar) {
this.e = sVar;
}
public void a(h hVar) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(hVar);
}
public final void a(com.uzmap.pkg.uzcore.i.j jVar) {
com.deepe.d.a.a(jVar);
if (k()) {
String b2 = jVar.b();
int a2 = jVar.a();
com.deepe.d.a.b(a2, b2);
if (a2 == 6) {
e(b2);
}
a aVar = this.g;
if (aVar != null) {
aVar.deliverConsoleMessage(jVar);
}
if (c()) {
Context context = this.c;
if (!(context instanceof Activity)) {
return;
} else {
com.uzmap.pkg.uzcore.h.m.a(com.deepe.c.a.a.a(context)).a(a2, "app3c", b2);
}
}
if (C()) {
Context context2 = this.c;
if (context2 instanceof Activity) {
com.uzmap.pkg.b.c.i.a(com.deepe.c.a.a.a(context2)).a(a2, "app3c", b2);
}
}
}
}
public void a(q.a aVar, boolean z) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(aVar, z);
}
public void a(com.uzmap.pkg.uzcore.uzmodule.a aVar, int i, boolean z) {
if (aVar == null || i <= 0) {
return;
}
if (z) {
this.i.put(i, aVar);
} else {
this.i.remove(i);
}
}
public void a(com.uzmap.pkg.uzcore.uzmodule.b.u uVar, boolean z) {
i iVar = this.j;
if (iVar != null) {
iVar.a(uVar, z);
return;
}
boolean a2 = a(uVar != null ? uVar.c : true);
Activity a3 = com.deepe.c.a.a.a(this.c);
if (a2 || a3 == null) {
return;
}
a3.finish();
}
public void a(Object obj) {
i iVar = this.j;
if (iVar == null) {
return;
}
com.uzmap.pkg.uzcore.b.d a2 = iVar.a();
String obj2 = obj != null ? obj.toString() : "";
com.uzmap.pkg.uzcore.uzmodule.b.v vVar = new com.uzmap.pkg.uzcore.uzmodule.b.v();
vVar.w = "cloud_start_ad";
vVar.x = obj2;
vVar.setBaseUrl(a2.a());
vVar.a(a2.t, a2.j(), a2.l());
if (!x.c(vVar.x)) {
this.j.a(obj);
return;
}
vVar.A = false;
vVar.J = true;
vVar.I = true;
vVar.a(false);
vVar.h();
this.j.a(vVar);
}
public final void a(String str) {
if (!m()) {
this.f = str;
return;
}
com.uzmap.pkg.uzcore.uzmodule.b.v vVar = new com.uzmap.pkg.uzcore.uzmodule.b.v();
vVar.w = "msmAuth";
vVar.x = str;
vVar.A = false;
vVar.J = true;
vVar.I = true;
vVar.g();
this.j.a(vVar);
}
public final void a(String str, Intent intent, String str2) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(str, intent, str2);
int size = this.i.size();
for (int i = 0; i < size; i++) {
this.i.valueAt(i).onNewIntent(intent);
}
}
public final void a(String str, String str2, String str3) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(str, str2, str3);
}
public final void a(String str, JSONObject jSONObject) {
if (this.j == null) {
return;
}
com.uzmap.pkg.uzcore.uzmodule.b.e eVar = new com.uzmap.pkg.uzcore.uzmodule.b.e(null, null);
eVar.c = str;
eVar.b = jSONObject;
this.j.a(eVar);
}
public final void a(String str, boolean z) {
com.deepe.d.b.a(this.c, str, z);
}
public final void a(boolean z, int i) {
a aVar = this.g;
if (aVar != null) {
aVar.requestAppidle(z, i);
}
}
public final void a(boolean z, com.deepe.b.b.c cVar) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(z, cVar);
}
public final void a(boolean z, String str) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.a(z, str);
}
public final void a(boolean z, boolean z2) {
a aVar = this.g;
if (aVar != null) {
aVar.requestFullScreen(z, z2);
}
}
public final boolean a(int i, int i2, Intent intent) {
if (i == 30102) {
com.deepe.c.f.c.a(i2, intent);
return true;
}
ActivityResult activityResult = this.h.get(i);
if (activityResult == null) {
return false;
}
activityResult.onActivityResult(i, i2, intent);
this.h.remove(i);
return true;
}
public final boolean a(int i, String[] strArr, int[] iArr, Object... objArr) {
return com.deepe.c.f.c.a(i, strArr, iArr, objArr);
}
public final boolean a(View view, int i, WebChromeClient.CustomViewCallback customViewCallback) {
a aVar = this.g;
if (aVar != null) {
return aVar.onShowCustomView(view, i, customViewCallback);
}
return false;
}
public final boolean a(SslErrorHandler sslErrorHandler, SslError sslError) {
a aVar = this.g;
if (aVar != null) {
return aVar.onReceivedSslError(sslErrorHandler, sslError);
}
return false;
}
public final boolean a(ValueCallback<Uri[]> valueCallback, WebChromeClient.FileChooserParams fileChooserParams) {
a aVar = this.g;
if (aVar != null) {
return aVar.onShowFileChooser(valueCallback, fileChooserParams);
}
return false;
}
public final boolean a(ViewEntity viewEntity) {
a aVar = this.g;
if (aVar != null) {
return aVar.onCloseWindow(viewEntity);
}
return false;
}
public final boolean a(ViewEntity viewEntity, OptResult optResult) {
a aVar = this.g;
if (aVar != null) {
return aVar.onCreateWindow(viewEntity, optResult);
}
return false;
}
public final boolean a(com.uzmap.pkg.uzcore.a aVar, int i, String str, String str2) {
a aVar2 = this.g;
if (aVar2 != null) {
return aVar2.deliverReceivedError(aVar, i, str, str2);
}
return false;
}
public final boolean a(com.uzmap.pkg.uzcore.a aVar, UZModuleContext uZModuleContext) {
a aVar2 = this.g;
if (aVar2 != null) {
return aVar2.requestNativeAccess(aVar.i(), uZModuleContext);
}
return false;
}
public final boolean a(com.uzmap.pkg.uzcore.a aVar, String str, String str2, String str3, String str4, long j) {
a aVar2 = this.g;
if (aVar2 != null) {
return aVar2.onDownloadStart(str, str2, str3, str4, j);
}
return false;
}
public final boolean a(com.uzmap.pkg.uzcore.i.l lVar, int i) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestShowCustomView(lVar, i);
}
return false;
}
public boolean a(q.a aVar) {
i iVar = this.j;
if (iVar == null) {
return false;
}
return iVar.a(aVar);
}
public boolean a(ActivityResult activityResult, Intent intent, int i, boolean z) {
if (activityResult != null && i > 0) {
this.h.put(i, activityResult);
}
a aVar = this.g;
if (aVar != null) {
return aVar.requestStartActivity(intent, i, z);
}
return false;
}
public final boolean a(String str, GeolocationPermissions.Callback callback) {
a aVar = this.g;
if (aVar != null) {
return aVar.onGeolocationPermissionsShowPrompt(str, callback);
}
return false;
}
public final boolean a(String str, String str2, JsResult jsResult) {
a aVar = this.g;
if (aVar != null) {
return aVar.onJsAlert(str, str2, jsResult);
}
return false;
}
public final boolean a(boolean z) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestFinishApp(z);
}
return false;
}
public boolean a(boolean z, d dVar) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestRemoveLaunchView(z, dVar);
}
return false;
}
public void b(com.uzmap.pkg.uzcore.b.d dVar) {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.b(dVar);
}
public final void b(final String str) {
if (!s()) {
a((com.uzmap.pkg.uzcore.uzmodule.b.u) null, true);
}
com.deepe.c.b.b(new Runnable() {
@Override
public void run() {
f.this.b(com.uzmap.pkg.uzcore.b.d.c(str, "wifidebug"));
}
});
}
public final void b(boolean z) {
a aVar = this.g;
if (aVar != null) {
aVar.requestKeepScreenOn(z);
}
}
public boolean b() {
return g().l;
}
public final boolean b(com.uzmap.pkg.uzcore.a aVar, String str) {
if ("http://ops.fun.mipm/sync".equals(str)) {
a("data_sync", true);
return true;
}
a aVar2 = this.g;
if (aVar2 != null) {
return aVar2.requestShouldOverrideUrlLoading(aVar.i(), str);
}
return false;
}
public final boolean b(String str, String str2, String str3) {
a aVar = this.g;
boolean requestShouldForbiddenAccess = aVar != null ? aVar.requestShouldForbiddenAccess(str, str2, str3) : false;
if (!c() || !(this.c instanceof Activity)) {
return requestShouldForbiddenAccess;
}
com.uzmap.pkg.uzcore.b.d h = h();
if (h == null) {
h = g();
}
com.uzmap.pkg.uzcore.h.m.a(com.deepe.c.a.a.a(this.c)).a(str2, str3, h != null ? h.a : "A6965066952332");
return requestShouldForbiddenAccess;
}
public boolean b(boolean z, d dVar) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestShowLaunchView(z, dVar);
}
return false;
}
public final void c(com.uzmap.pkg.uzcore.a aVar, String str) {
a aVar2 = this.g;
if (aVar2 != null) {
aVar2.onReceivedPageTitle(aVar.i(), str);
}
}
public final void c(String str) {
this.l = str;
}
public boolean c() {
return e() || d();
}
public boolean c(String str, String str2, String str3) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestForceFinishAppWidthAlert(str, str2, str3);
}
return false;
}
public boolean c(boolean z) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestConnectivityListen(z);
}
return false;
}
public final int d(boolean z) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestVisualHeight(z);
}
com.uzmap.pkg.uzcore.h.s sVar = this.e;
if (sVar != null) {
return sVar.getHeight();
}
return 0;
}
public boolean d() {
return com.uzmap.pkg.uzapp.a.h();
}
public final boolean d(String str) {
if (x.c(str)) {
return false;
}
if (g().g(str)) {
return true;
}
return this.a.a(str);
}
public final int e(boolean z) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestVisualWidth(z);
}
com.uzmap.pkg.uzcore.h.s sVar = this.e;
if (sVar != null) {
return sVar.getWidth();
}
return 0;
}
public final void e(String str) {
a aVar;
if (!b() || (aVar = this.g) == null) {
return;
}
aVar.deliverJsError(str);
}
public boolean e() {
return aa.a().j();
}
public Context f() {
return this.c;
}
public final boolean f(String str) {
a aVar = this.g;
if (aVar != null) {
return aVar.requestRebootApp(str);
}
return false;
}
public com.uzmap.pkg.uzcore.b.d g() {
i iVar = this.j;
return iVar != null ? iVar.a() : this.k.i();
}
public boolean g(String str) {
if (this.g == null) {
return false;
}
if (str == "appintent") {
if (b) {
return false;
}
b = true;
}
return this.g.requestHandlderIntent(str);
}
public com.uzmap.pkg.uzcore.b.d h() {
i iVar = this.j;
return iVar != null ? iVar.b() : this.k.i();
}
public final void h(String str) {
a aVar = this.g;
if (aVar != null) {
aVar.onLoadResource(str);
}
}
public void i() {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.d();
j();
}
public void j() {
Context context;
boolean z;
if (Build.VERSION.SDK_INT < 19) {
return;
}
if (k()) {
context = this.c;
z = true;
} else {
context = this.c;
z = false;
}
com.uzmap.pkg.uzcore.i.b.j.a(context, z);
}
public boolean k() {
return b() || c() || DeepSetting.debugEnable() || aa.a().l() || C();
}
public void l() {
if (this.j == null) {
return;
}
com.deepe.c.k.h.b();
this.j.i();
com.uzmap.pkg.uzcore.i.a.d.c();
com.uzmap.pkg.a.b.a();
c(this.c);
b = false;
}
public final boolean m() {
return this.d;
}
public final boolean n() {
i iVar = this.j;
if (iVar == null) {
return false;
}
return iVar.e();
}
public final void o() {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.f();
if (c()) {
Context context = this.c;
if (!(context instanceof Activity)) {
return;
} else {
com.uzmap.pkg.uzcore.h.m.a(com.deepe.c.a.a.a(context)).b();
}
}
if (C()) {
Context context2 = this.c;
if (context2 instanceof Activity) {
com.uzmap.pkg.b.c.i.a(com.deepe.c.a.a.a(context2)).g();
}
}
}
public final void p() {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.g();
if (c()) {
Context context = this.c;
if (!(context instanceof Activity)) {
return;
} else {
com.uzmap.pkg.uzcore.h.m.a(com.deepe.c.a.a.a(context)).c();
}
}
if (C()) {
Context context2 = this.c;
if (context2 instanceof Activity) {
com.uzmap.pkg.b.c.i.a(com.deepe.c.a.a.a(context2)).h();
}
}
}
public void q() {
i iVar = this.j;
if (iVar == null) {
return;
}
iVar.h();
}
public final String r() {
String str = this.l;
return str != null ? str : "{}";
}
public boolean s() {
return this.j.c();
}
public void t() {
if (c()) {
return;
}
Context context = this.c;
if (context instanceof Activity) {
com.uzmap.pkg.uzcore.h.m.a(com.deepe.c.a.a.a(context)).d();
}
}
public final String u() {
return this.k.f();
}
public final String v() {
return this.k.g();
}
public final void w() {
a aVar = this.g;
if (aVar != null ? aVar.onPrivacyAgreed() : false) {
return;
}
Context context = this.c;
if (context instanceof UZAppActivity) {
((UZAppActivity) context).doPrivacyAgreed();
}
}
public final void x() {
this.d = true;
String str = this.f;
if (str != null) {
a(str);
this.f = null;
}
a aVar = this.g;
if (aVar != null) {
aVar.onFirstPageFinish();
}
if (c()) {
a(new m.a(0), true);
}
}
public final void y() {
a aVar = this.g;
if (aVar != null) {
aVar.requestHideCustomView();
}
}
public boolean z() {
a aVar = this.g;
if (aVar != null) {
return aVar.requestAppInImmerseState();
}
return false;
}
}