xiaodi8 v1.0.0版本的 MD5 值为:6b857c57f508176c5ba1afb422bbb5a9
以下内容为反编译后的 WebFragment.java 源代码,内容仅作参考
package com.bslyun.app.fragment;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.core.content.FileProvider;
import com.bslyun.app.activity.FileSelectActivity;
import com.bslyun.app.activity.MainActivity;
import com.bslyun.app.browser.JavaScriptUtils;
import com.bslyun.app.browser.WebViewUtils;
import com.bslyun.app.browser.listeners.LocalBrowserClientListener;
import com.bslyun.app.browser.listeners.LocalChromeClientListener;
import com.bslyun.app.browser.listeners.WebJsToNativeCallback;
import com.bslyun.app.browser.listeners.WebTouchLisetner;
import com.bslyun.app.browser.listeners.X5BrowserClientListener;
import com.bslyun.app.browser.listeners.X5ChromeClientListener;
import com.bslyun.app.browser.local.LocalBrowser;
import com.bslyun.app.browser.local.WBH5FaceVerifySDK;
import com.bslyun.app.browser.x5.X5Browser;
import com.bslyun.app.browser.x5.X5WBH5FaceVerifySDK;
import com.bslyun.app.component.PushComponent;
import com.bslyun.app.component.SportStepCommponent;
import com.bslyun.app.component.WeiboComponent;
import com.bslyun.app.component.qrcode.QRCodeComponent;
import com.bslyun.app.component.zjsdk.ZJSdkComponent;
import com.bslyun.app.eventbus.HookLifecycle;
import com.bslyun.app.eventbus.WebFragmentHook;
import com.bslyun.app.f.e;
import com.bslyun.app.modes.EventBusMessage;
import com.bslyun.app.modes.FileInfo;
import com.bslyun.app.modes.PictureInfo;
import com.bslyun.app.modes.ShareItem;
import com.bslyun.app.uiconfig.LayoutItem;
import com.bslyun.app.uiconfig.PartItem;
import com.bslyun.app.utils.f;
import com.bslyun.app.utils.g0;
import com.bslyun.app.utils.m0;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.gson.Gson;
import com.jsyh.fingerpirnt.c.a;
import com.kseuay.kziwmts.R;
import com.luck.picture.lib.basic.PictureSelector;
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.config.SelectMimeType;
import com.luck.picture.lib.entity.LocalMedia;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tencent.smtt.sdk.CookieManager;
import com.tencent.smtt.sdk.TbsConfig;
import com.tencent.smtt.sdk.TbsVideoCacheTask;
import com.tencent.smtt.sdk.WebView;
import io.github.inflationx.calligraphy3.BuildConfig;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import me.yokeyword.swipebackfragment.SwipeBackLayout;
public class WebFragment extends com.bslyun.app.fragment.c implements AdapterView.OnItemClickListener, com.bslyun.app.fragment.m, View.OnLongClickListener, WebJsToNativeCallback, com.scwang.smart.refresh.layout.c.g, WebTouchLisetner, e.c, DialogInterface.OnCancelListener {
public static boolean webLoadOk = false;
private AudioManager.OnAudioFocusChangeListener aListener;
private AudioManager audioManager;
private com.google.android.material.bottomsheet.a bottomSheetDialog;
private i0 broadcastReceiver;
private List<ResolveInfo> browserList;
private LinearLayout errorLayout;
private FrameLayout errorLoadingView;
private ClassicsHeader header;
private WebFragmentHook hook;
public int index;
private boolean isPullRefreshAction;
public boolean isTab;
private String leftBtnFunction;
private int loadingTime_100;
private int loadingTime_70;
private LocalBrowser localBrowser;
private ViewStub mErrorStub;
private com.jsyh.fingerpirnt.a mFingerprintIdentify;
private MainActivity mMainActivity;
private SmartRefreshLayout mRefreshLayout;
private boolean newFragment;
private com.bslyun.app.views.a popuWindow;
private com.bslyun.app.f.d qrDialog;
private Uri[] results;
private String rightBtnFunction;
private int rootLayoutId;
private File tempFile;
private h0 thread;
private String url;
private ProgressBar webProgress;
public X5Browser x5Browser;
private boolean isFirstLoad = true;
private String titleText = BuildConfig.FLAVOR;
private int timer = 0;
private int loadProgress = 0;
private int defautl_time = 20;
private int webProgressPer = 0;
private boolean isPart = false;
private String IS_LONG_REFRESH = BuildConfig.FLAVOR;
private String IS_LONG_BOTTOM = BuildConfig.FLAVOR;
private String IS_LONG_NAVIGATE = BuildConfig.FLAVOR;
private String IS_LONG_NAV_ALPHA = BuildConfig.FLAVOR;
private String IS_LONG_TAB_ALPHA = BuildConfig.FLAVOR;
private String IS_LONG_LEFT_BUTTON_FUNCTION = BuildConfig.FLAVOR;
private String IS_LONG_LEFT_BUTTON_IMG = BuildConfig.FLAVOR;
private String IS_LONG_RIGHT_BUTTON_FUNCTION = BuildConfig.FLAVOR;
private String IS_LONG_RIGHT_BUTTON_IMG = BuildConfig.FLAVOR;
private String IS_LONG_NAVBAR_COLOR = BuildConfig.FLAVOR;
private String IS_LONG_TABBAR_COLOR = BuildConfig.FLAVOR;
private String rememberUrl = BuildConfig.FLAVOR;
private int webHS = 0;
private int webHB = 0;
boolean webError = false;
private com.bslyun.app.f.d customDialog = null;
private g0 mLoadhandler = new g0();
Handler handler = new d();
public class a implements Runnable {
a() {
}
@Override
public void run() {
if (WebFragment.this.isPart) {
return;
}
if (WebFragment.this.mMainActivity.navLine.getVisibility() == 0) {
WebFragment.this.mMainActivity.navLine.setBackgroundColor(Color.parseColor(WebFragment.this.mAppConfig.x));
}
if (TextUtils.isEmpty(WebFragment.this.IS_LONG_REFRESH)) {
WebFragment.this.mRefreshLayout.E(WebFragment.this.mAppConfig.I);
} else {
WebFragment webFragment = WebFragment.this;
webFragment.onJsRefreshEnable(webFragment.IS_LONG_REFRESH, "1");
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.r) {
if (TextUtils.isEmpty(webFragment2.IS_LONG_NAVBAR_COLOR)) {
WebFragment webFragment3 = WebFragment.this;
webFragment3.onSetStateBarColor(webFragment3.mAppConfig.t, "0", false);
} else {
WebFragment webFragment4 = WebFragment.this;
webFragment4.onSetStateBarColor(webFragment4.IS_LONG_NAVBAR_COLOR, "1", true);
}
WebFragment.this.mMainActivity.title.setTextColor(Color.parseColor(WebFragment.this.mAppConfig.v));
if (com.bslyun.app.utils.b0.b(WebFragment.this.getContext(), WebFragment.this.mAppConfig.L) > 0 && ((MainActivity) WebFragment.this.getActivity()).mLeftMenu != null) {
if (TextUtils.isEmpty(WebFragment.this.IS_LONG_LEFT_BUTTON_FUNCTION)) {
if (TextUtils.isEmpty(WebFragment.this.mAppConfig.N) || WebFragment.this.mAppConfig.N.equals("-1")) {
WebFragment.this.mMainActivity.mLeftMenu.setVisibility(8);
} else {
WebFragment.this.mMainActivity.mLeftMenu.setVisibility(0);
com.bumptech.glide.c.v(WebFragment.this.getActivity()).s(Integer.valueOf(com.bslyun.app.utils.b0.b(WebFragment.this.getContext(), WebFragment.this.mAppConfig.L))).D0(WebFragment.this.mMainActivity.mLeftMenu);
}
WebFragment webFragment5 = WebFragment.this;
webFragment5.leftBtnFunction = webFragment5.mAppConfig.N;
WebFragment.this.mMainActivity.dynamicLeftNavigation = WebFragment.this.leftBtnFunction;
} else {
WebFragment webFragment6 = WebFragment.this;
webFragment6.controlNavLeftMenu(webFragment6.IS_LONG_LEFT_BUTTON_FUNCTION, WebFragment.this.IS_LONG_LEFT_BUTTON_IMG, "1");
}
}
if (com.bslyun.app.utils.b0.b(WebFragment.this.getActivity(), WebFragment.this.mAppConfig.M) > 0 && ((MainActivity) WebFragment.this.getActivity()).share != null) {
if (TextUtils.isEmpty(WebFragment.this.IS_LONG_RIGHT_BUTTON_FUNCTION)) {
if (TextUtils.isEmpty(WebFragment.this.mAppConfig.y) || WebFragment.this.mAppConfig.y.equals("-1")) {
WebFragment.this.mMainActivity.share.setVisibility(8);
} else {
WebFragment.this.mMainActivity.share.setVisibility(0);
com.bumptech.glide.c.v(WebFragment.this.getActivity()).s(Integer.valueOf(com.bslyun.app.utils.b0.b(WebFragment.this.getActivity(), WebFragment.this.mAppConfig.M))).D0(WebFragment.this.mMainActivity.share);
}
WebFragment webFragment7 = WebFragment.this;
webFragment7.rightBtnFunction = webFragment7.mAppConfig.y;
WebFragment.this.mMainActivity.dynamicRightNavigation = WebFragment.this.rightBtnFunction;
} else {
WebFragment webFragment8 = WebFragment.this;
webFragment8.controlNavRightMenu(webFragment8.IS_LONG_RIGHT_BUTTON_FUNCTION, WebFragment.this.IS_LONG_RIGHT_BUTTON_IMG, "1");
}
}
if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f) {
if (!TextUtils.isEmpty(WebFragment.this.IS_LONG_NAV_ALPHA)) {
WebFragment webFragment9 = WebFragment.this;
webFragment9.onJsNavBarAlpha(webFragment9.IS_LONG_NAV_ALPHA, "1");
} else {
WebFragment webFragment10 = WebFragment.this;
webFragment10.onJsNavBarAlpha(m0.O(webFragment10.mAppConfig.n), "0");
}
}
if (TextUtils.isEmpty(WebFragment.this.IS_LONG_NAVIGATE)) {
WebFragment webFragment11 = WebFragment.this;
webFragment11.controlNavigatorLayout(webFragment11.mAppConfig.O, "0");
} else {
WebFragment webFragment12 = WebFragment.this;
webFragment12.controlNavigatorLayout(webFragment12.IS_LONG_NAVIGATE, "1");
}
} else {
webFragment2.mMainActivity.mNavigateLayout.setVisibility(8);
}
WebFragment webFragment13 = WebFragment.this;
if (webFragment13.mAppConfig.l) {
if (TextUtils.isEmpty(webFragment13.IS_LONG_TABBAR_COLOR)) {
WebFragment webFragment14 = WebFragment.this;
webFragment14.onTabBarColor(webFragment14.mAppConfig.e0.a().b(), "0", false);
} else {
WebFragment webFragment15 = WebFragment.this;
webFragment15.onTabBarColor(webFragment15.IS_LONG_TABBAR_COLOR, "1", false);
}
if (Float.parseFloat(WebFragment.this.mAppConfig.p) < 1.0f) {
if (!TextUtils.isEmpty(WebFragment.this.IS_LONG_TAB_ALPHA)) {
WebFragment webFragment16 = WebFragment.this;
webFragment16.onJsTabbarAlpha(webFragment16.IS_LONG_TAB_ALPHA, "1", false);
} else {
WebFragment webFragment17 = WebFragment.this;
webFragment17.onJsTabbarAlpha(m0.O(webFragment17.mAppConfig.p), "0", false);
}
}
if (TextUtils.isEmpty(WebFragment.this.IS_LONG_BOTTOM)) {
WebFragment.this.mMainActivity.touchHide = false;
WebFragment.this.mMainActivity.controlBottomTabLayout(false, WebFragment.this.mAppConfig.m, false);
} else {
WebFragment.this.mMainActivity.touchHide = false;
WebFragment.this.mMainActivity.controlBottomTabLayout(false, WebFragment.this.IS_LONG_BOTTOM, false);
}
}
}
}
public class a0 implements g0.b {
a0() {
}
@Override
public void a(int i) {
if (WebFragment.this.mAppConfig.X.equals("0")) {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) WebFragment.this.localBrowser.getLayoutParams();
layoutParams.height = WebFragment.this.webHB;
WebFragment.this.localBrowser.setLayoutParams(layoutParams);
} else {
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) WebFragment.this.x5Browser.getLayoutParams();
layoutParams2.height = WebFragment.this.webHB;
WebFragment.this.x5Browser.setLayoutParams(layoutParams2);
}
WebFragment.this.webHS = 0;
WebFragment.this.webHB = 0;
}
@Override
public void b(int i) {
WebFragment webFragment = WebFragment.this;
if (webFragment.mAppConfig.l && webFragment.mMainActivity.mTabHost.getVisibility() == 0 && !m0.T(WebFragment.this.mAppConfig.q)) {
WebFragment webFragment2 = WebFragment.this;
webFragment2.webHS = webFragment2.mMainActivity.mTabHost.getHeight();
}
WebFragment webFragment3 = WebFragment.this;
com.bslyun.app.d.a aVar = webFragment3.mAppConfig;
if (aVar.H0 && aVar.r1 == 0) {
webFragment3.webHS += WebFragment.this.mMainActivity.copyright.getHeight();
}
if (WebFragment.this.mAppConfig.X.equals("0")) {
WebFragment webFragment4 = WebFragment.this;
webFragment4.webHB = webFragment4.localBrowser.getHeight();
WebFragment.this.webHS += WebFragment.this.localBrowser.getHeight();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) WebFragment.this.localBrowser.getLayoutParams();
layoutParams.height = WebFragment.this.webHS - i;
WebFragment.this.localBrowser.setLayoutParams(layoutParams);
return;
}
WebFragment webFragment5 = WebFragment.this;
webFragment5.webHB = webFragment5.x5Browser.getHeight();
WebFragment.this.webHS += WebFragment.this.x5Browser.getHeight();
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) WebFragment.this.x5Browser.getLayoutParams();
layoutParams2.height = WebFragment.this.webHS - i;
WebFragment.this.x5Browser.setLayoutParams(layoutParams2);
}
}
class b implements View.OnClickListener {
b() {
}
@Override
public void onClick(View view) {
WebFragment.this.qrDialog.hide();
}
}
public class b0 implements X5BrowserClientListener {
class a implements Runnable {
a() {
}
@Override
public void run() {
WebFragment.this.errorLayout.setVisibility(8);
WebFragment.this.errorLoadingView.setVisibility(8);
}
}
b0() {
}
@Override
public void pageBeforeStartListeners(X5Browser x5Browser, String str) {
}
@Override
public void pageErrorListener(X5Browser x5Browser, String str, int i) {
WebFragment webFragment = WebFragment.this;
X5Browser x5Browser2 = webFragment.x5Browser;
if (!X5Browser.isDownload) {
if (webFragment.isFirstLoad) {
WebFragment.this.isFirstLoad = false;
}
com.bslyun.app.fragment.f fVar = WebFragment.this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
WebFragment.this.mRefreshLayout.v(true);
WebFragment.this.x5Browser.setVisibility(8);
WebFragment webFragment2 = WebFragment.this;
webFragment2.webError = true;
if (webFragment2.errorLayout != null) {
WebFragment.this.errorLayout.setVisibility(0);
if (WebFragment.this.errorLoadingView.getVisibility() == 0) {
WebFragment.this.errorLoadingView.setVisibility(8);
}
} else {
WebFragment webFragment3 = WebFragment.this;
webFragment3.errorLayout = (LinearLayout) webFragment3.mErrorStub.inflate();
WebFragment.this.errorLayout.setVisibility(0);
WebFragment.this.errorLayout.findViewById(R.id.reload).setOnClickListener(WebFragment.this);
WebFragment webFragment4 = WebFragment.this;
webFragment4.errorLoadingView = (FrameLayout) webFragment4.errorLayout.findViewById(R.id.loading_view);
}
TextView textView = (TextView) WebFragment.this.errorLayout.findViewById(R.id.error);
((TextView) WebFragment.this.errorLayout.findViewById(R.id.errorCode)).setText(WebFragment.this.getResources().getString(R.string.error_code_text) + i);
if (m0.b0(WebFragment.this.getContext()) == 0) {
textView.setText(WebFragment.this.getResources().getString(R.string.error_network_text));
return;
} else if (i == -7) {
textView.setText(WebFragment.this.getResources().getString(R.string.error_timed_out_text));
return;
} else {
textView.setText(WebFragment.this.getResources().getString(R.string.error_link_text));
return;
}
}
X5Browser.isDownload = false;
}
@Override
public void pageReadyListener(X5Browser x5Browser, String str) {
WebFragment.this.mAppConfig.b0 = new ArrayList<>();
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.x5Browser, JavaScriptUtils.showImage);
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.x5Browser, JavaScriptUtils.imageClick);
if (WebFragment.this.isCssOpen()) {
Context context = WebFragment.this.getContext();
WebFragment webFragment = WebFragment.this;
JavaScriptUtils.injectCSSFile(context, webFragment.x5Browser, (String) com.bslyun.app.utils.c0.a(webFragment.context, "downloadcsspath", BuildConfig.FLAVOR));
}
if (WebFragment.this.isFirstLoad) {
WebFragment.this.isFirstLoad = false;
}
WebFragment.this.mRefreshLayout.v(true);
WebFragment.this.isPullRefreshAction = false;
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.loadingView != null && webFragment2.isResumed()) {
WebFragment.this.loadingView.dismiss();
}
WebFragment webFragment3 = WebFragment.this;
if (!webFragment3.webError) {
if (webFragment3.errorLayout != null) {
new Handler().postDelayed(new a(), 2000L);
}
WebFragment.this.x5Browser.setVisibility(0);
}
WebFragment.this.webError = false;
}
@Override
public void pageStartedListener(X5Browser x5Browser, String str, Bitmap bitmap) {
WebFragment.webLoadOk = false;
if (m0.b0(WebFragment.this.context) == 0) {
Context context = WebFragment.this.context;
m0.u0(context, context.getString(R.string.no_network_prompt));
WebFragment.this.mRefreshLayout.v(true);
return;
}
WebFragment webFragment = WebFragment.this;
if (webFragment.loadingView != null && !webFragment.isPullRefreshAction && !TextUtils.isEmpty(WebFragment.this.mAppConfig.W) && WebFragment.this.mAppConfig.W.equals("1") && !WebFragment.this.isFirstLoad) {
WebFragment.this.loadingView.show();
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.J0) {
webFragment2.start();
}
}
}
public class c implements DialogInterface.OnShowListener {
c(WebFragment webFragment) {
}
@Override
public void onShow(DialogInterface dialogInterface) {
BottomSheetBehavior.I((FrameLayout) ((com.google.android.material.bottomsheet.a) dialogInterface).findViewById(R.id.design_bottom_sheet)).S(3);
}
}
public class c0 implements X5ChromeClientListener {
class a implements Runnable {
a() {
}
@Override
public void run() {
if (WebFragment.this.getContext() != null) {
WebFragment webFragment = WebFragment.this;
if (webFragment.mAppConfig.J1 && com.bslyun.app.e.a.r && !com.bslyun.app.e.a.s) {
webFragment.mMainActivity.openAppNumber();
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.j3) {
JavaScriptUtils.injectJSFile(webFragment2.getContext(), WebFragment.this.x5Browser, "plz.js");
}
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.x5Browser, JavaScriptUtils.blank);
if (WebFragment.this.isJssOpen()) {
Context context = WebFragment.this.getContext();
WebFragment webFragment3 = WebFragment.this;
JavaScriptUtils.injectJSFile2(context, webFragment3.x5Browser, (String) com.bslyun.app.utils.c0.a(webFragment3.context, "downloadjspath", BuildConfig.FLAVOR));
}
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.x5Browser, "javascript:(!function(){window.local_kingkr_obj.injectOk();}())");
}
}
}
class b implements Runnable {
b() {
}
@Override
public void run() {
WebFragment.this.webProgress.setVisibility(8);
WebFragment.this.webProgressPer = 0;
}
}
c0() {
}
@Override
public void pageProgressListener(X5Browser x5Browser, int i) {
if (!TextUtils.isEmpty(x5Browser.getUrl()) && !WebFragment.this.rememberUrl.equals(x5Browser.getUrl())) {
WebFragment.this.mMainActivity.touchHide = false;
WebFragment.this.setConfig(x5Browser.getUrl());
WebFragment.this.rememberUrl = x5Browser.getUrl();
String cookie = CookieManager.getInstance().getCookie(WebFragment.this.rememberUrl);
if (!TextUtils.isEmpty(cookie)) {
com.bslyun.app.utils.p.c("bsl_cookie", cookie);
com.bslyun.app.utils.c0.c(WebFragment.this.mMainActivity, "web_cookie", cookie);
}
WebFragment.webLoadOk = false;
}
WebFragment.this.comparisonProgress(i);
if (x5Browser.getProgress() >= 90 && !WebFragment.webLoadOk) {
WebFragment.webLoadOk = true;
WebFragment.this.handler.postDelayed(new a(), 1000L);
WebFragment webFragment = WebFragment.this;
com.bslyun.app.d.a aVar = webFragment.mAppConfig;
if (aVar.X0 && !aVar.q1) {
JavaScriptUtils.postJsInWebView(webFragment.context, webFragment.x5Browser, JavaScriptUtils.videoJS);
}
}
WebFragment.this.loadProgress = i;
if (WebFragment.this.webProgressPer != 100 || TextUtils.isEmpty(WebFragment.this.mAppConfig.W) || !WebFragment.this.mAppConfig.W.equals("0") || !WebFragment.this.mAppConfig.U) {
WebFragment.this.webProgressPer = i;
if (TextUtils.isEmpty(WebFragment.this.mAppConfig.W) || !WebFragment.this.mAppConfig.W.equals("0")) {
return;
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.U) {
webFragment2.webProgress.setVisibility(0);
WebFragment.this.webProgress.setProgress(WebFragment.this.webProgressPer);
return;
}
return;
}
x5Browser.postDelayed(new b(), 800L);
}
@Override
public void receivedTitleListener(X5Browser x5Browser, String str) {
WebFragment.this.setNavTitle(str);
}
}
class d extends Handler {
d() {
}
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
if (message.obj == null) {
int i = message.what;
if (i == 0) {
if (((MainActivity) WebFragment.this.getActivity()).mLeftMenu != null) {
((MainActivity) WebFragment.this.getActivity()).mLeftMenu.setVisibility(0);
return;
}
return;
}
if (i == 1) {
if (((MainActivity) WebFragment.this.getActivity()).mLeftMenu != null) {
((MainActivity) WebFragment.this.getActivity()).mLeftMenu.setVisibility(8);
return;
}
return;
}
if (i == 2) {
if (((MainActivity) WebFragment.this.getActivity()).share != null) {
((MainActivity) WebFragment.this.getActivity()).share.setVisibility(8);
}
} else if (i == 3) {
if (((MainActivity) WebFragment.this.getActivity()).share != null) {
((MainActivity) WebFragment.this.getActivity()).share.setVisibility(0);
}
} else {
if (i != 6) {
return;
}
String str = (String) message.getData().get(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_URL);
WebFragment.this.showWindow(8, (String) message.getData().get("src"), str);
}
}
}
}
public class d0 implements LocalBrowserClientListener {
class a implements Runnable {
a() {
}
@Override
public void run() {
WebFragment.this.errorLayout.setVisibility(8);
WebFragment.this.errorLoadingView.setVisibility(8);
}
}
d0() {
}
@Override
public void pageBeforeStartListeners(LocalBrowser localBrowser, String str) {
}
@Override
public void pageErrorListener(LocalBrowser localBrowser, String str, int i) {
if (WebFragment.this.isFirstLoad) {
WebFragment.this.isFirstLoad = false;
}
com.bslyun.app.fragment.f fVar = WebFragment.this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
WebFragment.this.mRefreshLayout.v(true);
WebFragment.this.localBrowser.setVisibility(8);
WebFragment webFragment = WebFragment.this;
webFragment.webError = true;
if (webFragment.errorLayout != null) {
WebFragment.this.errorLayout.setVisibility(0);
if (WebFragment.this.errorLoadingView.getVisibility() == 0) {
WebFragment.this.errorLoadingView.setVisibility(8);
}
} else {
WebFragment webFragment2 = WebFragment.this;
webFragment2.errorLayout = (LinearLayout) webFragment2.mErrorStub.inflate();
WebFragment.this.errorLayout.setVisibility(0);
WebFragment.this.errorLayout.findViewById(R.id.reload).setOnClickListener(WebFragment.this);
WebFragment webFragment3 = WebFragment.this;
webFragment3.errorLoadingView = (FrameLayout) webFragment3.errorLayout.findViewById(R.id.loading_view);
}
TextView textView = (TextView) WebFragment.this.errorLayout.findViewById(R.id.error);
((TextView) WebFragment.this.errorLayout.findViewById(R.id.errorCode)).setText(WebFragment.this.getResources().getString(R.string.error_code_text) + i);
if (m0.b0(WebFragment.this.getContext()) == 0) {
textView.setText(WebFragment.this.getResources().getString(R.string.error_network_text));
} else if (i == -7) {
textView.setText(WebFragment.this.getResources().getString(R.string.error_timed_out_text));
} else {
textView.setText(WebFragment.this.getResources().getString(R.string.error_link_text));
}
}
@Override
public void pageReadyListener(LocalBrowser localBrowser, String str) {
WebFragment.this.mAppConfig.b0 = new ArrayList<>();
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.localBrowser, JavaScriptUtils.showImage);
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.localBrowser, JavaScriptUtils.imageClick);
if (WebFragment.this.isCssOpen()) {
JavaScriptUtils.injectCSSFile(WebFragment.this.getContext(), WebFragment.this.localBrowser, (String) com.bslyun.app.utils.c0.a(WebFragment.this.context, "downloadcsspath", BuildConfig.FLAVOR));
}
if (WebFragment.this.isFirstLoad) {
WebFragment.this.isFirstLoad = false;
}
WebFragment.this.mRefreshLayout.v(true);
WebFragment.this.isPullRefreshAction = false;
WebFragment webFragment = WebFragment.this;
if (webFragment.loadingView != null && webFragment.isResumed()) {
WebFragment.this.loadingView.dismiss();
}
WebFragment webFragment2 = WebFragment.this;
if (!webFragment2.webError) {
if (webFragment2.errorLayout != null) {
new Handler().postDelayed(new a(), 2000L);
}
WebFragment.this.localBrowser.setVisibility(0);
}
WebFragment.this.webError = false;
}
@Override
public void pageStartedListener(LocalBrowser localBrowser, String str, Bitmap bitmap) {
WebFragment.webLoadOk = false;
if (m0.b0(WebFragment.this.context) == 0) {
Context context = WebFragment.this.context;
m0.u0(context, context.getString(R.string.no_network_prompt));
WebFragment.this.mRefreshLayout.v(true);
return;
}
WebFragment webFragment = WebFragment.this;
if (webFragment.loadingView != null && !webFragment.isPullRefreshAction && !TextUtils.isEmpty(WebFragment.this.mAppConfig.W) && WebFragment.this.mAppConfig.W.equals("1") && !WebFragment.this.isFirstLoad) {
WebFragment.this.loadingView.show();
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.J0) {
webFragment2.start();
}
}
}
class e implements Runnable {
final String f4358a;
final String f4359b;
final String f4360c;
e(String str, String str2, String str3) {
this.f4358a = str;
this.f4359b = str2;
this.f4360c = str3;
}
@Override
public void run() {
String url;
if (TextUtils.isEmpty(this.f4358a) || TextUtils.isEmpty(this.f4359b) || TextUtils.isEmpty(this.f4360c)) {
WebFragment.this.hook.getShare();
return;
}
if (WebFragment.this.isLocalWebview()) {
url = WebFragment.this.localBrowser.getUrl();
} else {
url = WebFragment.this.x5Browser.getUrl();
}
com.bslyun.app.utils.y.i(WebFragment.this.context, new ShareItem(this.f4358a, this.f4359b, this.f4360c, url, BuildConfig.FLAVOR), 0);
}
}
public class e0 implements LocalChromeClientListener {
class a implements Runnable {
a() {
}
@Override
public void run() {
WebFragment.this.webProgress.setVisibility(8);
WebFragment.this.webProgressPer = 0;
}
}
e0() {
}
@Override
public void pageProgressListener(LocalBrowser localBrowser, int i) {
if (!TextUtils.isEmpty(localBrowser.getUrl()) && !WebFragment.this.rememberUrl.equals(localBrowser.getUrl())) {
WebFragment.this.setConfig(localBrowser.getUrl());
WebFragment.this.rememberUrl = localBrowser.getUrl();
String cookie = android.webkit.CookieManager.getInstance().getCookie(WebFragment.this.rememberUrl);
if (!TextUtils.isEmpty(cookie)) {
com.bslyun.app.utils.p.c("bsl_cookie", cookie);
com.bslyun.app.utils.c0.c(WebFragment.this.mMainActivity, "web_cookie", cookie);
}
WebFragment.webLoadOk = false;
}
WebFragment.this.comparisonProgress(i);
if (localBrowser.getProgress() >= 80 && !WebFragment.webLoadOk) {
WebFragment.webLoadOk = true;
if (WebFragment.this.getContext() != null) {
WebFragment webFragment = WebFragment.this;
if (webFragment.mAppConfig.J1 && com.bslyun.app.e.a.r && !com.bslyun.app.e.a.s) {
webFragment.mMainActivity.openAppNumber();
}
if (WebFragment.this.isJssOpen()) {
JavaScriptUtils.injectJSFile2(WebFragment.this.getContext(), WebFragment.this.localBrowser, (String) com.bslyun.app.utils.c0.a(WebFragment.this.context, "downloadjspath", BuildConfig.FLAVOR));
}
WebFragment webFragment2 = WebFragment.this;
if (webFragment2.mAppConfig.j3) {
JavaScriptUtils.injectJSFile(webFragment2.getContext(), WebFragment.this.localBrowser, "plz.js");
}
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.localBrowser, JavaScriptUtils.blank);
JavaScriptUtils.postJsInWebView(WebFragment.this.getContext(), WebFragment.this.localBrowser, "javascript:(!function(){window.local_kingkr_obj.injectOk();}())");
}
WebFragment webFragment3 = WebFragment.this;
if (webFragment3.mAppConfig.X0) {
JavaScriptUtils.postJsInWebView(webFragment3.context, webFragment3.localBrowser, JavaScriptUtils.videoJS);
}
}
WebFragment.this.loadProgress = i;
if (WebFragment.this.webProgressPer != 100 || TextUtils.isEmpty(WebFragment.this.mAppConfig.W) || !WebFragment.this.mAppConfig.W.equals("0")) {
WebFragment.this.webProgressPer = i;
if (TextUtils.isEmpty(WebFragment.this.mAppConfig.W) || !WebFragment.this.mAppConfig.W.equals("0")) {
return;
}
WebFragment webFragment4 = WebFragment.this;
if (webFragment4.mAppConfig.U) {
webFragment4.webProgress.setVisibility(0);
WebFragment.this.webProgress.setProgress(WebFragment.this.webProgressPer);
return;
}
return;
}
localBrowser.postDelayed(new a(), 800L);
}
@Override
public void receivedTitleListener(LocalBrowser localBrowser, String str) {
WebFragment.this.setNavTitle(str);
}
}
public class f implements Runnable {
final String f4364a;
f(String str) {
this.f4364a = str;
}
@Override
public void run() {
WebFragment.this.localBrowser.loadUrl(this.f4364a);
}
}
public class f0 implements View.OnClickListener {
String f4366a;
String f4367b;
class a implements f.d {
a() {
}
@Override
public void getDownPath(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
com.bslyun.app.utils.n.e(WebFragment.this.context, str);
Toast.makeText(WebFragment.this.context, "已保存到手机相册!", 0).show();
}
@Override
public void onDownPath(List<String> list) {
}
}
public f0(String str, String str2) {
this.f4366a = str;
this.f4367b = str2;
}
@Override
public void onClick(View view) {
String absolutePath;
switch (view.getId()) {
case R.id.copyImageUrl:
WebFragment webFragment = WebFragment.this;
if (!webFragment.mAppConfig.t0) {
Toast.makeText(webFragment.mMainActivity, "您还没有开启此功能", 0).show();
return;
} else {
m0.e(webFragment.context, this.f4367b);
break;
}
case R.id.copyUrl:
WebFragment webFragment2 = WebFragment.this;
if (!webFragment2.mAppConfig.u0) {
Toast.makeText(webFragment2.mMainActivity, "您还没有开启此功能", 0).show();
return;
} else {
m0.e(webFragment2.context, this.f4366a);
break;
}
case R.id.openBrowser:
WebFragment webFragment3 = WebFragment.this;
if (!webFragment3.mAppConfig.y0) {
Toast.makeText(webFragment3.mMainActivity, "您还没有开启此功能", 0).show();
return;
}
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setData(Uri.parse(this.f4366a));
WebFragment.this.startActivity(intent);
break;
case R.id.qrCode:
if (com.bslyun.app.utils.z.d(WebFragment.this.getActivity(), true, 122, 1220)) {
QRCodeComponent.image(WebFragment.this.getActivity(), this.f4367b, (String) null);
break;
}
break;
case R.id.saveImage:
WebFragment webFragment4 = WebFragment.this;
if (!webFragment4.mAppConfig.s0) {
Toast.makeText(webFragment4.mMainActivity, "您还没有开启此功能", 0).show();
return;
}
if (com.bslyun.app.utils.z.d(webFragment4.getActivity(), true, 121, 1210)) {
if (this.f4367b.contains("data:image/")) {
File file = new File(Environment.getExternalStorageDirectory().getPath() + File.separator + WebFragment.this.context.getPackageName());
if (!file.exists()) {
file.mkdir();
}
try {
if (WebFragment.this.mAppConfig.h3 == 0) {
absolutePath = com.bslyun.app.utils.i.c(this.f4367b).getAbsolutePath();
} else {
absolutePath = com.bslyun.app.utils.i.d(this.f4367b).getAbsolutePath();
}
m0.i(this.f4367b, absolutePath);
com.bslyun.app.utils.n.e(WebFragment.this.context, absolutePath);
Toast.makeText(WebFragment.this.context, "已保存到手机相册!", 0).show();
break;
} catch (Exception e2) {
e2.printStackTrace();
break;
}
} else {
com.bslyun.app.utils.f.a(WebFragment.this.context, this.f4367b, new a());
break;
}
}
break;
}
WebFragment.this.bottomSheetDialog.dismiss();
}
}
public class g implements Runnable {
final String f4370a;
g(String str) {
this.f4370a = str;
}
@Override
public void run() {
WebFragment.this.x5Browser.loadUrl(this.f4370a);
}
}
class g0 extends Handler {
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
WebFragment.this.customDialog.dismiss();
WebFragment.this.reload();
}
}
g0() {
}
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
if (message.what != 1) {
return;
}
if (com.bslyun.app.e.a.r && WebFragment.this.isAdded()) {
WebFragment.this.customDialog = new com.bslyun.app.f.d(WebFragment.this.context, "title", null, new a());
WebFragment.this.customDialog.c(WebFragment.this.getResources().getString(R.string.load_fail_hint), WebFragment.this.getResources().getString(R.string.load_fail_cancel), WebFragment.this.getResources().getString(R.string.load_fail_sure));
}
if (WebFragment.this.isFirstLoad) {
WebFragment.this.isFirstLoad = false;
}
}
}
public class h implements Runnable {
final String f4374a;
final com.bslyun.app.f.b f4375b;
h(String str, com.bslyun.app.f.b bVar) {
this.f4374a = str;
this.f4375b = bVar;
}
@Override
public void run() {
if (TextUtils.isEmpty(this.f4374a)) {
this.f4375b.u(WebFragment.this.localBrowser.getUrl());
} else {
this.f4375b.u(this.f4374a);
}
}
}
public class h0 extends Thread {
public h0() {
}
@Override
public void run() {
Thread currentThread = Thread.currentThread();
super.run();
while (WebFragment.this.thread == currentThread) {
if (WebFragment.this.loadProgress == 100) {
WebFragment.this.TimingStop();
} else if (WebFragment.this.loadProgress >= 70 || WebFragment.this.timer < WebFragment.this.loadingTime_70) {
if (WebFragment.this.loadProgress < 100 && WebFragment.this.timer >= WebFragment.this.loadingTime_100) {
WebFragment.this.TimingStop();
WebFragment.this.mLoadhandler.sendEmptyMessage(1);
}
} else {
WebFragment.this.TimingStop();
WebFragment.this.mLoadhandler.sendEmptyMessage(1);
}
try {
WebFragment.access$3708(WebFragment.this);
Thread.sleep(1000L);
} catch (InterruptedException e2) {
e2.printStackTrace();
}
}
}
}
public class i implements Runnable {
final String f4378a;
final com.bslyun.app.f.b f4379b;
i(String str, com.bslyun.app.f.b bVar) {
this.f4378a = str;
this.f4379b = bVar;
}
@Override
public void run() {
if (TextUtils.isEmpty(this.f4378a)) {
this.f4379b.u(WebFragment.this.x5Browser.getUrl());
} else {
this.f4379b.u(this.f4378a);
}
}
}
class i0 extends BroadcastReceiver {
i0() {
}
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if ("com.com.jsyh.pushlibrary.jpush.setTag".equals(action)) {
PushComponent.setJPushTagResult(context, WebFragment.this.getBrowser(), intent.getStringExtra("callback"), intent.getStringExtra("result"));
}
if ("com.bslyun.app.activity.MainActivity.Mi".equals(action)) {
JavaScriptUtils.postJsInWebView(context, WebFragment.this.getBrowser(), JavaScriptUtils.geneciCallbackFunction(com.bslyun.app.e.a.f4268e, intent.getStringExtra("code")));
}
if ("weibo_share_callback".equals(action)) {
int intExtra = intent.getIntExtra("code", -1);
if (intExtra == 0) {
intExtra = 1;
} else if (intExtra == 1) {
intExtra = 0;
}
if (!TextUtils.isEmpty(com.bslyun.app.utils.y.f4732c)) {
JavaScriptUtils.postJsInWebView(context, WebFragment.this.getBrowser(), JavaScriptUtils.geneciCallbackFunction(com.bslyun.app.utils.y.f4732c, intExtra + BuildConfig.FLAVOR));
}
}
if ("weibo_login_callback".equals(action)) {
Bundle extras = intent.getExtras();
WeiboComponent.handleLoginResult(WebFragment.this.mMainActivity, extras.getString("uid"), extras.getString("token"), extras.getString("refreshToken"));
}
if ("weibo_login_callback_cancel".equals(action)) {
WebFragment.this.mMainActivity.loginError("取消登录");
}
if ("hw_push_callback".equals(action)) {
JavaScriptUtils.postJsInWebView(context, WebFragment.this.getBrowser(), JavaScriptUtils.geneciCallbackFunction(com.bslyun.app.e.a.f4268e, intent.getStringExtra("token")));
}
if ("zb_request_callback".equals(action)) {
JavaScriptUtils.postJsInWebView(context, WebFragment.this.getBrowser(), JavaScriptUtils.geneciCallbackFunction(intent.getStringExtra("callback"), intent.getStringExtra("result")));
}
}
}
public class j implements Runnable {
final String f4382a;
final String f4383b;
j(String str, String str2) {
this.f4382a = str;
this.f4383b = str2;
}
@Override
public void run() {
PackageManager packageManager = WebFragment.this.getActivity().getPackageManager();
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
String str = this.f4382a;
if (TextUtils.isEmpty(str)) {
if (WebFragment.this.isLocalWebview()) {
str = WebFragment.this.localBrowser.getUrl();
} else {
str = WebFragment.this.x5Browser.getUrl();
}
}
intent.setData(Uri.parse(str));
intent.setClassName(this.f4383b, packageManager.getLaunchIntentForPackage(this.f4383b).resolveActivity(packageManager).getClassName());
WebFragment.this.startActivity(intent);
}
}
class k implements AudioManager.OnAudioFocusChangeListener {
k(WebFragment webFragment) {
}
@Override
public void onAudioFocusChange(int i) {
}
}
public class l implements Runnable {
final String f4385a;
l(String str) {
this.f4385a = str;
}
@Override
public void run() {
if (TextUtils.isEmpty(this.f4385a)) {
if (WebFragment.this.mMainActivity.mNavigateLayout.getVisibility() == 8) {
com.bslyun.app.utils.b.b(WebFragment.this.mMainActivity.mNavigateLayout, m0.l(WebFragment.this.getContext(), 45.0f));
WebFragment.this.mMainActivity.jsNavCallGone = false;
return;
} else {
WebFragment.this.mMainActivity.mNavigateLayout.setVisibility(8);
WebFragment.this.mMainActivity.jsNavCallGone = true;
return;
}
}
if (this.f4385a.equals("0")) {
if (WebFragment.this.mMainActivity.mNavigateLayout.getHeight() > 0) {
com.bslyun.app.utils.b.a(WebFragment.this.mMainActivity.mNavigateLayout, WebFragment.this.mRootView, m0.l(r2.getContext(), 45.0f));
}
WebFragment.this.mMainActivity.jsNavCallGone = true;
return;
}
if (WebFragment.this.mMainActivity.mNavigateLayout.getHeight() <= 0 || WebFragment.this.mMainActivity.mNavigateLayout.getVisibility() == 8) {
WebFragment.this.mMainActivity.mNavigateLayout.setVisibility(0);
com.bslyun.app.utils.b.b(WebFragment.this.mMainActivity.mNavigateLayout, m0.l(WebFragment.this.getContext(), 45.0f));
WebFragment.this.mMainActivity.jsNavCallGone = false;
}
}
}
public class m implements Runnable {
final String f4387a;
final int f4388b;
m(String str, int i) {
this.f4387a = str;
this.f4388b = i;
}
@Override
public void run() {
com.bumptech.glide.c.v(WebFragment.this.getActivity()).u(this.f4387a).a(com.bumptech.glide.q.f.t0().a0(this.f4388b)).D0(((MainActivity) WebFragment.this.getActivity()).mLeftMenu);
}
}
public class n implements Runnable {
final String f4390a;
final int f4391b;
n(String str, int i) {
this.f4390a = str;
this.f4391b = i;
}
@Override
public void run() {
com.bumptech.glide.c.v(WebFragment.this.getActivity()).u(this.f4390a).a(com.bumptech.glide.q.f.t0().a0(this.f4391b)).D0(((MainActivity) WebFragment.this.getActivity()).share);
}
}
public class o implements Runnable {
final boolean f4393a;
final int f4394b;
final int f4395c;
final int f4396d;
final int f4397e;
final String f4398f;
final String f4399g;
o(boolean z, int i, int i2, int i3, int i4, String str, String str2) {
this.f4393a = z;
this.f4394b = i;
this.f4395c = i2;
this.f4396d = i3;
this.f4397e = i4;
this.f4398f = str;
this.f4399g = str2;
}
@Override
public void run() {
if (WebFragment.this.getActivity() == null || WebFragment.this.mMainActivity.barHeight == null) {
return;
}
if (!WebFragment.this.isPart) {
if (!this.f4393a) {
WebFragment.this.mMainActivity.barHeight.setBackgroundColor(WebFragment.this.mAppConfig.G);
} else {
WebFragment.this.mMainActivity.barHeight.setBackgroundColor(this.f4394b);
}
}
WebFragment.this.mAppConfig.u = Color.rgb(this.f4395c, this.f4396d, this.f4397e);
if (WebFragment.this.mAppConfig.r) {
if (!"1".equals(this.f4398f)) {
WebFragment.this.IS_LONG_NAVBAR_COLOR = BuildConfig.FLAVOR;
} else {
WebFragment.this.IS_LONG_NAVBAR_COLOR = this.f4399g;
}
if (WebFragment.this.mAppConfig.L1 == 0 || "1".equals(this.f4398f) || this.f4393a) {
WebFragment.this.mMainActivity.mNavigateLayout.setBackgroundColor(WebFragment.this.mAppConfig.u);
} else {
WebFragment.this.mMainActivity.mNavigateLayout.setBackgroundResource(com.bslyun.app.utils.b0.b(WebFragment.this.getContext(), WebFragment.this.mAppConfig.M1));
}
if (m0.T(m0.O(WebFragment.this.mAppConfig.n))) {
WebFragment webFragment = WebFragment.this;
webFragment.onJsNavBarAlpha(m0.O(webFragment.mAppConfig.n), this.f4398f);
}
}
}
}
public class p implements Runnable {
final String f4401a;
final String f4402b;
final boolean f4403c;
final int f4404d;
p(String str, String str2, boolean z, int i) {
this.f4401a = str;
this.f4402b = str2;
this.f4403c = z;
this.f4404d = i;
}
@Override
public void run() {
if ("1".equals(this.f4401a)) {
WebFragment.this.IS_LONG_TABBAR_COLOR = this.f4402b;
}
if (!"1".equals(this.f4401a)) {
WebFragment webFragment = WebFragment.this;
if (webFragment.mAppConfig.N1 != 0 && !this.f4403c) {
webFragment.onJsTabbarAlpha("0", "0", true);
WebFragment.this.mMainActivity.mTabHost.setBackgroundResource(com.bslyun.app.utils.b0.b(WebFragment.this.mMainActivity, WebFragment.this.mAppConfig.O1));
return;
}
}
for (int i = 0; i < WebFragment.this.mMainActivity.mTabHost.getTabWidget().getChildCount(); i++) {
WebFragment.this.mMainActivity.mTabHost.getTabWidget().getChildTabViewAt(i).setBackgroundColor(this.f4404d);
}
WebFragment.this.mMainActivity.mTabHost.setBackgroundResource(0);
}
}
public class q implements Runnable {
final String f4406a;
q(String str) {
this.f4406a = str;
}
@Override
public void run() {
int i = Build.VERSION.SDK_INT;
if ("1".equals(this.f4406a)) {
if (i > 19 || WebFragment.this.mMainActivity.isBarHeightVisiable) {
try {
if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f) {
View view = WebFragment.this.mMainActivity.barHeight;
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.height = com.flyco.systembar.a.a(WebFragment.this.getContext()) * 2;
view.setLayoutParams(layoutParams);
WebFragment.this.mMainActivity.barHeight.setVisibility(0);
} else if (Float.parseFloat(WebFragment.this.mAppConfig.n) == 1.0f) {
View view2 = WebFragment.this.mMainActivity.barHeight;
ViewGroup.LayoutParams layoutParams2 = view2.getLayoutParams();
layoutParams2.height = com.flyco.systembar.a.a(WebFragment.this.getContext()) * 2;
view2.setLayoutParams(layoutParams2);
}
if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f && Float.parseFloat(WebFragment.this.mAppConfig.p) < 1.0f) {
View findViewById = WebFragment.this.mMainActivity.findViewById(R.id.bar_height2);
ViewGroup.LayoutParams layoutParams3 = findViewById.getLayoutParams();
layoutParams3.height = com.flyco.systembar.a.a(WebFragment.this.getContext()) * 2;
findViewById.setLayoutParams(layoutParams3);
}
if (Float.parseFloat(WebFragment.this.mAppConfig.n) == 1.0f) {
WebFragment.this.mMainActivity.getWindow().getDecorView().setSystemUiVisibility(1536);
}
WebFragment.this.mMainActivity.getWindow().clearFlags(1024);
} catch (NumberFormatException e2) {
e2.printStackTrace();
}
} else {
WebFragment.this.mMainActivity.isBarHeightVisiable = true;
com.flyco.systembar.a.e(WebFragment.this.getContext(), WebFragment.this.mMainActivity.barHeight);
}
}
if ("0".equals(this.f4406a)) {
WebFragment.this.mMainActivity.isBarHeightVisiable = false;
View view3 = WebFragment.this.mMainActivity.barHeight;
ViewGroup.LayoutParams layoutParams4 = view3.getLayoutParams();
layoutParams4.height = com.flyco.systembar.a.a(WebFragment.this.getContext());
view3.setLayoutParams(layoutParams4);
if (Float.parseFloat(WebFragment.this.mAppConfig.n) == 1.0f) {
if (i >= 28 && !m0.Y(WebFragment.this.mMainActivity)) {
WebFragment.this.mMainActivity.getWindow().addFlags(67108864);
WindowManager.LayoutParams attributes = WebFragment.this.mMainActivity.getWindow().getAttributes();
attributes.layoutInDisplayCutoutMode = 1;
WebFragment.this.mMainActivity.getWindow().setAttributes(attributes);
}
WebFragment.this.mMainActivity.getWindow().getDecorView().setSystemUiVisibility(5380);
}
WebFragment.this.mMainActivity.getWindow().addFlags(1024);
if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f && Float.parseFloat(WebFragment.this.mAppConfig.p) < 1.0f) {
WebFragment.this.mMainActivity.findViewById(R.id.bar_height2).setLayoutParams(layoutParams4);
} else if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f) {
WebFragment.this.mMainActivity.barHeight.setVisibility(4);
}
}
}
}
public class r implements Runnable {
final String f4408a;
final String f4409b;
r(String str, String str2) {
this.f4408a = str;
this.f4409b = str2;
}
@Override
public void run() {
if (!TextUtils.isEmpty(this.f4408a)) {
WebFragment.this.mMainActivity.title.setText(this.f4408a);
}
if (TextUtils.isEmpty(this.f4409b)) {
return;
}
WebFragment.this.mMainActivity.title.setTextColor(Color.parseColor(this.f4409b));
}
}
public class s implements Runnable {
final String f4411a;
s(String str) {
this.f4411a = str;
}
@Override
public void run() {
WebFragment.this.mMainActivity.mNavigateLayout.getBackground().setAlpha(Integer.parseInt(this.f4411a));
WebFragment.this.mMainActivity.barHeight.getBackground().setAlpha(Integer.parseInt(this.f4411a));
try {
if (Float.parseFloat(WebFragment.this.mAppConfig.n) < 1.0f) {
WebFragment.this.mMainActivity.findViewById(R.id.navLine).setVisibility(8);
} else {
WebFragment.this.mMainActivity.findViewById(R.id.navLine).setVisibility(0);
}
} catch (NumberFormatException e2) {
e2.printStackTrace();
}
}
}
public class t implements Runnable {
final String f4413a;
final String f4414b;
final boolean f4415c;
t(String str, String str2, boolean z) {
this.f4413a = str;
this.f4414b = str2;
this.f4415c = z;
}
@Override
public void run() {
if (this.f4413a.equals("1")) {
WebFragment.this.IS_LONG_TAB_ALPHA = this.f4414b;
}
if (WebFragment.this.mAppConfig.N1 != 0 && !this.f4413a.equals("1") && !this.f4415c) {
WebFragment.this.mMainActivity.mTabHost.getBackground().setAlpha(Integer.parseInt(this.f4414b));
return;
}
for (int i = 0; i < WebFragment.this.mAppConfig.e0.a().e().size(); i++) {
WebFragment.this.mMainActivity.mTabHost.getTabWidget().getChildTabViewAt(i).getBackground().setAlpha(Integer.parseInt(this.f4414b));
}
}
}
class u implements Runnable {
final String f4417a;
u(String str) {
this.f4417a = str;
}
@Override
public void run() {
if (this.f4417a.equals("2")) {
WebFragment.this.mMainActivity.mDrawerLayout.setDrawerLockMode(0);
} else {
WebFragment.this.mMainActivity.mDrawerLayout.setDrawerLockMode(1);
}
}
}
public class v implements com.scwang.smart.refresh.layout.c.i {
v() {
}
@Override
public boolean a(View view) {
return false;
}
@Override
public boolean b(View view) {
if (WebFragment.this.isLocalWebview()) {
return WebFragment.this.localBrowser != null && WebFragment.this.localBrowser.top <= 0;
}
X5Browser x5Browser = WebFragment.this.x5Browser;
return x5Browser != null && x5Browser.top <= 0;
return false;
}
}
public class w implements a.d {
final String f4420a;
w(String str) {
this.f4420a = str;
}
@Override
public void a(Throwable th) {
String str = "Exception:" + th.getLocalizedMessage();
String str2 = "javascript:" + this.f4420a + "(\"0\")";
if (WebFragment.this.isLocalWebview()) {
WebFragment.this.localBrowserPost(str2);
} else {
WebFragment.this.x5BrowserPost(str2);
}
}
}
public class x implements a.e {
final String f4422a;
x(String str) {
this.f4422a = str;
}
@Override
public void a() {
String str = "javascript:" + this.f4422a + "(\"1\")";
if (WebFragment.this.isLocalWebview()) {
WebFragment.this.localBrowserPost(str);
} else {
WebFragment.this.x5BrowserPost(str);
}
}
@Override
public void b() {
String str = "javascript:" + this.f4422a + "(\"0\")";
if (WebFragment.this.isLocalWebview()) {
WebFragment.this.localBrowserPost(str);
} else {
WebFragment.this.x5BrowserPost(str);
}
}
@Override
public void c(int i) {
Toast.makeText(WebFragment.this.context, "还可以尝试" + i + "次", 0).show();
}
}
public class y implements View.OnTouchListener {
y(WebFragment webFragment) {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
return false;
}
}
public class z implements View.OnTouchListener {
z(WebFragment webFragment) {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
com.bslyun.app.utils.p.b("x5sssssssssssssssssssss");
return false;
}
}
public void TimingStop() {
this.timer = 0;
this.thread = null;
}
static int access$3708(WebFragment webFragment) {
int i2 = webFragment.timer;
webFragment.timer = i2 + 1;
return i2;
}
private void codeResult(String str) {
if (TextUtils.isEmpty(str)) {
Toast.makeText(this.context, "二维码识别失败", 0).show();
return;
}
if (!str.startsWith("http") && !str.contains("alipay://") && !str.contains("https://wx.tenpay.com/") && !str.contains("weixin://")) {
com.bslyun.app.f.d dVar = new com.bslyun.app.f.d(getContext(), str, getResources().getString(R.string.qrcode_cancel), getResources().getString(R.string.qrcode_sure), null, new b());
this.qrDialog = dVar;
dVar.show();
} else if (isLocalWebview()) {
this.localBrowser.loadUrl(str);
} else {
this.x5Browser.loadUrl(str);
}
}
public void comparisonProgress(int i2) {
if (TextUtils.isEmpty(this.mAppConfig.M0) || Float.parseFloat(this.mAppConfig.M0) * 100.0f > i2) {
return;
}
com.bslyun.app.e.a.q = true;
if (com.bslyun.app.e.a.r) {
return;
}
EventBusMessage eventBusMessage = new EventBusMessage();
eventBusMessage.flag1 = "dismiss";
org.greenrobot.eventbus.c.c().l(eventBusMessage);
}
private void control() {
com.bslyun.app.utils.i0.a().post(new a());
}
private void getImgFromCamera() {
this.tempFile = new File(this.mMainActivity.getExternalFilesDir(Environment.DIRECTORY_DCIM), System.currentTimeMillis() + PictureMimeType.PNG);
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
if (Build.VERSION.SDK_INT >= 24) {
intent.setFlags(2);
intent.putExtra("output", FileProvider.getUriForFile(this.mMainActivity, this.mMainActivity.getPackageName() + ".fileprovider", this.tempFile));
} else {
intent.putExtra("output", Uri.fromFile(this.tempFile));
}
startActivityForResult(intent, 126);
}
private void initFingerprint(String str) {
com.jsyh.fingerpirnt.a aVar = this.mFingerprintIdentify;
if (aVar != null) {
aVar.a();
}
com.jsyh.fingerpirnt.a aVar2 = new com.jsyh.fingerpirnt.a(getActivity(), new w(str));
this.mFingerprintIdentify = aVar2;
if (!aVar2.b()) {
String str2 = "javascript:" + str + "(\"0\")";
if (isLocalWebview()) {
localBrowserPost(str2);
return;
} else {
x5BrowserPost(str2);
return;
}
}
Toast.makeText(this.context, "请按下指纹按钮识别", 0).show();
this.mFingerprintIdentify.d(3, new x(str));
}
private void initLocalBrowserLinstener() {
this.localBrowser.setWebTouchLisetner(this);
this.localBrowser.setBrowserLisetner(new d0());
this.localBrowser.setBrowserChromeClientListener(new e0());
this.localBrowser.setOnLongClickListener(this);
}
private void initWebview(View view) {
if (isLocalWebview()) {
LocalBrowser localBrowser = (LocalBrowser) view.findViewById(R.id.localBrowser);
this.localBrowser = localBrowser;
localBrowser.setVisibility(8);
WBH5FaceVerifySDK.getInstance().setWebViewSettings(this.localBrowser, this.mMainActivity.getApplicationContext());
this.localBrowser.setBridge(getActivity(), this);
this.localBrowser.setJsToNavite(getActivity(), this);
this.localBrowser.setOnTouchListener(new y(this));
this.localBrowser.setVerticalScrollBarEnabled(false);
this.localBrowser.setVideoFullView((FrameLayout) getActivity().findViewById(R.id.frame_layout));
this.localBrowser.setVideoFullViewCallback(this.mMainActivity);
initLocalBrowserLinstener();
startLoadUrl();
} else {
X5Browser x5Browser = (X5Browser) view.findViewById(R.id.browser);
this.x5Browser = x5Browser;
if (this.mAppConfig.n3) {
ZJSdkComponent.registerJSBridge(this.mMainActivity, x5Browser);
}
X5WBH5FaceVerifySDK.getInstance().setWebViewSettings(this.x5Browser, this.mMainActivity.getApplicationContext());
if (Build.VERSION.SDK_INT >= 21) {
CookieManager.getInstance().setAcceptThirdPartyCookies(this.x5Browser, true);
}
this.x5Browser.setVisibility(0);
this.x5Browser.setOnTouchListener(new z(this));
this.x5Browser.setBridge(getActivity(), this);
this.x5Browser.setJsToNavite(getActivity(), this);
this.x5Browser.getView().setVerticalScrollBarEnabled(false);
this.x5Browser.setVideoFullView((FrameLayout) getActivity().findViewById(R.id.frame_layout));
x5BrowserListener();
startLoadUrl();
if (this.mAppConfig.q1) {
Bundle bundle = new Bundle();
bundle.putBoolean("standardFullScreen", false);
bundle.putBoolean("supportLiteWnd", false);
bundle.putInt("DefaultVideoScreen", 2);
try {
if (this.x5Browser.getX5BrowserChromeClient() != null) {
this.x5Browser.getX5WebViewExtension().invokeMiscMethod("setVideoParams", bundle);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
if (!"1".equals(this.mAppConfig.X) || TextUtils.isEmpty((String) com.bslyun.app.utils.c0.a(this.mMainActivity, "x5InstallFinish", BuildConfig.FLAVOR))) {
com.bslyun.app.utils.g0.f(this.mMainActivity, new a0());
}
}
public static WebFragment newInstance() {
return new WebFragment();
}
private void openUrl(String str, String str2) {
if (TextUtils.isEmpty(str2)) {
return;
}
this.handler.postDelayed(new j(str2, str), 0L);
}
private void postPicJson(List<PictureInfo> list) {
JavaScriptUtils.postJsInWebView(this.context, getBrowser(), JavaScriptUtils.geneciCallbackFunction("getPicInfo", new Gson().toJson(list)));
}
private void reloadWeb() {
if (isLocalWebview()) {
this.localBrowser.cacheControl(false);
if (TextUtils.isEmpty(this.localBrowser.getUrl())) {
return;
}
LocalBrowser localBrowser = this.localBrowser;
localBrowser.loadUrl(localBrowser.getUrl());
return;
}
this.x5Browser.cacheControl(false);
this.x5Browser.reload();
}
public void setNavTitle(String str) {
if (this.mAppConfig.r) {
String url = getUrl();
if (!this.isPart || TextUtils.isEmpty(this.titleText)) {
this.titleText = str;
setTitleText(url);
}
}
}
private void setTitleText(String str) {
if (!TextUtils.isEmpty(this.mAppConfig.e0.a().e().get(this.index).getUrl()) && this.mAppConfig.e0.a().e().get(this.index).getUrl().equals(str) && !TextUtils.isEmpty(this.mAppConfig.e0.a().e().get(this.index).D())) {
((MainActivity) getActivity()).title.setText(this.mAppConfig.e0.a().e().get(this.index).D());
this.titleText = this.mAppConfig.e0.a().e().get(this.index).D();
} else {
((MainActivity) getActivity()).title.setText(this.titleText);
}
}
public void showWindow(int i2, String str, String str2) {
this.bottomSheetDialog = new com.google.android.material.bottomsheet.a(this.context);
View inflate = LayoutInflater.from(this.context).inflate(R.layout.longclick_dialog, (ViewGroup) null);
this.bottomSheetDialog.setContentView(inflate);
if (i2 == 5) {
com.bslyun.app.d.a aVar = this.mAppConfig;
if (!aVar.s0 && !aVar.t0 && !aVar.R) {
return;
}
if (!aVar.R) {
inflate.findViewById(R.id.qrCode).setVisibility(8);
}
}
if (i2 == 8) {
com.bslyun.app.d.a aVar2 = this.mAppConfig;
if (!aVar2.s0 && !aVar2.t0 && !aVar2.u0 && !aVar2.y0 && !aVar2.R) {
return;
}
inflate.findViewById(R.id.srcImageLayout).setVisibility(0);
if (!this.mAppConfig.R) {
inflate.findViewById(R.id.qrCode).setVisibility(8);
}
}
if (i2 == 7) {
com.bslyun.app.d.a aVar3 = this.mAppConfig;
if (!aVar3.u0 && !aVar3.y0) {
return;
}
inflate.findViewById(R.id.srcImageLayout).setVisibility(0);
inflate.findViewById(R.id.type1).setVisibility(8);
}
if (!this.mAppConfig.t0) {
inflate.findViewById(R.id.copyImageUrl).setVisibility(8);
}
if (!this.mAppConfig.u0) {
inflate.findViewById(R.id.copyUrl).setVisibility(8);
}
if (!this.mAppConfig.y0) {
inflate.findViewById(R.id.openBrowser).setVisibility(8);
}
if (!this.mAppConfig.s0) {
inflate.findViewById(R.id.saveImage).setVisibility(8);
}
f0 f0Var = new f0(str2, str);
inflate.findViewById(R.id.cancel).setOnClickListener(f0Var);
inflate.findViewById(R.id.copyImageUrl).setOnClickListener(f0Var);
inflate.findViewById(R.id.copyUrl).setOnClickListener(f0Var);
inflate.findViewById(R.id.openBrowser).setOnClickListener(f0Var);
inflate.findViewById(R.id.saveImage).setOnClickListener(f0Var);
inflate.findViewById(R.id.qrCode).setOnClickListener(f0Var);
this.bottomSheetDialog.setOnShowListener(new c(this));
if (this.bottomSheetDialog.isShowing()) {
this.bottomSheetDialog.dismiss();
} else {
this.bottomSheetDialog.show();
}
}
public void start() {
h0 h0Var = new h0();
this.thread = h0Var;
h0Var.start();
}
private void uploadCance() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser == null || localBrowser.getLocalBrowserChromeClient() == null) {
return;
}
this.localBrowser.getLocalBrowserChromeClient().cancelUpload();
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser == null || x5Browser.getX5BrowserChromeClient() == null) {
return;
}
this.x5Browser.getX5BrowserChromeClient().cancelUpload();
}
private void uploadImageOk(Uri[] uriArr) {
if (isLocalWebview()) {
this.localBrowser.getLocalBrowserChromeClient().uploadImage(uriArr);
} else {
this.x5Browser.getX5BrowserChromeClient().uploadImage(uriArr);
}
}
private void x5BrowserListener() {
this.x5Browser.setViewControlListener(this);
this.x5Browser.setWebTouchLisetner(this);
this.x5Browser.setBrowserLisetner(new b0());
this.x5Browser.setBrowserChromeClientListener(new c0());
this.x5Browser.setOnLongClickListener(this);
}
public boolean canGoForward() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
return localBrowser.canGoForward();
}
return false;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
return x5Browser.canGoForward();
}
return false;
}
public boolean canGoback() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
return localBrowser.canGoBack();
}
return false;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
return x5Browser.canGoBack();
}
return false;
}
public void clearHistoryAll() {
if (isLocalWebview()) {
this.localBrowser.localBrowserClient.clearHistory = true;
} else {
this.x5Browser.x5BrowserClient.clearHistory = true;
}
}
@Override
public void controlBottomTabLayout(boolean z2, String str, String str2) {
if ("1".equals(str2)) {
this.IS_LONG_BOTTOM = str;
}
if (this.mAppConfig.l) {
MainActivity mainActivity = this.mMainActivity;
mainActivity.touchHide = false;
mainActivity.controlBottomTabLayout(true, str, true);
}
}
@Override
public void controlLeftMenuLayout(String str) {
if (this.mAppConfig.i) {
if ("1".equals(str)) {
this.mMainActivity.openLeftMenu();
}
if ("0".equals(str)) {
this.mMainActivity.closeLeftMenu();
}
}
}
@Override
public void controlNavLeftMenu(String str, String str2, String str3) {
if (!TextUtils.isEmpty(str) && Pattern.matches("^\\d+$", str)) {
this.handler.sendEmptyMessage(0);
if (!TextUtils.isEmpty(str3) && str3.equals("1")) {
this.IS_LONG_LEFT_BUTTON_FUNCTION = str;
this.IS_LONG_LEFT_BUTTON_IMG = str2;
}
((MainActivity) getActivity()).dynamicLeftNavigation = str;
this.leftBtnFunction = str;
((MainActivity) getActivity()).mLeftMenu.post(new m(str2, this.mAppConfig.f0.get(str).intValue()));
return;
}
this.handler.sendEmptyMessage(1);
}
@Override
public void controlNavRightMenu(String str, String str2, String str3) {
if (!TextUtils.isEmpty(str) && Pattern.matches("^\\d+$", str)) {
this.handler.sendEmptyMessage(3);
if (!TextUtils.isEmpty(str3) && str3.equals("1")) {
this.IS_LONG_RIGHT_BUTTON_FUNCTION = str;
this.IS_LONG_RIGHT_BUTTON_IMG = str2;
}
((MainActivity) getActivity()).dynamicRightNavigation = str;
this.rightBtnFunction = str;
((MainActivity) getActivity()).share.post(new n(str2, this.mAppConfig.f0.get(str).intValue()));
return;
}
this.handler.sendEmptyMessage(2);
}
@Override
public void controlNavigatorLayout(String str, String str2) {
if (!this.mAppConfig.r || this.mMainActivity.mNavigateLayout == null) {
return;
}
if (str2.equals("1")) {
this.IS_LONG_NAVIGATE = str;
}
this.mMainActivity.mNavigateLayout.post(new l(str));
}
public void desLoading() {
com.bslyun.app.fragment.f fVar = this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
}
public ViewGroup getBrowser() {
if (isLocalWebview()) {
return getLocalBrowser();
}
return getX5Browser();
}
public HookLifecycle getEventBus() {
WebFragmentHook webFragmentHook = this.hook;
if (webFragmentHook != null) {
return webFragmentHook;
}
return null;
}
public void getFunction(String str) {
WebViewUtils.getFunction(this.mMainActivity, this, getBrowser(), str);
}
public LocalBrowser getLocalBrowser() {
return this.localBrowser;
}
public View getRootView() {
return this.mRootView;
}
public String getUrl() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
return localBrowser.getUrl();
}
return null;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
return x5Browser.getUrl();
}
return null;
}
public X5Browser getX5Browser() {
return this.x5Browser;
}
public void goBack() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.goBack();
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.goBack();
}
}
public void goForward() {
if (canGoForward()) {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.goForward();
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.goForward();
}
}
}
@Override
protected void initData() {
}
@Override
protected void initTitle() {
super.initTitle();
if (this.mAppConfig.s) {
return;
}
((MainActivity) getActivity()).title.setVisibility(8);
}
@Override
protected void initView() {
}
@Override
protected void initView(View view) {
if (TextUtils.isEmpty(this.mAppConfig.K0)) {
this.loadingTime_70 = this.defautl_time;
} else {
this.loadingTime_70 = Integer.parseInt(this.mAppConfig.K0);
}
if (TextUtils.isEmpty(this.mAppConfig.L0)) {
this.loadingTime_100 = this.defautl_time;
} else {
this.loadingTime_100 = Integer.parseInt(this.mAppConfig.L0);
}
this.mErrorStub = (ViewStub) view.findViewById(R.id.vsErrorLayout);
ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.webProgress);
this.webProgress = progressBar;
progressBar.setMax(100);
if (!this.mAppConfig.U) {
this.webProgress.setVisibility(8);
}
SmartRefreshLayout smartRefreshLayout = (SmartRefreshLayout) view.findViewById(R.id.refreshLayout);
this.mRefreshLayout = smartRefreshLayout;
smartRefreshLayout.M(new v());
if (m0.T(this.mAppConfig.o) && !m0.T(this.mAppConfig.q)) {
int a2 = com.flyco.systembar.a.a(getContext());
if (Build.VERSION.SDK_INT < 21) {
a2 = com.flyco.systembar.a.a(getContext()) * 2;
}
SmartRefreshLayout smartRefreshLayout2 = this.mRefreshLayout;
smartRefreshLayout2.setPadding(smartRefreshLayout2.getPaddingLeft(), a2, this.mRefreshLayout.getPaddingRight(), this.mRefreshLayout.getPaddingBottom());
this.mRefreshLayout.requestLayout();
}
ClassicsHeader classicsHeader = (ClassicsHeader) view.findViewById(R.id.header);
this.header = classicsHeader;
classicsHeader.t(-1);
this.mRefreshLayout.E(this.mAppConfig.I);
this.mRefreshLayout.H(this);
initWebview(view);
}
public void loadUrl(String str) {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.loadUrl(str);
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.loadUrl(str);
}
}
public void localBrowserPost(String str) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.post(new f(str));
}
}
@Override
public void onActivityCreated(Bundle bundle) {
super.onActivityCreated(bundle);
}
@Override
public void onActivityResult(int i2, int i3, Intent intent) {
int i4 = Build.VERSION.SDK_INT;
super.onActivityResult(i2, i3, intent);
WebFragmentHook webFragmentHook = this.hook;
if (webFragmentHook == null || !webFragmentHook.onActivityResult(i2, i3, intent)) {
if (i2 == 10138 && i4 >= 30) {
if (Environment.isExternalStorageManager()) {
onUploadClick(3);
} else {
uploadCance();
}
}
if (i2 != 10134) {
if (i2 == 10140) {
if (i3 == -1 && intent != null) {
ArrayList<LocalMedia> obtainSelectorList = PictureSelector.obtainSelectorList(intent);
this.results = new Uri[obtainSelectorList.size()];
for (int i5 = 0; i5 < obtainSelectorList.size(); i5++) {
this.results[i5] = Uri.parse(obtainSelectorList.get(i5).getPath());
}
uploadImageOk(this.results);
} else {
uploadCance();
return;
}
}
} else if (i3 == -1 && intent != null) {
ArrayList<LocalMedia> obtainSelectorList2 = PictureSelector.obtainSelectorList(intent);
this.results = new Uri[obtainSelectorList2.size()];
ArrayList arrayList = new ArrayList();
for (int i6 = 0; i6 < obtainSelectorList2.size(); i6++) {
this.results[i6] = Uri.parse(obtainSelectorList2.get(i6).getPath());
arrayList.add(com.bslyun.app.utils.n.d(this.mMainActivity, obtainSelectorList2.get(i6).getPath()));
}
postPicJson(arrayList);
uploadImageOk(this.results);
} else {
uploadCance();
return;
}
if (i2 == 126) {
Uri[] uriArr = new Uri[1];
if (i4 >= 24) {
uriArr[0] = FileProvider.getUriForFile(this.mMainActivity, this.mMainActivity.getPackageName() + ".fileprovider", this.tempFile);
} else {
uriArr[0] = Uri.fromFile(this.tempFile);
}
if (uriArr[0] == null) {
uploadCance();
}
uploadImageOk(uriArr);
}
if (i2 == 10137) {
if (i3 == 10137 && intent != null) {
uploadImageOk(new Uri[]{Uri.fromFile(new File(((FileInfo) intent.getParcelableExtra("file_data")).getFilePath()))});
} else {
uploadCance();
}
}
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser == null || localBrowser.getLocalBrowserChromeClient() == null) {
return;
}
this.localBrowser.getLocalBrowserChromeClient().uploadFile(i2, i3, intent);
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser == null || x5Browser.getX5BrowserChromeClient() == null) {
return;
}
this.x5Browser.getX5BrowserChromeClient().uploadFile(i2, i3, intent);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.mMainActivity = (MainActivity) context;
}
@Override
public void onAwakeOtherBrowser(String str) {
String str2 = this.mAppConfig.P0;
if (TextUtils.isEmpty(str2)) {
com.bslyun.app.f.b bVar = new com.bslyun.app.f.b();
if (isLocalWebview()) {
this.localBrowser.post(new h(str, bVar));
} else {
this.x5Browser.post(new i(str, bVar));
}
bVar.show(getFragmentManager(), "browserListDialog");
return;
}
if (str.equals(BuildConfig.FLAVOR)) {
str = getUrl();
}
str2.hashCode();
char c2 = 65535;
switch (str2.hashCode()) {
case 48:
if (str2.equals("0")) {
c2 = 0;
break;
}
break;
case 49:
if (str2.equals("1")) {
c2 = 1;
break;
}
break;
case 50:
if (str2.equals("2")) {
c2 = 2;
break;
}
break;
case 51:
if (str2.equals("3")) {
c2 = 3;
break;
}
break;
}
switch (c2) {
case 0:
List<ResolveInfo> a2 = m0.a(this.context);
this.browserList = a2;
if (a2.size() > 0 && m0.U(this.context, this.browserList.get(0).activityInfo.packageName)) {
openUrl(this.browserList.get(0).activityInfo.packageName, str);
return;
} else {
m0.u0(this.context, "您的手机没有安装浏览器");
return;
}
case 1:
if (m0.U(this.context, "com.UCMobile")) {
openUrl("com.UCMobile", str);
return;
} else {
m0.u0(this.context, "您没有安装UC浏览器");
return;
}
case 2:
if (m0.U(this.context, TbsConfig.APP_QB)) {
openUrl(TbsConfig.APP_QB, str);
return;
} else {
m0.u0(this.context, "您没有安装QQ浏览器");
return;
}
case 3:
if (m0.U(this.context, "com.android.chrome")) {
openUrl("com.android.chrome", str);
return;
} else {
m0.u0(this.context, "您没有安装谷歌浏览器");
return;
}
default:
return;
}
}
public void onBackStackChanged() {
WebFragmentHook webFragmentHook = this.hook;
if (webFragmentHook != null && !webFragmentHook.isResit()) {
this.hook.onCreateFragment(this);
}
if (!this.newFragment) {
this.mMainActivity.touchHide = false;
setConfig(getUrl());
setTitleText(getUrl());
WebViewUtils.FragmentPopEvent fragmentPopEvent = WebViewUtils.fpe;
if (fragmentPopEvent != null && fragmentPopEvent == WebViewUtils.FragmentPopEvent.JS_NAV) {
if (((com.bslyun.app.fragment.d) getParentFragment()).j) {
reload();
}
} else {
WebViewUtils.FragmentPopEvent fragmentPopEvent2 = WebViewUtils.fpe;
if ((fragmentPopEvent2 == null || fragmentPopEvent2 == WebViewUtils.FragmentPopEvent.BACK_GESTURE) && this.mAppConfig.y1 == 1) {
reload();
}
}
String str = "我是当前最顶上的Fragment :" + getUrl();
}
WebViewUtils.fpe = null;
((com.bslyun.app.fragment.d) getParentFragment()).j = false;
this.newFragment = false;
}
@Override
public void onCancel(DialogInterface dialogInterface) {
uploadCance();
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == R.id.ivOpenLeft) {
getFunction(this.leftBtnFunction);
return;
}
if (id != R.id.reload) {
if (id != R.id.share) {
return;
}
getFunction(this.rightBtnFunction);
} else {
if (this.errorLayout != null) {
this.errorLoadingView.setVisibility(0);
}
reloadWeb();
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
Bundle arguments = getArguments();
if (arguments != null) {
this.isFirstLoad = arguments.getBoolean("isFirstLoad");
this.titleText = arguments.getString("titleText");
this.url = arguments.getString(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_URL);
this.index = arguments.getInt("tab_index");
this.isTab = arguments.getBoolean("is_tab");
this.newFragment = arguments.getBoolean("newFragment");
}
com.bslyun.app.utils.p.c("tag", "onCreate:" + this.url + " , index=" + this.index);
this.audioManager = (AudioManager) this.mMainActivity.getSystemService(PictureMimeType.MIME_TYPE_PREFIX_AUDIO);
this.aListener = new k(this);
}
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
WebFragmentHook webFragmentHook = new WebFragmentHook();
this.hook = webFragmentHook;
webFragmentHook.onCreateFragment(this);
this.broadcastReceiver = new i0();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.com.jsyh.pushlibrary.jpush.setTag");
intentFilter.addAction("com.bslyun.app.activity.MainActivity.Mi");
intentFilter.addAction("weibo_share_callback");
intentFilter.addAction("weibo_login_callback");
intentFilter.addAction("weibo_login_callback_cancel");
intentFilter.addAction("hw_push_callback");
intentFilter.addAction("zb_request_callback");
a.g.a.a.b(getContext()).c(this.broadcastReceiver, intentFilter);
View view = this.mRootView;
if (view != null) {
ViewGroup viewGroup2 = (ViewGroup) view.getParent();
if (viewGroup2 != null) {
viewGroup2.removeView(this.mRootView);
}
} else {
if (m0.T(this.mAppConfig.q)) {
com.bslyun.app.d.a aVar = this.mAppConfig;
if (aVar.r) {
if ("1".equals(aVar.X)) {
this.rootLayoutId = R.layout.fragment_x5_web_full;
} else {
this.rootLayoutId = R.layout.fragment_local_web_full;
}
View inflate = layoutInflater.inflate(this.rootLayoutId, viewGroup, false);
this.mRootView = inflate;
initView(inflate);
}
}
if ("1".equals(this.mAppConfig.X)) {
this.rootLayoutId = R.layout.fragment_x5_web;
} else {
this.rootLayoutId = R.layout.fragment_local_web;
}
View inflate2 = layoutInflater.inflate(this.rootLayoutId, viewGroup, false);
this.mRootView = inflate2;
initView(inflate2);
}
if (this.isTab) {
return this.mRootView;
}
View view2 = this.mRootView;
if (view2 instanceof SwipeBackLayout) {
return view2;
}
View attachToSwipeBack = attachToSwipeBack(view2);
this.mRootView = attachToSwipeBack;
return attachToSwipeBack;
}
@Override
public void onCreenOrientation(String str) {
if ("2".equals(str)) {
getActivity().setRequestedOrientation(0);
}
if ("3".equals(str)) {
getActivity().setRequestedOrientation(8);
}
if ("1".equals(str)) {
getActivity().setRequestedOrientation(1);
}
if ("0".equals(str)) {
getActivity().setRequestedOrientation(4);
}
com.bslyun.app.utils.c0.c(this.context, "js_orientation", str);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mMainActivity.refreshConfig();
WebFragmentHook webFragmentHook = this.hook;
if (webFragmentHook != null) {
webFragmentHook.stopLocation();
}
com.jsyh.fingerpirnt.a aVar = this.mFingerprintIdentify;
if (aVar != null) {
aVar.a();
}
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.destroy();
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.destroy();
if (this.mAppConfig.n3) {
ZJSdkComponent.unregisterJSBridge(this.x5Browser);
}
}
}
@Override
public void onDestroyView() {
ViewGroup viewGroup;
String str = "onDestoryView :" + getUrl();
com.bslyun.app.fragment.f fVar = this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
WebFragmentHook webFragmentHook = this.hook;
if (webFragmentHook != null) {
webFragmentHook.onDestory();
}
a.g.a.a.b(getContext()).e(this.broadcastReceiver);
super.onDestroyView();
if (!this.isTab || (viewGroup = (ViewGroup) this.mRootView.getParent()) == null) {
return;
}
viewGroup.removeView(this.mRootView);
}
@Override
public void onFingerprint(String str) {
initFingerprint(str);
}
@Override
public void onHideState(String str) {
this.handler.post(new q(str));
}
@Override
public void onHistoryBack() {
reload();
}
@Override
public void onImageClick(String str) {
this.hook.showWebImage(this.mAppConfig.g(), null, this.mAppConfig.g().indexOf(str) > -1 ? this.mAppConfig.g().indexOf(str) : 0, 1);
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i2, long j2) {
int id = this.mNavMenuConfig.getNavigtionMenu().get(i2).getId();
if (id == 100) {
this.hook.getShare();
} else if (id == 200) {
com.bslyun.app.utils.y.g(getContext(), this.mAppConfig.T);
}
this.popuWindow.dismiss();
}
@Override
public void onJsNavBarAlpha(String str, String str2) {
if (str2.equals("1")) {
this.IS_LONG_NAV_ALPHA = str;
}
com.bslyun.app.utils.i0.a().post(new s(str));
}
@Override
public void onJsRefreshEnable(String str, String str2) {
if ("1".equals(str2)) {
this.IS_LONG_REFRESH = str;
}
if ("1".equals(str)) {
this.mRefreshLayout.E(true);
} else if ("0".equals(str)) {
this.mRefreshLayout.E(false);
}
}
@Override
public void onJsTabbarAlpha(String str, String str2, boolean z2) {
com.bslyun.app.utils.i0.a().post(new t(str2, str, z2));
}
@Override
public void onJsTitleName(String str, String str2) {
com.bslyun.app.utils.i0.a().post(new r(str, str2));
}
@Override
public boolean onLongClick(View view) {
if (this.mAppConfig.r0) {
return true;
}
if (isLocalWebview()) {
WebView.HitTestResult hitTestResult = this.localBrowser.getHitTestResult();
int type = hitTestResult.getType();
if (type == 5) {
showWindow(type, hitTestResult.getExtra(), null);
return true;
}
if (type == 8) {
Message obtainMessage = this.handler.obtainMessage();
obtainMessage.what = 6;
this.localBrowser.requestFocusNodeHref(obtainMessage);
return true;
}
if (type != 7) {
return false;
}
showWindow(type, null, hitTestResult.getExtra());
return true;
}
WebView.HitTestResult hitTestResult2 = this.x5Browser.getHitTestResult();
int type2 = hitTestResult2.getType();
if (type2 == 5) {
showWindow(type2, hitTestResult2.getExtra(), null);
return true;
}
if (type2 == 8) {
Message obtainMessage2 = this.handler.obtainMessage();
obtainMessage2.what = 6;
this.x5Browser.requestFocusNodeHref(obtainMessage2);
return true;
}
if (type2 != 7) {
return false;
}
showWindow(type2, null, hitTestResult2.getExtra());
return true;
}
@Override
public void onPause() {
String str = "onPause :" + getUrl();
com.bslyun.app.fragment.f fVar = this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.onPause();
}
} else {
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.onPause();
}
}
com.jsyh.fingerpirnt.a aVar = this.mFingerprintIdentify;
if (aVar != null) {
aVar.a();
}
if (this.audioManager != null && !this.mAppConfig.B1) {
int i2 = 0;
while (this.audioManager.requestAudioFocus(this.aListener, 3, 2) != 1 && (i2 = i2 + 1) < 10) {
}
}
super.onPause();
}
@Override
public void onRefresh(com.scwang.smart.refresh.layout.a.f fVar) {
if (m0.b0(this.context) == 0) {
Context context = this.context;
m0.u0(context, context.getString(R.string.no_network_prompt));
this.mRefreshLayout.v(true);
} else {
this.isPullRefreshAction = true;
reloadWeb();
}
}
@Override
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i2, strArr, iArr);
if (this.hook.onActivityResutlForPermission(i2, strArr, iArr)) {
}
}
@Override
public void onResume() {
super.onResume();
com.bslyun.app.fragment.f fVar = this.loadingView;
if (fVar != null) {
fVar.dismiss();
}
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.onResume();
}
} else {
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.onResume();
}
}
if (!TextUtils.isEmpty(((MainActivity) getActivity()).dynamicLeftNavigation)) {
this.leftBtnFunction = ((MainActivity) getActivity()).dynamicLeftNavigation;
}
MainActivity mainActivity = this.mMainActivity;
if (mainActivity.startScreenshort && mainActivity.contentObserver != null) {
mainActivity.contentObserver = com.bslyun.app.utils.e0.j(getActivity());
}
AudioManager audioManager = this.audioManager;
if (audioManager == null || this.mAppConfig.B1) {
return;
}
audioManager.abandonAudioFocus(this.aListener);
}
@Override
public void onSetDrawerLayout(String str) {
com.bslyun.app.utils.i0.a().post(new u(str));
}
@Override
public void onSetStateBarColor(String str, String str2, boolean z2) {
try {
int parseColor = Color.parseColor(str);
this.handler.postDelayed(new o(z2, parseColor, Color.red(parseColor), Color.green(parseColor), Color.blue(parseColor), str2, str), 0L);
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public void onStepNum(String str) {
if (SportStepCommponent.getStepInstance().isOpenStport()) {
try {
int currentTimeSportStep = SportStepCommponent.getStepInstance().getCurrentTimeSportStep();
if (currentTimeSportStep > -1) {
JavaScriptUtils.postJsInWebView(this.context, getBrowser(), JavaScriptUtils.geneciCallbackFunction(str, currentTimeSportStep + BuildConfig.FLAVOR));
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
@Override
public void onStop() {
super.onStop();
String str = "onStop :" + getUrl();
}
@Override
public void onTabBarColor(String str, String str2, boolean z2) {
try {
int parseColor = Color.parseColor(str);
if (this.mMainActivity.mTabHost.getChildCount() < 1) {
return;
}
this.handler.postDelayed(new p(str2, str, z2, parseColor), 0L);
if (m0.T(m0.O(this.mAppConfig.p))) {
onJsTabbarAlpha(m0.O(this.mAppConfig.p), str2, z2);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public void onTabReselect(LayoutItem layoutItem, int i2, boolean z2) {
String url;
String w2;
if (isLocalWebview()) {
if (this.localBrowser == null) {
return;
}
} else if (this.x5Browser == null) {
return;
}
if (i2 != this.index) {
return;
}
if (isLocalWebview()) {
url = this.localBrowser.getUrl();
} else {
url = this.x5Browser.getUrl();
}
if (z2) {
loadUrl(layoutItem.getUrl());
return;
}
setConfig(url);
setTitleText(url);
String a2 = layoutItem.a();
a2.hashCode();
if (a2.equals("1")) {
reload();
return;
}
if (a2.equals("2")) {
if (!TextUtils.isEmpty(layoutItem.getUrl())) {
w2 = layoutItem.getUrl();
} else {
w2 = !TextUtils.isEmpty(layoutItem.w()) ? layoutItem.w() : url;
}
if (TextUtils.isEmpty(url) || w2.equals(url)) {
return;
}
this.isPullRefreshAction = true;
if (isLocalWebview()) {
this.localBrowser.loadUrl(w2);
} else {
this.x5Browser.loadUrl(w2);
}
}
}
@Override
public void onTouchMoveWithCancel(float f2, boolean z2) {
if (z2) {
return;
}
if (f2 < -150.0f) {
MainActivity mainActivity = this.mMainActivity;
if (!mainActivity.touchHide) {
mainActivity.touchHide = true;
com.bslyun.app.d.a aVar = this.mAppConfig;
if (aVar.r && aVar.l0) {
if (mainActivity.jsNavCallGone) {
return;
}
com.bslyun.app.utils.b.a(this.mMainActivity.mNavigateLayout, this.mRootView, m0.l(getContext(), 45.0f));
}
com.bslyun.app.d.a aVar2 = this.mAppConfig;
if (aVar2.l && aVar2.m0) {
MainActivity mainActivity2 = this.mMainActivity;
if (mainActivity2.jsTabCallGone) {
return;
}
com.bslyun.app.utils.b.a(mainActivity2.mTabHost, this.mRootView, mainActivity2.tabHostHeight);
}
this.mRootView.requestLayout();
}
}
if (f2 > 150.0f) {
MainActivity mainActivity3 = this.mMainActivity;
if (mainActivity3.touchHide) {
mainActivity3.touchHide = false;
com.bslyun.app.d.a aVar3 = this.mAppConfig;
if (aVar3.r && aVar3.l0) {
if (mainActivity3.jsNavCallGone) {
return;
}
com.bslyun.app.utils.b.b(this.mMainActivity.mNavigateLayout, m0.l(getContext(), 45.0f));
}
com.bslyun.app.d.a aVar4 = this.mAppConfig;
if (aVar4.l && aVar4.m0) {
MainActivity mainActivity4 = this.mMainActivity;
if (mainActivity4.jsTabCallGone) {
return;
}
com.bslyun.app.utils.b.b(mainActivity4.mTabHost, mainActivity4.tabHostHeight);
}
}
}
}
@Override
public void onUploadClick(int i2) {
boolean isMultipleUpload;
boolean isMultipleUpload2;
if (i2 == 0) {
if (isLocalWebview()) {
isMultipleUpload2 = this.localBrowser.getLocalBrowserChromeClient().isMultipleUpload();
} else {
isMultipleUpload2 = this.x5Browser.getX5BrowserChromeClient().isMultipleUpload();
}
if (isMultipleUpload2) {
PictureSelector.create(this).openGallery(SelectMimeType.ofImage()).setImageEngine(com.bslyun.app.utils.k.a()).setMaxSelectNum(9).isDisplayCamera(false).forResult(10134);
return;
} else {
PictureSelector.create(this).openGallery(SelectMimeType.ofImage()).setImageEngine(com.bslyun.app.utils.k.a()).setMaxSelectNum(1).isDisplayCamera(false).forResult(10134);
return;
}
}
if (i2 == 1) {
if (isLocalWebview()) {
isMultipleUpload = this.localBrowser.getLocalBrowserChromeClient().isMultipleUpload();
} else {
isMultipleUpload = this.x5Browser.getX5BrowserChromeClient().isMultipleUpload();
}
if (isMultipleUpload) {
PictureSelector.create(this).openGallery(SelectMimeType.ofVideo()).setImageEngine(com.bslyun.app.utils.k.a()).setMaxSelectNum(9).isDisplayCamera(false).forResult(10140);
return;
} else {
PictureSelector.create(this).openGallery(SelectMimeType.ofVideo()).setImageEngine(com.bslyun.app.utils.k.a()).setMaxSelectNum(1).isDisplayCamera(false).forResult(10140);
return;
}
}
if (i2 == 2) {
getImgFromCamera();
return;
}
if (this.mAppConfig.c3 && Build.VERSION.SDK_INT >= 30) {
if (Environment.isExternalStorageManager()) {
this.mMainActivity.startActivityForResult(new Intent(this.mMainActivity, (Class<?>) FileSelectActivity.class), 10137);
return;
}
Intent intent = new Intent("android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION");
intent.setData(Uri.parse("package:" + this.mMainActivity.getPackageName()));
this.mMainActivity.startActivityForResult(intent, 10138);
return;
}
this.mMainActivity.startActivityForResult(new Intent(this.mMainActivity, (Class<?>) FileSelectActivity.class), 10137);
}
@Override
public void onWebShareInfo(String str, String str2, String str3) {
com.bslyun.app.utils.i0.a().post(new e(str, str2, str3));
}
public void postJS(String str) {
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.postJs(str);
return;
}
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.postJs(str);
}
}
public void reload() {
if (isLocalWebview()) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.reload();
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.reload();
}
}
public void setBrowserLayerType(int i2) {
if (m0.Z(getContext())) {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.setLayerType(i2, null);
return;
}
return;
}
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.setLayerType(i2, null);
}
}
public void setConfig(String str) {
if (this.mAppConfig.p1 != null && !TextUtils.isEmpty(str)) {
Iterator<PartItem> it = this.mAppConfig.p1.f4622a.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
PartItem next = it.next();
if (!TextUtils.isEmpty(next.m())) {
if (m0.W(next.m().trim(), str)) {
if (this.mAppConfig.r) {
if (this.mMainActivity.navLine.getVisibility() == 0 && !TextUtils.isEmpty(next.f())) {
this.mMainActivity.navLine.setBackgroundColor(Color.parseColor(next.f()));
}
if (!TextUtils.isEmpty(next.g()) && next.g().startsWith("#")) {
onSetStateBarColor(next.g(), "0", false);
}
if (!TextUtils.isEmpty(next.k())) {
controlNavigatorLayout(next.k(), "0");
}
if (!TextUtils.isEmpty(next.C()) || !TextUtils.isEmpty(next.D())) {
onJsTitleName(next.C(), next.D());
}
if (!TextUtils.isEmpty(next.C())) {
this.titleText = next.C();
}
if (!TextUtils.isEmpty(next.b())) {
if (!next.b().equals("-2")) {
controlNavLeftMenu(next.b(), next.c(), "0");
} else {
if (!TextUtils.isEmpty(this.mAppConfig.N) && !this.mAppConfig.N.equals("-1")) {
this.mMainActivity.mLeftMenu.setVisibility(0);
com.bumptech.glide.c.v(getActivity()).s(Integer.valueOf(com.bslyun.app.utils.b0.b(getContext(), this.mAppConfig.L))).D0(this.mMainActivity.mLeftMenu);
} else {
this.mMainActivity.mLeftMenu.setVisibility(8);
}
String str2 = this.mAppConfig.N;
this.leftBtnFunction = str2;
this.mMainActivity.dynamicLeftNavigation = str2;
}
}
if (!TextUtils.isEmpty(next.w())) {
if (!next.w().equals("-2")) {
controlNavRightMenu(next.w(), next.x(), "0");
} else {
if (!TextUtils.isEmpty(this.mAppConfig.y) && !this.mAppConfig.y.equals("-1")) {
this.mMainActivity.share.setVisibility(0);
com.bumptech.glide.c.v(getActivity()).s(Integer.valueOf(com.bslyun.app.utils.b0.b(getActivity(), this.mAppConfig.M))).D0(this.mMainActivity.share);
} else {
this.mMainActivity.share.setVisibility(8);
}
String str3 = this.mAppConfig.y;
this.rightBtnFunction = str3;
this.mMainActivity.dynamicRightNavigation = str3;
}
}
}
if (this.mAppConfig.l) {
if (!TextUtils.isEmpty(next.A()) && next.A().startsWith("#")) {
onTabBarColor(next.A(), "0", false);
}
if (!TextUtils.isEmpty(next.B())) {
controlBottomTabLayout(true, next.B(), "0");
}
}
if (!TextUtils.isEmpty(next.z()) && next.z().startsWith("#")) {
this.mMainActivity.barHeight.setBackgroundColor(Color.parseColor(next.z()));
}
onJsRefreshEnable(next.a(), "0");
if (!m0.G(this.context).equals(next.y()) && !TextUtils.isEmpty(next.y())) {
onCreenOrientation(next.y());
}
this.isPart = true;
} else {
this.isPart = false;
}
}
}
}
control();
if (this.mAppConfig.l3) {
onHideState("0");
}
}
public void setPermissionRequest() {
LocalBrowser localBrowser = this.localBrowser;
if (localBrowser != null) {
localBrowser.localBrowserChromeClient.setPermissionRequest();
}
}
public void startLoadUrl() {
if (this.mAppConfig.W1 && ((String) com.bslyun.app.utils.c0.a(this.mMainActivity, "isAllow", "0")).equals("0")) {
return;
}
if (!TextUtils.isEmpty(this.mAppConfig.e0.a().e().get(this.index).getUrl()) && !this.mAppConfig.e0.a().e().get(this.index).getUrl().equals(this.url) && TextUtils.isEmpty(this.mAppConfig.e0.a().e().get(this.index).w()) && !this.newFragment) {
if (m0.Z(this.mMainActivity)) {
this.localBrowser.loadUrl(this.mAppConfig.e0.a().e().get(this.index).getUrl());
return;
} else {
this.x5Browser.loadUrl(this.mAppConfig.e0.a().e().get(this.index).getUrl());
return;
}
}
if (m0.Z(this.mMainActivity)) {
this.localBrowser.loadUrl(this.url);
} else {
this.x5Browser.loadUrl(this.url);
}
}
public void x5BrowserPost(String str) {
X5Browser x5Browser = this.x5Browser;
if (x5Browser != null) {
x5Browser.post(new g(str));
}
}
}