TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

以下内容为反编译后的 WebViewFragment.java 源代码,内容仅作参考


package com.tencent.mobileqq.webview.swift;

import NS_MOBILE_FEEDS.e_attribute;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.os.SystemClock;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.biz.AuthorizeConfig;
import com.tencent.biz.ProtoServlet;
import com.tencent.biz.common.util.FileChooserHelper;
import com.tencent.biz.common.util.HttpUtil;
import com.tencent.biz.common.util.Util;
import com.tencent.biz.pubaccount.CustomWebView;
import com.tencent.biz.pubaccount.util.PublicAccountUtil;
import com.tencent.biz.qqstory.takevideo.EditPicActivity;
import com.tencent.biz.ui.CustomScrollView;
import com.tencent.biz.ui.RefreshView;
import com.tencent.biz.ui.TouchWebView;
import com.tencent.biz.webviewplugin.Share;
import com.tencent.biz.widgets.XChooserActivity;
import com.tencent.common.app.AppInterface;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.common.config.AppSetting;
import com.tencent.mobileqq.activity.Conversation;
import com.tencent.mobileqq.activity.JumpActivity;
import com.tencent.mobileqq.activity.MainFragment;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.SingleTaskQQBrowser;
import com.tencent.mobileqq.activity.SplashActivity;
import com.tencent.mobileqq.activity.aio.AIOOpenWebMonitor;
import com.tencent.mobileqq.activity.aio.AIOUtils;
import com.tencent.mobileqq.activity.aio.rebuild.PublicAccountChatPie;
import com.tencent.mobileqq.activity.richmedia.FlowCameraConstant;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.BrowserAppInterface;
import com.tencent.mobileqq.app.ThreadExcutor;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.TroopHandler;
import com.tencent.mobileqq.app.soso.SosoInterface;
import com.tencent.mobileqq.config.ResourcePluginListener;
import com.tencent.mobileqq.emosm.Client;
import com.tencent.mobileqq.emosm.DataFactory;
import com.tencent.mobileqq.emosm.web.IPCConstants;
import com.tencent.mobileqq.emosm.web.WebIPCOperator;
import com.tencent.mobileqq.filemanager.data.FMConstants;
import com.tencent.mobileqq.log.VipWebViewReportLog;
import com.tencent.mobileqq.pb.ByteStringMicro;
import com.tencent.mobileqq.pluginsdk.ActivityLifecycle;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.StatisticCollector;
import com.tencent.mobileqq.statistics.ViewExposeUtil;
import com.tencent.mobileqq.teamwork.TeamWorkUtils;
import com.tencent.mobileqq.theme.ThemeUtil;
import com.tencent.mobileqq.unifiedebug.UnifiedTraceRouter;
import com.tencent.mobileqq.util.JSONUtils;
import com.tencent.mobileqq.util.Utils;
import com.tencent.mobileqq.utils.JumpAction;
import com.tencent.mobileqq.vaswebviewplugin.BuscardJsPlugin;
import com.tencent.mobileqq.vaswebviewplugin.VasWebviewConstants;
import com.tencent.mobileqq.vipgift.VipGiftManager;
import com.tencent.mobileqq.webprocess.WebAccelerateHelper;
import com.tencent.mobileqq.webview.WebViewTitleStyle;
import com.tencent.mobileqq.webview.sonic.SonicClientImpl;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserComponentsProvider;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserCookieMonster;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserNavigator;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserScreenShotHandler;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserSetting;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserShareMenuHandler;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserStatistics;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserTBSHandler;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserUIStyleHandler;
import com.tencent.mobileqq.webview.swift.scheduler.SwiftBrowserStateMachineScheduler;
import com.tencent.mobileqq.webview.swift.utils.SwiftBrowserIdleTaskHelper;
import com.tencent.mobileqq.webview.swift.utils.SwiftWebAccelerator;
import com.tencent.mobileqq.webview.swift.utils.SwiftWebViewUtils;
import com.tencent.mobileqq.webview.utils.UrlMatcher;
import com.tencent.mobileqq.webview.webso.WebSoUtils;
import com.tencent.mobileqq.webviewplugin.WebUiUtils;
import com.tencent.open.agent.report.ReportCenter;
import com.tencent.open.downloadnew.MyAppApi;
import com.tencent.qphone.base.BaseConstants;
import com.tencent.qphone.base.util.QLog;
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback;
import com.tencent.smtt.export.external.interfaces.IX5WebChromeClient;
import com.tencent.smtt.export.external.interfaces.JsResult;
import com.tencent.smtt.sdk.QbSdk;
import com.tencent.smtt.sdk.ValueCallback;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.stat.MttLoader;
import com.tencent.sonic.sdk.SonicSession;
import com.tencent.sonic.sdk.SonicSessionConfig;
import com.tencent.tim.R;
import com.tencent.widget.immersive.ImmersiveUtils;
import com.tencent.widget.immersive.SystemBarCompact;
import cooperation.buscard.BuscardHelper;
import cooperation.peak.PeakConstants;
import cooperation.pluginbridge.BridgeHelper;
import cooperation.qqfav.QfavBuilder;
import cooperation.qqfav.QfavReport;
import cooperation.qzone.report.QzoneOnlineTimeCollectRptService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import mqq.app.MobileQQ;
import mqq.app.NewIntent;
import mqq.observer.BusinessObserver;
import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;
import org.json.JSONObject;
import tencent.im.opengroup.AppUrlOpenGroup;
public class WebViewFragment extends Fragment implements View.OnClickListener, View.OnTouchListener, CustomScrollView.OnGestureListener, WebViewCallback, WebViewPluginContainer, SwiftBrowserComponentsProvider.SwiftBrowserComponentProviderContext, SwiftBrowserComponentsProvider.SwiftBrowserComponentProviderSupporter, WebUiUtils.OfflinePluginInterface, WebUiUtils.QQBrowserBaseActivityInterface, WebUiUtils.ShareApiInterface, WebUiUtils.WebFeaturesInterface, WebUiUtils.WebShareInterface, WebUiUtils.WebShareReportInterface, WebUiUtils.WebTitleBarInterface, WebUiUtils.WebUiMethodInterface {
    protected static final int A = 256;
    protected static final int B = 512;
    public static final String i = "WebLog_WebViewFragment";
    public static final String j = "keyAction";
    public static final String k = "actionSelectPicture";
    public static int m = 0;
    public static final int s = 1;
    protected static final int t = 2;
    protected static final int u = 4;
    protected static final int v = 8;
    protected static final int w = 16;
    protected static final int x = 32;
    protected static final int y = 64;
    protected static final String f34635y = "http://h5.qzone.qq.com/wanba/index?_bid=2044&_wv=2097155";
    protected static final int z = 128;
    public Intent f95022a;
    View f34637a;
    ViewGroup f34638a;
    FrameLayout f34639a;
    public AuthorizeConfig f34640a;
    protected FileChooserHelper f34641a;
    public TouchWebView f34642a;
    public Share f34643a;
    public volatile AppInterface f34644a;
    public BrowserAppInterface f34645a;
    public Client.onRemoteRespObserver f34646a;
    protected SonicClientImpl f34647a;
    public SwiftIphoneTitleBarUI f34648a;
    public WebBrowserViewContainer f34649a;
    public volatile WebViewPluginEngine f34650a;
    WebViewWrapper f34651a;
    public SwiftBrowserSetting f34653a;
    public SwiftBrowserStatistics f34654a;
    public SwiftBrowserUIStyleHandler.SwiftBrowserUIStyle f34655a;
    public SwiftBrowserUIStyleHandler f34656a;
    IX5WebChromeClient.CustomViewCallback f34658a;
    public SystemBarCompact f34659a;
    protected long f95023b;
    View f34662b;
    public RelativeLayout e;
    public boolean f34663i;
    public boolean f34664j;
    protected volatile boolean f34665k;
    public String f34668m;
    public boolean f34669m;
    public int n;
    public boolean f34671n;
    public int o;
    public String f34672o;
    protected boolean f34673o;
    public int p;
    int q;
    int r;
    boolean f34681s;
    protected boolean f34683t;
    public String f34684u;
    public String f34685v;
    public String f34686w;
    public String f34687x;
    public String f34666l = "";
    protected final Object f34660a = new Object();
    int l = 0;
    String f34670n = "";
    boolean f34667l = false;
    public String f34674p = "";
    public boolean f34675p = true;
    public boolean f34677q = true;
    boolean f34679r = false;
    public String f34676q = "";
    public String f34678r = "";
    public String f34680s = "";
    public String f34682t = "";
    public int C = 1;
    public final SwiftBrowserComponentsProvider f34652a = mo1049a();
    protected final SwiftBrowserStateMachineScheduler f34657a = new SwiftBrowserStateMachineScheduler(new vuw(this));
    View.OnTouchListener f34636a = new vuy(this);
    ResultReceiver f34661b = new ResultReceiver(null) {
        @Override
        protected void onReceiveResult(int i2, Bundle bundle) {
            JSONObject a2;
            if (QLog.isColorLevel()) {
                QLog.d(WebViewFragment.i, 2, "onReceiveResult resultCode = " + i2);
            }
            if (i2 == 1) {
                JSONObject a3 = JSONUtils.a(WebViewFragment.this.getShare().m1827a());
                if (a3 != null) {
                    WebViewFragment.this.getWebView().c("openCooperationMobile(" + a3.toString() + UnifiedTraceRouter.f);
                }
            } else if (i2 == 2 && (a2 = JSONUtils.a(WebViewFragment.this.getShare().m1827a())) != null) {
                WebViewFragment.this.getWebView().c("openAdvPermissionsMobile(" + a2.toString() + UnifiedTraceRouter.f);
            }
        }
    };

    @Override
    public SwiftBrowserComponentsProvider mo9621b() {
        return this.f34652a;
    }

    public SwiftBrowserComponentsProvider mo1049a() {
        return new SwiftBrowserComponentsProvider(this, 127, null);
    }

    public static WebViewFragment a(Intent intent) {
        Bundle bundle = new Bundle();
        bundle.putParcelable("intent", intent);
        WebViewFragment webViewFragment = new WebViewFragment();
        webViewFragment.setArguments(bundle);
        return webViewFragment;
    }

    @Override
    public WebView a() {
        return this.f34642a;
    }

    @Override
    public void onAttach(Activity activity) {
        this.f95022a = (Intent) super.getArguments().getParcelable("intent");
        Bundle extras = this.f95022a == null ? null : this.f95022a.getExtras();
        if (extras != null) {
            if (extras.getClassLoader() == null) {
                if (QLog.isColorLevel()) {
                    QLog.d(i, 2, "No classloader for this fragment");
                }
                this.f95022a.setExtrasClassLoader(WebViewTitleStyle.class.getClassLoader());
            } else {
                QLog.d(i, 2, "already has classloader for this fragment: " + extras.getClassLoader());
            }
        }
        super.onAttach(activity);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Util.m945a(SwiftBrowserStatistics.f34858E);
        this.f34656a = (SwiftBrowserUIStyleHandler) this.f34652a.a(2);
        this.f34656a.c();
        this.f34655a = this.f34656a.f34966a;
        this.f34648a = this.f34656a.f34963a;
        this.f34653a = (SwiftBrowserSetting) this.f34652a.a(-1);
        this.f34654a = (SwiftBrowserStatistics) this.f34652a.a(-2);
        this.f34656a.a(this);
        Util.m947b(SwiftBrowserStatistics.f34858E);
    }

    @Override
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        boolean z2 = false;
        if (WebAccelerateHelper.preloadBrowserView instanceof WebBrowserViewContainer) {
            this.f34649a = (WebBrowserViewContainer) WebAccelerateHelper.preloadBrowserView;
            WebAccelerateHelper.preloadBrowserView = null;
            this.f34654a.f34913p = true;
            z2 = true;
        } else {
            this.f34649a = new WebBrowserViewContainer(super.getActivity());
        }
        Util.c(SwiftBrowserStatistics.f95075b, "Web_qqbrowser_ web webviewFragment onCreateView  isUsePreloadBrowserView: " + z2);
        this.f34649a.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
        a((View) this.f34649a);
        return this.f34649a;
    }

    @Override
    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        mo950a(bundle);
    }

    public boolean mo950a(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.f34857D);
        QQBrowserActivity.H++;
        AIOOpenWebMonitor.a(this.f95022a);
        SwiftBrowserNavigator swiftBrowserNavigator = (SwiftBrowserNavigator) this.f34652a.a(1);
        if (swiftBrowserNavigator != null && !swiftBrowserNavigator.a(this.f95022a)) {
            super.getActivity().finish();
        } else {
            v();
            this.f34654a.a(this.f95022a);
            u();
            if (!m9619a(d())) {
                ThreadManager.a(new vuz(this), 5, null, true);
            }
            if (this.f95022a.getBooleanExtra(SingleTaskQQBrowser.f85377a, false)) {
                this.f34648a.a(new vva(this));
            }
            this.f34677q = false;
            this.f34675p = false;
            StatisticCollector.a(BaseApplicationImpl.a(), 10000L);
            this.f34654a.f34920v = System.currentTimeMillis();
            this.f34663i = ThemeUtil.THEME_ID_NIGHTMODE.equals(ThemeUtil.getCurrentThemeInfo().getString("themeId"));
            this.f34640a = AuthorizeConfig.a();
            WebAccelerateHelper.isWebViewCache = true;
            SwiftBrowserStatistics swiftBrowserStatistics = this.f34654a;
            this.f34664j = false;
            swiftBrowserStatistics.f34897g = false;
            this.f34654a.f34921w = System.currentTimeMillis();
            Util.m945a(SwiftBrowserStatistics.S);
            this.C = 2;
            this.f34657a.a(bundle);
            Bundle bundle2 = new Bundle();
            bundle2.putString("url", this.f34672o);
            this.f34652a.a(5, bundle2);
            this.f34654a.f34914q = System.currentTimeMillis() - this.f34654a.f34888c;
            Util.m947b(SwiftBrowserStatistics.f34857D);
            this.f34654a.f34865A = System.currentTimeMillis();
        }
        return true;
    }

    boolean m9619a(String str) {
        if (str == null) {
            return false;
        }
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "initSonicSession url = :" + str);
        }
        SonicSessionConfig sonicSessionConfig = new SonicSessionConfig();
        sonicSessionConfig.sessionMode = 1;
        SonicSession createSession = WebAccelerateHelper.getSonicEngine().createSession(str, sonicSessionConfig);
        if (createSession != null) {
            this.f34647a = new SonicClientImpl();
            createSession.bindClient(this.f34647a);
            return true;
        }
        QLog.d(i, 1, "initSonicSession sonicSession = null, url = " + str);
        return false;
    }

    public SonicClientImpl m9614a() {
        return this.f34647a;
    }

    public Intent m9612a() {
        return this.f95022a;
    }

    final void t() {
        synchronized (SwiftWebAccelerator.f35028a) {
            if (WebViewPluginEngine.f95030a != null) {
                this.f34650a = WebViewPluginEngine.f95030a;
                WebViewPluginEngine.f95030a = null;
            }
        }
        if (this.f34650a != null) {
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "-->web engine and plugin initialized at process preload!");
            }
            WebAccelerateHelper.getInstance().onPluginRuntimeReady(this.f34650a, this.f34644a, super.getActivity());
            this.f34650a.m9638a();
            WebAccelerateHelper.getInstance().bindFragment(this.f34650a, this);
            return;
        }
        this.f34650a = WebAccelerateHelper.getInstance().createWebViewPluginEngine(this.f34644a, super.getActivity(), null, null);
        WebAccelerateHelper.getInstance().onPluginRuntimeReady(this.f34650a, this.f34644a, super.getActivity());
        WebAccelerateHelper.getInstance().bindFragment(this.f34650a, this);
    }

    void u() {
        if (!this.f34665k) {
            this.f34665k = true;
            String stringExtra = this.f95022a.getStringExtra("url");
            if (WebSoUtils.m9718b(stringExtra)) {
                ThreadManager.a((Runnable) new vvb(this, stringExtra), (ThreadExcutor.IThreadListener) null, false);
            }
        }
    }

    void v() {
        this.f34672o = d();
        this.f34656a.m9674a(this.f34672o);
        if (this.f34655a.f34990a != 4) {
            if ((this.f34655a.f34990a & 2) != 0) {
                this.f95022a.putExtra("hide_more_button", true);
            }
            if ((this.f34655a.f34990a & 1) != 0) {
                this.f95022a.putExtra("webStyle", "noBottomBar");
            }
            if ((this.f34655a.f34990a & 1048576) > 0) {
                this.f95022a.putExtra(QQBrowserActivity.M, true);
            }
        }
    }

    public String d() {
        String stringExtra = this.f95022a.getStringExtra("url");
        if (stringExtra == null) {
            String stringExtra2 = this.f95022a.getStringExtra("key_params_qq");
            if (stringExtra2 == null) {
                return "";
            }
            return stringExtra2;
        }
        return stringExtra;
    }

    @Override
    public void onResume() {
        Util.m945a(SwiftBrowserStatistics.f34859F);
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "onResume");
        }
        if (this.f34642a != null) {
            this.f34642a.onResume();
        }
        Intent intent = new Intent("tencent.notify.foreground");
        intent.putExtra("selfuin", this.f34668m);
        intent.putExtra("AccountInfoSync", AppConstants.dn);
        intent.putExtra("classname", getClass().getName());
        BaseApplicationImpl.a().sendBroadcast(intent, "com.tencent.tim.msg.permission.pushnotify");
        String a2 = BridgeHelper.a(super.getActivity(), this.f34668m).a("buscard_registerNFC");
        if (TextUtils.isEmpty(a2) || "true".equals(a2)) {
            ActivityLifecycle.onResume(super.getActivity());
        }
        Bundle bundle = new Bundle();
        bundle.putInt(SwiftBrowserComponentsProvider.f34738b, this.C);
        this.f34652a.a(2, bundle);
        a(2L, (Map) null);
        if (MyAppApi.d()) {
            MyAppApi.a().a(super.getActivity());
        }
        if (this.f34671n) {
            QzoneOnlineTimeCollectRptService.a().b(1);
        }
        if (this.f34656a.f34966a.f34996a) {
            A();
        }
        Util.m947b(SwiftBrowserStatistics.f34859F);
        super.onResume();
    }

    @Override
    public void onStop() {
        if ((this.f34655a.f34990a & 33554432) != 0) {
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "close on hide by wv param");
            }
            super.getActivity().finish();
        }
        super.onStop();
    }

    @Override
    public void onPause() {
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "onPause");
        }
        if (this.f34681s) {
            s();
        }
        String a2 = BridgeHelper.a(super.getActivity(), this.f34668m).a("buscard_registerNFC");
        if (TextUtils.isEmpty(a2) || "true".equals(a2)) {
            ActivityLifecycle.onPause(super.getActivity());
        }
        this.f34652a.a(1, null);
        a(WebviewPluginEventConfig.q, (Map) null);
        if (this.f34671n) {
            QzoneOnlineTimeCollectRptService.a().m11018a();
        }
        super.onPause();
    }

    @Override
    public void onHiddenChanged(boolean z2) {
        super.onHiddenChanged(z2);
        if (z2) {
            a(512L, (Map) null);
        } else {
            a(256L, (Map) null);
        }
    }

    @Override
    public void onDestroy() {
        if (QLog.isColorLevel()) {
            QLog.i(SwiftBrowserStatistics.f95075b, 2, "Web_qqbrowser_ web webviewFragment onDestroy ");
        }
        if (1 != this.C) {
            this.f34657a.c();
            this.C = 1;
        }
        if (this.f34647a != null) {
            this.f34647a.m9596a();
            this.f34647a = null;
        }
        Long valueOf = Long.valueOf(this.f95022a.getLongExtra(VipGiftManager.f34449c, 0L));
        if (valueOf.longValue() > 0) {
            Bundle bundle = new Bundle();
            bundle.putLong(VipGiftManager.f34449c, valueOf.longValue());
            WebIPCOperator.a().m5965a(DataFactory.a(IPCConstants.at, null, -1, bundle));
        }
        if (this.f34646a != null) {
            WebIPCOperator.a().b(this.f34646a);
        }
        WebViewPluginEngine a2 = this.f34642a != null ? this.f34642a.a() : null;
        if (a2 != null) {
            a2.a(this.f34642a.getUrl(), WebviewPluginEventConfig.p, (Map) null);
        }
        Bundle bundle2 = new Bundle();
        bundle2.putString("url", this.f34672o);
        this.f34652a.a(3, bundle2);
        w();
        if (QQBrowserActivity.H == 0) {
            WebIPCOperator.a().m5963a().doUnbindService(BaseApplicationImpl.a());
            SwiftBrowserStatistics.CrashStepStatsEntry.d = -1;
        }
        if (this.f34643a != null) {
            this.f34643a.m1835b();
        }
        ViewExposeUtil.ViewExposeUnit a3 = ViewExposeUtil.a((Class) getClass(), hashCode());
        if (a3 != null) {
            ReportController.b(null, "CliOper", "", "", a3.f29400a, a3.f29400a, a3.f92903a, 0, Long.toString(SystemClock.elapsedRealtime() - a3.f92904b), "", "", "");
        }
        SwiftBrowserIdleTaskHelper.m9682a().a(2);
        this.f34648a.f();
        AIOOpenWebMonitor.d(super.getActivity().getIntent());
        super.onDestroy();
    }

    void w() {
        if (QLog.isColorLevel()) {
            QLog.d(SwiftBrowserStatistics.f95075b, 2, "Web_qqbrowser_ web webviewFragment destroyWebView ");
        }
        QQBrowserActivity.H--;
        SwiftBrowserStatistics swiftBrowserStatistics = this.f34654a;
        this.f34664j = true;
        swiftBrowserStatistics.f34897g = true;
        if (this.f34651a != null) {
            this.f34651a.m9642a();
            this.f34651a = null;
            this.f34642a = null;
        }
        this.f34644a = null;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
    }

    @Override
    public void onDetach() {
        super.onDetach();
    }

    public int e(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.K);
        QbSdk.setQQBuildNumber(AppSetting.f7065a);
        String stringExtra = this.f95022a.getStringExtra("options");
        if (stringExtra != null) {
            try {
                JSONObject jSONObject = new JSONObject(stringExtra);
                this.f95022a.putExtra("url", jSONObject.getString("url"));
                if (!this.f95022a.hasExtra("key_isReadModeEnabled")) {
                    this.f95022a.putExtra("key_isReadModeEnabled", true);
                }
                this.f95022a.putExtra(QQBrowserActivity.J, jSONObject.optBoolean(QQBrowserActivity.J, true));
                this.f95022a.putExtra(QQBrowserActivity.W, jSONObject.optBoolean(QQBrowserActivity.W, true));
                this.f95022a.putExtra(QQBrowserActivity.L, jSONObject.optBoolean(QQBrowserActivity.L, false));
            } catch (JSONException e) {
                if (QLog.isColorLevel()) {
                    QLog.d(i, 2, e.toString());
                }
            }
        }
        if (QQBrowserActivity.f10656C.equals(Build.MANUFACTURER + "_" + Build.MODEL) && Build.VERSION.SDK_INT == 16) {
            this.f34673o = true;
        }
        this.l = this.f95022a.getIntExtra(QQBrowserActivity.T, 100);
        this.f34670n = this.f95022a.getStringExtra(QQBrowserActivity.U);
        this.f34671n = this.f95022a.getBooleanExtra("fromQZone", false);
        this.f34655a.C = this.f95022a.getBooleanExtra(SwiftBrowserUIStyleHandler.i, true);
        this.f34655a.D = this.f95022a.getBooleanExtra(SwiftBrowserUIStyleHandler.j, true);
        this.f34655a.E = this.f95022a.getBooleanExtra(SwiftBrowserUIStyleHandler.k, false);
        ViewExposeUtil.a(getClass(), hashCode(), this.f95022a.getBooleanExtra(QQBrowserActivity.ad, false) ? 1 : 0, this.f34672o);
        this.f34653a.a(SwiftBrowserSetting.f95069a, !this.f95022a.getBooleanExtra(VasWebviewConstants.KEY_VAS_USE_PREWEBVIEW, false));
        this.f34654a.f34879a.f95078b = this.f95022a.getIntExtra(VasWebviewConstants.INDIVIDUATION_URL_SOURCE_TYPE, -1);
        if (m == 1) {
            SwiftBrowserStatistics.CrashStepStatsEntry.d = this.f34654a.f34879a.f95078b;
        }
        if (this.f34654a.f34879a.f95078b == -1 && SwiftBrowserStatistics.CrashStepStatsEntry.d != -1) {
            this.f34654a.f34879a.f95078b = SwiftBrowserStatistics.CrashStepStatsEntry.d;
        }
        this.f34654a.Y = this.f34672o;
        this.f34674p = this.f95022a.getStringExtra("title");
        this.f34656a.f34989l = this.f34674p;
        if ((this.f34655a.f34990a & 67108864) == 0) {
            this.f34653a.a(SwiftBrowserSetting.f95070b, true);
        }
        Util.m947b(SwiftBrowserStatistics.K);
        this.C = 4;
        return 0;
    }

    public int d(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.L);
        if (!this.f34656a.f34979c) {
            mo9618a();
        } else if (Build.VERSION.SDK_INT >= 23 && ImmersiveUtils.isSupporImmersive() == 1) {
            super.getActivity().getWindow().addFlags(67108864);
            int color = getResources().getColor(R.color.f39367skin_color_title_immersive_bar);
            if (ImmersiveUtils.a(super.getActivity().getWindow(), true)) {
                color = getResources().getColor(R.color.f38784name_res_0x7f0b017f);
            }
            this.f34659a = new SystemBarCompact((Activity) super.getActivity(), true, color);
            this.f34659a.init();
        }
        this.C = 128;
        Util.m947b(SwiftBrowserStatistics.L);
        return 1;
    }

    public int f(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.N);
        this.f34654a.f34922x = System.currentTimeMillis();
        this.C = 8;
        if (SwiftWebAccelerator.TbsAccelerator.m9692a()) {
            Util.m947b(SwiftBrowserStatistics.N);
        } else {
            SwiftWebAccelerator.TbsAccelerator.a();
            if (SwiftWebAccelerator.TbsAccelerator.m9692a()) {
                Util.m947b(SwiftBrowserStatistics.N);
            } else {
                Util.m947b(SwiftBrowserStatistics.N);
            }
        }
        return 0;
    }

    public int g(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.O);
        this.f34644a = (AppInterface) MobileQQ.sMobileQQ.waitAppRuntime(null);
        if (this.f34644a != null) {
            if (this.f34644a instanceof BrowserAppInterface) {
                this.f34645a = (BrowserAppInterface) this.f34644a;
            }
            if (!WebAccelerateHelper.isWebViewCache && !VipWebViewReportLog.m6824a()) {
                VipWebViewReportLog.a(this.f34644a.getApplication(), this.f34644a);
            }
            this.f34668m = this.f34644a.getAccount();
            if (this.f34644a.getLongAccountUin() != 0) {
                this.f34654a.f34891d = this.f34644a.getLongAccountUin() % ((long) SwiftBrowserStatistics.d) == 6;
            }
        }
        t();
        if (this.f34650a != null) {
            this.f34650a.a(m9612a().getStringArrayExtra(WebViewPluginFactory.f34699a));
            this.f34650a.a(this.f34672o, 1L, (Map) null);
        }
        this.C = 16;
        Util.m947b(SwiftBrowserStatistics.O);
        return 1;
    }

    public int h(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.P);
        mo9623c();
        Util.m947b(SwiftBrowserStatistics.P);
        this.C = 32;
        this.f34654a.f34923y = System.currentTimeMillis();
        this.f34654a.f34918t = this.f34654a.f34923y - this.f34654a.f34922x;
        return 0;
    }

    public void mo9623c() {
        Bundle a2;
        int i2 = -1;
        if (this.f34642a == null) {
            this.f34642a = a((ViewGroup) null).m9640a();
            if (this.f34642a == null || this.f34642a.getView() == null) {
                if (super.getActivity() != null && !super.getActivity().isFinishing()) {
                    super.getActivity().finish();
                }
                Utils.a(this.f34644a);
                return;
            }
            this.f34642a.getView().setOnTouchListener(this);
            this.f34642a.setOnLongClickListener(new vvj(this));
            long uptimeMillis = SystemClock.uptimeMillis();
            if ((this.f34655a.f34990a & 65536) == 0) {
                switch (this.f95022a.getIntExtra("reqType", -1)) {
                    case 1:
                        i2 = 2;
                        break;
                    case 4:
                        i2 = 0;
                        break;
                }
            } else {
                i2 = 2;
            }
            if (AppSetting.f7085o) {
                i2 = 2;
            }
            this.f34642a.getSettings().setCacheMode(i2);
            if (QLog.isColorLevel()) {
                QLog.i(SwiftBrowserStatistics.f95075b, 2, "Web_qqbrowser_ setCacheMode=" + i2);
            }
            this.f34642a.getSettings().setAllowFileAccessFromFileURLs(false);
            this.f34642a.getSettings().setAllowUniversalAccessFromFileURLs(false);
            long uptimeMillis2 = SystemClock.uptimeMillis();
            this.f34654a.f34906l = uptimeMillis2 - uptimeMillis;
            this.f34654a.f34924z = uptimeMillis2;
            if (QLog.isColorLevel()) {
                QLog.i(SwiftBrowserStatistics.f95075b, 2, "Web_qqbrowser_ init browser, cost = " + this.f34654a.f34906l);
            }
            long uptimeMillis3 = SystemClock.uptimeMillis();
            boolean z2 = this.f34642a.getX5WebViewExtension() != null;
            if (z2 && (a2 = SwiftWebViewUtils.a()) != null) {
                this.f34642a.getX5WebViewExtension().invokeMiscMethod("setDomainsAndArgumentForImageRequest", a2);
            }
            long uptimeMillis4 = SystemClock.uptimeMillis();
            if (QLog.isColorLevel()) {
                QLog.i(SwiftBrowserStatistics.f95075b, 2, "Web_qqbrowser_ setDomainsAndArgumentForImageRequest, cost=" + (uptimeMillis4 - uptimeMillis3) + ",isX5WebView: " + z2);
            }
        }
    }

    public final WebViewWrapper a(ViewGroup viewGroup) {
        long uptimeMillis = SystemClock.uptimeMillis();
        Util.c(SwiftBrowserStatistics.f95075b, "Web_qqbrowser_ web webviewFragment createWebViewWrapper start: " + uptimeMillis);
        boolean z2 = (this.f34655a.f34999c & 64) != 0;
        this.f34651a = new WebViewWrapper(this.f34644a, super.getActivity(), this, this.f95022a, z2);
        this.f34651a.a(this.f34647a);
        TouchWebView m9640a = this.f34651a.m9640a();
        if (m9640a == null || m9640a.getView() == null) {
            if (super.getActivity() != null && !super.getActivity().isFinishing()) {
                super.getActivity().finish();
            }
            return this.f34651a;
        }
        if (this.f34647a != null) {
            this.f34647a.a(m9640a);
        }
        this.f34650a.a(m9640a);
        m9640a.setPluginEngine(this.f34650a);
        long uptimeMillis2 = SystemClock.uptimeMillis();
        Util.c(SwiftBrowserStatistics.f95075b, "web webviewFragment  createWebViewWrapper end: " + uptimeMillis2 + ",cost: " + (uptimeMillis2 - uptimeMillis) + ",useWebViewPool = " + z2);
        if (m9640a instanceof SwiftReuseTouchWebView) {
            this.f34654a.f34911o = 1 == ((SwiftReuseTouchWebView) m9640a).f95019c;
        }
        if (m9640a.getX5WebViewExtension() != null) {
            this.f34679r = true;
        }
        m9640a.getView().setOnTouchListener(this);
        if (this.f34663i) {
            m9640a.setMask(true);
        }
        if (viewGroup != null) {
            viewGroup.addView(m9640a);
        }
        return this.f34651a;
    }

    public int i(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.Q);
        long uptimeMillis = SystemClock.uptimeMillis();
        x();
        this.f34654a.f34908m = SystemClock.uptimeMillis() - uptimeMillis;
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "init param and load url, cost = " + this.f34654a.f34908m);
        }
        Util.m947b(SwiftBrowserStatistics.Q);
        this.C = 64;
        return 0;
    }

    public void x() {
        if (this.f34642a != null) {
            mo1051a();
            if (this.f34654a.f34891d && this.f34654a.f34900i > 0) {
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", JumpAction.bK, 0, 1, (int) ((System.nanoTime() - this.f34654a.f34900i) / 1000000), "", "", "", "" + this.f34654a.f34887c);
                this.f34654a.f34900i = 0L;
            }
            this.f34654a.f34912p = System.currentTimeMillis();
            long j2 = this.f34654a.f34912p - this.f34654a.f34885b;
            if (!TextUtils.isEmpty(this.f34672o)) {
                this.f34642a.loadUrl(this.f34672o);
            }
            this.f34654a.a(this.f34642a, this.f34672o, 0, 0, 0, 0, 0, null);
        }
    }

    public int c(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.M);
        if (!this.f34669m) {
            this.f34669m = true;
            this.f34656a.a(this.f34649a, this.f95022a, this.f34642a);
            if (this.f34642a.f3905a) {
                this.f34642a.onResume();
            }
            if (this.f34656a.f34972b instanceof RefreshView) {
                ((RefreshView) this.f34656a.f34972b).setOnFlingGesture(this);
            }
        }
        if (this.f34671n) {
            QzoneOnlineTimeCollectRptService.a().b(1);
        }
        Util.m947b(SwiftBrowserStatistics.M);
        this.C = 256;
        return 1;
    }

    public int b(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.I);
        a(this.f95022a, this.f34672o);
        Bundle extras = this.f95022a.getExtras();
        if (extras != null) {
            this.n = extras.getInt("uin_type");
            this.f34676q = extras.getString("puin");
            this.f34678r = extras.getString("msg_id");
            if (this.f34678r == null) {
                this.f34678r = "";
            }
            this.f34680s = extras.getString(PublicAccountChatPie.az);
            if (this.f34680s == null) {
                this.f34680s = "";
            }
            this.f34682t = extras.getString("friendUin");
            if (this.f34682t == null) {
                this.f34682t = "";
            }
            Boolean valueOf = Boolean.valueOf(extras.getBoolean(QQBrowserActivity.P));
            this.o = extras.getInt("appid");
            this.p = extras.getInt(QQBrowserActivity.R);
            String string = extras.getString(QQBrowserActivity.S);
            if (string == null) {
                string = "";
            }
            if (valueOf.booleanValue()) {
                this.f34648a.f34599a.setText(super.getResources().getString(R.string.f63667button_back));
                a(this.o, string, new vvc(this));
            }
        }
        this.C = 512;
        ((SwiftBrowserShareMenuHandler) mo9621b().a(4)).d();
        Util.m947b(SwiftBrowserStatistics.I);
        if (this.f34642a == null) {
            if (QLog.isColorLevel()) {
                QLog.i(i, 2, "mCreateLoopNextStep is CREATE_LOOP_STEP_FINAL, but webview is still null!");
            }
            return -1;
        }
        return 1;
    }

    public int mo1048a(Bundle bundle) {
        Util.m945a(SwiftBrowserStatistics.R);
        Util.m945a(SwiftBrowserStatistics.y);
        if (!WebIPCOperator.a().m5966a()) {
            WebIPCOperator.a().m5963a().doBindService(BaseApplicationImpl.a());
        }
        Util.m947b(SwiftBrowserStatistics.y);
        if ((this.f34655a.f34990a & 4194304) > 0) {
            SosoInterface.a(new vvd(this, 0, false, false, 600000L, false, false, "webview"));
            SosoInterface.a(new vve(this, 0, true, false, 600000L, false, false, "webview"));
        }
        ThreadManager.m4817c().postDelayed(new vvf(this), 3000L);
        SwiftBrowserIdleTaskHelper.m9682a().a(new vvh(this, 2));
        Util.m947b(SwiftBrowserStatistics.R);
        Util.m947b(SwiftBrowserStatistics.S);
        this.C = 1;
        return -1;
    }

    public void a(Intent intent, String str) {
        this.f34656a.a(intent, str);
    }

    @Override
    public Activity mo1807c() {
        return super.getActivity();
    }

    @Override
    public WebViewFragment mo1798a() {
        return this;
    }

    @Override
    public final int pluginStartActivityForResult(WebViewPlugin webViewPlugin, Intent intent, byte b2) {
        int switchRequestCode = switchRequestCode(webViewPlugin, b2);
        if (switchRequestCode == -1) {
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "pluginStartActivityForResult not handled");
            }
        } else {
            super.startActivityForResult(intent, switchRequestCode);
        }
        return switchRequestCode;
    }

    @Override
    public final int switchRequestCode(WebViewPlugin webViewPlugin, byte b2) {
        CustomWebView m9631a = webViewPlugin.mRuntime.m9631a();
        if (m9631a == null || m9631a.m1031a() == null) {
            return -1;
        }
        int a2 = WebViewPluginEngine.a(webViewPlugin);
        if (a2 == -1) {
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "switchRequestCode failed: webView index=0, pluginIndex=" + a2);
                return -1;
            }
            return -1;
        }
        return ((a2 << 8) & 65280) | 0 | (b2 & ResourcePluginListener.f88784c);
    }

    void a(int i2, String str, BusinessObserver businessObserver) {
        AppUrlOpenGroup.ReqBody reqBody = new AppUrlOpenGroup.ReqBody();
        reqBody.uint32_appid.set(i2);
        reqBody.bytes_url.set(ByteStringMicro.copyFromUtf8(this.f34672o));
        reqBody.bytes_param.set(ByteStringMicro.copyFromUtf8(str));
        NewIntent newIntent = new NewIntent(BaseApplicationImpl.a(), ProtoServlet.class);
        newIntent.putExtra("cmd", "GroupOpen.CheckAppUrl");
        newIntent.putExtra("data", reqBody.toByteArray());
        newIntent.setObserver(businessObserver);
        this.f34644a.startServlet(newIntent);
    }

    public void a(Configuration configuration) {
        Bundle bundle = new Bundle();
        bundle.putParcelable(SwiftBrowserUIStyleHandler.f, configuration);
        bundle.putBoolean(SwiftBrowserUIStyleHandler.g, this.f34669m);
        this.f34652a.a(4, bundle);
        WebViewPluginEngine a2 = this.f34642a != null ? this.f34642a.a() : null;
        if (a2 != null) {
            a2.a(this.f34672o, WebviewPluginEventConfig.E, (Map) null);
        }
    }

    private void a(View view) {
        if (Build.VERSION.SDK_INT >= 11 && view != null) {
            view.addOnLayoutChangeListener(new vux(this));
        }
    }

    Share m9613a() {
        if (this.f34643a == null) {
            this.f34643a = new Share(this.f34644a, super.getActivity());
        }
        return this.f34643a;
    }

    public void mo9630g() {
        m9613a().m1830a();
    }

    public void onClick(View view) {
        ViewParent parent;
        ViewParent parent2;
        if (this.f34642a != null) {
            if (view == this.f34648a.f34599a) {
                mo9624d();
            } else if (view == this.f34648a.f34597a || view == this.f34648a.f34618d) {
                if (SwiftBrowserShareMenuHandler.f34816b != -1) {
                    SwiftBrowserShareMenuHandler.f34816b = -1L;
                }
                Intent intent = new Intent();
                intent.setAction(QQBrowserActivity.X);
                BaseApplicationImpl.a().sendBroadcast(intent);
                if (!m9625d()) {
                    ReportCenter.a().a("", "", "", "1000", "100", "0", false);
                    showActionSheet();
                }
                if (this.f34656a.f34971b != null && (parent = this.f34656a.f34971b.getParent()) != null && (parent instanceof ViewGroup)) {
                    ((ViewGroup) parent).removeView(this.f34656a.f34971b);
                }
            } else if (view == this.f34648a.f34615c) {
                String currentUrl = getCurrentUrl();
                if (currentUrl != null && currentUrl.contains("checkin/index")) {
                    Intent intent2 = new Intent();
                    intent2.setAction(QQBrowserActivity.X);
                    BaseApplicationImpl.a().sendBroadcast(intent2);
                }
                if (!m9625d()) {
                    if (this.f34655a.k) {
                        mo9624d();
                    } else {
                        ReportCenter.a().a("", "", "", "1000", "100", "0", false);
                        showActionSheet();
                    }
                }
                if (this.f34656a.f34971b != null && (parent2 = this.f34656a.f34971b.getParent()) != null && (parent2 instanceof ViewGroup)) {
                    ((ViewGroup) parent2).removeView(this.f34656a.f34971b);
                }
            } else if (view == this.f34656a.f34962a.f34590d) {
                this.f34656a.f34962a.f34588b.setVisibility(8);
                this.f34656a.f34962a.f34583a.setBackgroundResource(R.drawable.f43090name_res_0x7f0207e1);
                this.f34656a.f34962a.h.setVisibility(8);
                super.getActivity().finish();
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", "float_bar_click", 0, 1, 0, BaseConstants.BROADCAST_USERSYNC_EXIT, "", "", "");
            } else if (view == this.f34656a.f34962a.e) {
                if (SwiftBrowserShareMenuHandler.f34816b != -1) {
                    SwiftBrowserShareMenuHandler.f34816b = -1L;
                }
                this.f34656a.f34962a.f34588b.setVisibility(8);
                this.f34656a.f34962a.f34583a.setBackgroundResource(R.drawable.f43090name_res_0x7f0207e1);
                this.f34656a.f34962a.h.setVisibility(8);
                showActionSheet();
                ReportCenter.a().a("", "", "", "1000", "100", "0", false);
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", "float_bar_click", 0, 1, 0, "share", "", "", "");
            } else if (view == this.f34656a.f34962a.g) {
                Intent intent3 = new Intent(super.getActivity(), QQBrowserActivity.class);
                intent3.putExtra("key_isReadModeEnabled", true);
                intent3.putExtra("url", f34635y);
                super.startActivity(intent3);
                super.getActivity().finish();
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", "float_bar_click", 0, 1, 0, "mUIStyleHandler.moreGame", f34635y, "", "");
                if (QLog.isColorLevel()) {
                    QLog.d("zivonchen", 2, "QQBrowserActivity 1 loadUrl = http://h5.qzone.qq.com/wanba/index?_bid=2044&_wv=2097155");
                }
            } else if (view == this.f34656a.f34962a.f) {
                this.f34656a.f34962a.f34588b.setVisibility(8);
                this.f34656a.f34962a.f34583a.setBackgroundResource(R.drawable.f43090name_res_0x7f0207e1);
                this.f34656a.f34962a.h.setVisibility(8);
                if (!TextUtils.isEmpty(getShare().G)) {
                    this.f34642a.a(getShare().G, "");
                    if (QLog.isColorLevel()) {
                        QLog.d(i, 2, "call js function getShare().mOnShareHandler");
                    }
                }
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", "float_bar_click", 0, 1, 0, "senddesk", "", "", "");
            }
        }
    }

    public void a(WebViewPlugin webViewPlugin, Intent intent, byte b2) {
        int switchRequestCode = switchRequestCode(webViewPlugin, b2);
        intent.putExtra("keyAction", "actionSelectPicture");
        intent.putExtra("requestCode", switchRequestCode);
        super.startActivity(intent);
    }

    protected boolean m9625d() {
        if (this.f34642a != null) {
            if (this.f34648a.f34602a != null && this.f34648a.f34602a.f34580a) {
                this.f34642a.a(this.f34648a.f34602a, 0, "");
                return true;
            } else if (!TextUtils.isEmpty(this.f34648a.f34612b)) {
                this.f34642a.a(this.f34648a.f34612b, "");
                return true;
            }
        }
        return false;
    }

    public void a(String str, boolean z2) {
        if (this.f34644a != null) {
            String currentAccountUin = this.f34644a.getCurrentAccountUin();
            QfavBuilder.a(str).c(currentAccountUin).a(super.getActivity(), currentAccountUin, 2, null);
            QfavReport.a(this.f34644a, z2 ? 42 : 45, 2);
        }
    }

    public void mo1051a() {
    }

    public void mo9624d() {
        if (1 != this.C) {
            this.f34657a.c();
            this.C = 1;
        }
        if (TextUtils.isEmpty(this.f34672o) && this.f34642a != null) {
            this.f34672o = this.f34642a.getUrl();
        }
        AIOOpenWebMonitor.c(this.f95022a);
        if (this.f34681s) {
            s();
            return;
        }
        if (this.f34647a != null) {
            this.f34647a.clearHistory();
        }
        HashMap hashMap = new HashMap(1);
        hashMap.put("target", 3);
        if (!a(WebviewPluginEventConfig.u, hashMap)) {
            if ((this.f34655a.f34990a & 4) == 0 && this.f34642a != null && this.f34642a.canGoBack()) {
                this.f34642a.stopLoading();
                this.f34642a.goBack();
                WebViewPluginEngine a2 = this.f34642a.a();
                if (a2 != null) {
                    a2.a(this.f34642a.getUrl(), WebviewPluginEventConfig.J, hashMap);
                    return;
                }
                return;
            }
            super.getActivity().finish();
        }
    }

    public void a(int i2, KeyEvent keyEvent) {
        switch (i2) {
            case 24:
                a(WebviewPluginEventConfig.C, (Map) null);
                return;
            case 25:
                a(WebviewPluginEventConfig.B, (Map) null);
                return;
            case 82:
                a(WebviewPluginEventConfig.A, (Map) null);
                return;
            default:
                return;
        }
    }

    public boolean a(long j2, Map map) {
        WebViewPluginEngine a2;
        if (this.f34642a == null || (a2 = this.f34642a.a()) == null) {
            return false;
        }
        return a2.a(this.f34642a.getUrl(), j2, map);
    }

    public void mo9622b() {
        WebViewPluginEngine a2 = this.f34642a == null ? null : this.f34642a.a();
        if (a2 != null) {
            a2.a(this.f34672o, WebviewPluginEventConfig.r, (Map) null);
        }
        if (a2 != null) {
            a2.a(this.f34672o, WebviewPluginEventConfig.s, (Map) null);
        }
        if (this.f95022a.getBooleanExtra(FlowCameraConstant.n, false)) {
            Intent intent = new Intent();
            intent.setClass(BaseApplicationImpl.a(), SplashActivity.class);
            intent.putExtra("tab_index", MainFragment.f85178b);
            intent.addFlags(67108864);
            super.startActivity(intent);
        }
    }

    public boolean onTouch(View view, MotionEvent motionEvent) {
        ViewParent parent;
        if ((motionEvent.getAction() & 255) == 0) {
            this.f95023b = System.currentTimeMillis();
            if (view.getId() == R.id.f50650name_res_0x7f090df6 && (parent = view.getParent()) != null && (parent instanceof ViewGroup)) {
                ((ViewGroup) parent).removeView(view);
                return false;
            }
            return false;
        }
        return false;
    }

    public void a(int i2, int i3, Intent intent) {
        WebViewPluginEngine a2;
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "QQBrowserActivity onActivityResult,requestCode=" + i2 + ",resultCode=" + i3);
        }
        if (i3 == -1) {
            switch (i2) {
                case 2:
                    QfavBuilder.a(super.getActivity(), intent);
                    return;
            }
        }
        if (!TextUtils.isEmpty(this.f34672o) && this.f34672o.contains("closeSpecialLogic=1") && intent != null && intent.getBooleanExtra("closeSpecialLogic", false)) {
            super.getActivity().setResult(-1, intent);
            super.getActivity().finish();
        } else if (i2 == 21) {
            Intent a3 = AIOUtils.a(new Intent(super.getActivity(), SplashActivity.class), (int[]) null);
            if (intent != null) {
                a3.putExtras(new Bundle(intent.getExtras()));
                super.startActivity(a3);
            }
        } else {
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "onActivityResult, requestCode=" + i2 + ", resultCode=" + i3);
            }
            HashMap hashMap = new HashMap();
            hashMap.put("requestCode", Integer.valueOf(i2));
            hashMap.put("resultCode", Integer.valueOf(i3));
            hashMap.put("data", intent);
            if (!a(WebviewPluginEventConfig.t, hashMap)) {
                int i4 = i2 & 255;
                int i5 = (i2 >> 8) & 255;
                int i6 = (i2 >> 16) & 255;
                if (i5 > 0) {
                    if (this.f34642a != null && (a2 = this.f34642a.a()) != null) {
                        if (intent != null && intent.hasExtra(MttLoader.ENTRY_ID) && a2.m9636a("card") == null) {
                            a2.a(new String[]{"card"});
                        }
                        WebViewPlugin a4 = a2.a(i5, true);
                        if (a4 != null) {
                            a4.onActivityResult(intent, (byte) i4, i3);
                            return;
                        }
                    }
                    if (QLog.isColorLevel()) {
                        QLog.w(i, 2, "Caution! activity result not handled!");
                    }
                } else if (this.f34641a != null && this.f34641a.a(i2, i3, intent)) {
                    if (QLog.isColorLevel()) {
                        QLog.w(i, 2, "Activity result handled by FileChooserHelper.");
                    }
                } else if (i3 == -1 && this.f34642a != null) {
                    switch (i2) {
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                            if (intent != null) {
                                String stringExtra = intent.getStringExtra("callbackSn");
                                String stringExtra2 = intent.getStringExtra("result");
                                this.f34642a.loadUrl("javascript:window.JsBridge&&JsBridge.callback('" + stringExtra + "',{'r':0,'result':" + stringExtra2 + "});");
                                try {
                                    this.f34683t = new JSONObject(stringExtra2).getInt("resultCode") == 0;
                                    if (QLog.isColorLevel()) {
                                        QLog.d(i, 2, "onActivityResult: mPayActionSucc=" + this.f34683t);
                                        return;
                                    }
                                    return;
                                } catch (Exception e) {
                                    if (QLog.isColorLevel()) {
                                        QLog.d(i, 2, "onActivityResult: mPayActionException=" + e.getMessage());
                                        return;
                                    }
                                    return;
                                }
                            }
                            return;
                        default:
                            return;
                    }
                }
            }
        }
    }

    public void mo9617a(Intent intent) {
        boolean z2;
        WebViewPluginEngine a2;
        WebViewPlugin a3;
        WebViewPluginEngine a4;
        WebViewPlugin a5;
        if ("actionSelectPicture".equals(intent.getStringExtra("keyAction"))) {
            int intExtra = intent.getIntExtra("requestCode", -1);
            int i2 = intExtra & 255;
            int i3 = (intExtra >> 8) & 255;
            int i4 = (intExtra >> 16) & 255;
            if (i3 > 0) {
                if (this.f34642a != null && (a4 = this.f34642a.a()) != null && (a5 = a4.a(i3, true)) != null) {
                    a5.onActivityResult(intent, (byte) i2, intent.hasExtra("PhotoConst.PHOTO_PATHS") ? -1 : 0);
                    return;
                } else if (QLog.isColorLevel()) {
                    QLog.w(i, 2, "Caution! activity result not handled!");
                }
            }
        }
        this.f34668m = this.f34644a.getAccount();
        if ("android.nfc.action.TECH_DISCOVERED".equals(intent.getAction())) {
            if (this.f34642a == null || (a2 = this.f34642a.a()) == null || (a3 = a2.a(120, true)) == null || !(a3 instanceof BuscardJsPlugin)) {
                z2 = false;
            } else {
                a3.onActivityResult(intent, (byte) 120, 0);
                z2 = true;
            }
            if (!z2) {
                BuscardHelper.a(this.f34668m, super.getActivity(), intent);
            }
        }
        HashMap hashMap = new HashMap();
        hashMap.put("intent", intent);
        a(128L, hashMap);
        if (!"actionSelectPicture".equals(intent.getStringExtra("keyAction")) && !"android.nfc.action.TECH_DISCOVERED".equals(intent.getAction()) && !intent.getBooleanExtra("fromNotification", false)) {
            String dataString = intent.getDataString();
            if (dataString != null && this.f34642a != null) {
                this.f34642a.loadUrl(dataString);
            } else {
                this.f95022a = intent;
                v();
                this.f34657a.c();
                if (intent.getBooleanExtra(QQBrowserActivity.V, true)) {
                    this.C = 2;
                    this.f34657a.a(intent.getExtras());
                }
            }
            boolean booleanExtra = intent.getBooleanExtra(PeakConstants.aB, false);
            if (QLog.isColorLevel()) {
                QLog.d(i, 2, "doOnNewIntent, isPhotoPlusEditSend = " + booleanExtra);
            }
            if (booleanExtra) {
                intent.removeExtra(PeakConstants.aB);
                ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra("PhotoConst.PHOTO_PATHS");
                if (stringArrayListExtra != null && stringArrayListExtra.size() > 0) {
                    String str = stringArrayListExtra.get(0);
                    QLog.d(i, 2, "editScreenShotBack:" + str);
                    SwiftBrowserScreenShotHandler swiftBrowserScreenShotHandler = (SwiftBrowserScreenShotHandler) this.f34652a.a(64);
                    if (swiftBrowserScreenShotHandler != null) {
                        swiftBrowserScreenShotHandler.a(str, intent.getStringExtra(EditPicActivity.f5497c), intent.getIntExtra(SwiftBrowserScreenShotHandler.f95067b, 0));
                    }
                }
            }
        }
    }

    public static String a(Context context, String str, String str2, String str3, String str4) {
        Bundle bundle = new Bundle();
        bundle.putString(TroopHandler.f18749o, str2);
        String str5 = "vkey=" + str3 + ";uin=" + str4;
        if (QLog.isColorLevel()) {
            QLog.d("gamecenter", 2, "<--httpRequest vookies=" + str5 + ",appids=" + str2);
        }
        Bundle bundle2 = new Bundle();
        bundle2.putString("Cookie", str5);
        try {
            String a2 = HttpUtil.a(context, str, "POST", bundle, bundle2);
            if (QLog.isColorLevel()) {
                QLog.i("gamecenter", 2, "httpRequest: result:" + a2);
                return a2;
            }
            return a2;
        } catch (ClientProtocolException e) {
            if (QLog.isColorLevel()) {
                QLog.i("gamecenter", 2, "httpRequest:ClientProtocolException");
            }
            return "{'ret': -104, 'data' : 'httpRequest:ClientProtocolException'}";
        } catch (IOException e2) {
            if (QLog.isColorLevel()) {
                QLog.i("gamecenter", 2, "httpRequest:" + e2.getMessage());
            }
            return "{'ret': -105, 'data' : 'httpRequest::Http no response.'}";
        }
    }

    public String e() {
        return m9613a() == null ? "" : m9613a().m1829a();
    }

    public boolean mo9618a() {
        boolean z2;
        Util.m945a(SwiftBrowserStatistics.f34860G);
        long nanoTime = System.nanoTime();
        this.f34656a.a(this.f95022a);
        this.f34656a.b(this.f95022a);
        this.f34649a.a(this.f34656a.f34966a.A);
        if (this.f34656a.f34966a.f34996a) {
            super.getActivity().getWindow().setFlags(1024, 1024);
            A();
        } else {
            this.f34656a.f34977c = this.f34649a;
            this.f34648a.a(this.f95022a, this);
            this.f34648a.f34595a.setOnTouchListener(this.f34636a);
            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.f34648a.f34595a.getLayoutParams();
            int a2 = ImmersiveUtils.isSupporImmersive() == 1 ? ImmersiveUtils.a((Context) BaseApplicationImpl.a()) : 0;
            layoutParams.height += a2;
            this.f34655a.z = true;
            if (this.f34656a.f34966a.f34998b || this.f34655a.l) {
                this.f34655a.m = true;
                this.f34648a.f34595a.setBackgroundDrawable(super.getResources().getDrawable(R.drawable.f47029trans));
                this.f34648a.c(-1);
                this.f34648a.d(-1);
                if (this.f34655a.n) {
                    a(a2, a2);
                    z2 = true;
                } else {
                    z2 = false;
                }
                if (this.f34655a.l) {
                    this.f34648a.f34595a.setOnTouchListener(null);
                }
            } else {
                this.f34675p = true;
                this.f34677q = true;
                a(a2 * 2, a2 + BaseApplicationImpl.a().getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                z2 = true;
            }
            if (ImmersiveUtils.isSupporImmersive() == 1) {
                this.f34648a.f34595a.setPadding(0, ImmersiveUtils.a((Context) BaseApplicationImpl.a()), 0, 0);
                super.getActivity().getWindow().addFlags(67108864);
            }
            h(z2);
            if (!this.f34656a.f34966a.f34998b && !this.f34655a.l) {
                f();
            }
        }
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "init view 1, cost = " + ((System.nanoTime() - nanoTime) / 1000000));
        }
        this.f34656a.f34979c = true;
        this.f34656a.f34959a = this.f34649a.f34632a;
        this.f34649a.f34631a.setVisibility(8);
        this.f34656a.m9676a(this.f34672o);
        Util.m947b(SwiftBrowserStatistics.f34860G);
        return true;
    }

    private void f() {
        if (this.f34655a.f34992a == null) {
            int paddingTop = this.f34648a.f34595a.getPaddingTop();
            int paddingBottom = this.f34648a.f34595a.getPaddingBottom();
            int paddingLeft = this.f34648a.f34595a.getPaddingLeft();
            int paddingRight = this.f34648a.f34595a.getPaddingRight();
            this.f34648a.f34595a.setBackgroundColor(getResources().getColor(R.color.f38784name_res_0x7f0b017f));
            this.f34648a.f34595a.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
            return;
        }
        this.f34648a.f34595a.setBackgroundColor(this.f34655a.f34992a.f94986b);
        this.f34648a.c(this.f34655a.f34992a.f94987c);
        this.f34648a.d(this.f34655a.f34992a.d);
        if (this.f34659a != null) {
            this.f34659a.a(this.f34655a.f34992a.f94986b);
            this.f34659a.b(this.f34655a.f34992a.f94986b);
        }
    }

    void a(int i2, int i3) {
        LinearLayout.LayoutParams layoutParams;
        TextView textView = (TextView) this.f34656a.f34977c.findViewById(R.id.f50834name_res_0x7f090eae);
        if (textView != null && (layoutParams = (LinearLayout.LayoutParams) textView.getLayoutParams()) != null) {
            layoutParams.topMargin += i2;
            textView.setLayoutParams(layoutParams);
        }
        View findViewById = this.f34656a.f34977c.findViewById(R.id.f50836name_res_0x7f090eb0);
        FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) findViewById.getLayoutParams();
        if (layoutParams2 != null) {
            layoutParams2.topMargin += i3;
            findViewById.setLayoutParams(layoutParams2);
        }
    }

    public void e(String str) {
        this.f34648a.b(str);
    }

    public void y() {
        if (this.f34644a != null) {
            this.f34663i = ThemeUtil.isInNightMode(this.f34644a);
            a(WebviewPluginEventConfig.x, (Map) null);
        }
        if (this.f34659a != null && !this.f34655a.h) {
            int color = getResources().getColor(R.color.f39367skin_color_title_immersive_bar);
            if (ImmersiveUtils.a(getActivity().getWindow(), true)) {
                color = getResources().getColor(R.color.f38784name_res_0x7f0b017f);
            }
            this.f34659a.a(color);
            this.f34659a.b(color);
        }
    }

    public void g(boolean z2) {
    }

    void z() {
        if (1 != this.C) {
            int i2 = this.C;
            this.f34657a.c();
            this.f34657a.a();
            this.f34657a.a(null);
        }
    }

    public void h(boolean z2) {
        super.getActivity().setImmersiveStatus();
        ImmersiveUtils.m10596a((Context) getActivity());
        if (this.f34675p && ImmersiveUtils.isSupporImmersive() == 1) {
            getActivity().getWindow().addFlags(67108864);
            if (this.f34677q) {
                int color = getResources().getColor(R.color.f39367skin_color_title_immersive_bar);
                if (ImmersiveUtils.a(getActivity().getWindow(), true)) {
                    color = getResources().getColor(R.color.f38784name_res_0x7f0b017f);
                }
                if (this.f34659a == null) {
                    this.f34659a = new SystemBarCompact((Activity) getActivity(), true, color);
                    this.f34659a.init();
                }
            }
        }
    }

    public void A() {
        if (super.getActivity() != null && super.getActivity().getWindow() != null && super.getActivity().getWindow().getDecorView() != null) {
            super.getActivity().getWindow().getDecorView().setSystemUiVisibility(5894);
        }
    }

    @Override
    public void B() {
        h(false);
    }

    @Override
    public void mo9626e() {
        if (this.f34642a == null) {
            mo9624d();
        } else if (this.f34642a.canGoBack()) {
            HashMap hashMap = new HashMap(1);
            hashMap.put("target", 2);
            if (this.f34642a.a(hashMap)) {
                mo9630g();
            }
        } else {
            mo9624d();
        }
    }

    public void i(boolean z2) {
        if (this.f34656a != null && (this.f34656a.f34972b instanceof RefreshView)) {
            ((RefreshView) this.f34656a.f34972b).b(z2);
        }
    }

    @Override
    public void a(WebView webView, int i2) {
        if (this.f34655a.C && this.f34656a.f34968a != null && this.f34656a.f34968a.b() == 0) {
            this.f34656a.f34968a.a((byte) 1);
        }
        if (i2 == 100) {
            this.f34656a.f34959a.setVisibility(8);
        }
    }

    public void a(WebView webView, String str) {
        if (!this.f34664j && this.f34642a != null && TextUtils.isEmpty(this.f34674p) && (this.f34655a.f34999c & 8) <= 0 && !UrlMatcher.a(str) && str != null) {
            this.f34648a.a(webView, str, this.f34673o);
        }
    }

    public void a(WebView webView, String str, Bitmap bitmap) {
        if (!this.f34664j && this.f34642a != null) {
            z();
            Bundle bundle = new Bundle();
            bundle.putString("url", str);
            Util.m945a(SwiftBrowserStatistics.r);
            this.f34652a.a(6, bundle);
            if (this.f34654a.f34893e) {
                ReportController.b(null, "dc01332", "BizTechReport", "", "web", "float_bar_fv", 0, 1, 0, this.f34655a.f34997b + "", this.f34672o, HttpUtil.a() + "", this.f34668m);
                this.f34654a.f34893e = false;
            }
        }
    }

    public void b(WebView webView, String str) {
        if (!this.f34664j && this.f34642a != null) {
            z();
            if (!"about:blank".equalsIgnoreCase(str) && this.f34654a.f34879a.f34925a == 2) {
                this.f34654a.f34879a.f34925a = 8;
                this.f34654a.f34879a.f34926a = System.currentTimeMillis();
            }
            this.f34667l = true;
            this.l = 100;
            if (this.f34655a.E) {
                this.f34656a.m9677b().setVisibility(8);
            }
            if (this.f34654a != null && this.f34647a != null) {
                this.f34654a.f34876a = this.f34647a.a().getFinalResultCode();
            }
            Bundle bundle = new Bundle();
            bundle.putString("url", str);
            if (this.f34654a != null) {
                long currentTimeMillis = System.currentTimeMillis();
                this.f34654a.f34868K = currentTimeMillis - this.f34654a.f34885b;
                this.f34654a.f34869L = currentTimeMillis - this.f34654a.f34867J;
            }
            this.f34652a.a(7, bundle);
            Util.m947b(SwiftBrowserStatistics.r);
            if (this.f34654a.f34895f) {
                this.f34654a.f34895f = false;
                m9613a();
                SwiftBrowserIdleTaskHelper.m9682a().a(new SwiftBrowserIdleTaskHelper.PreloadIdleTask(1));
            }
            if (this.f34647a != null) {
                this.f34647a.a().onClientPageFinished(str);
            }
            if (Build.VERSION.SDK_INT >= 19 && !this.f34664j && this.f34651a.a() != null) {
                a(webView, webView.getTitle());
            }
            Activity mo1807c = mo1807c();
            if (mo1807c instanceof QQBrowserActivity) {
                ((QQBrowserActivity) mo1807c).a(webView, str);
            }
            if (webView instanceof CustomWebView) {
            }
        }
    }

    public void a(WebView webView, int i2, String str, String str2) {
        if (!this.f34664j && this.f34642a != null) {
            z();
            this.f34656a.f34959a.setVisibility(8);
            this.f34656a.d();
            QLog.e(i, 1, "errorCode=" + i2 + "descrip=" + str + "failingUrl" + Util.b(str2, new String[0]));
            this.f34654a.a(this.f34642a, i2, str, str2);
        }
    }

    @Override
    public void c(String str, String str2) {
        if (QLog.isColorLevel()) {
            QLog.i(i, 2, "X5 webkit detect 302 url: " + str2);
        }
        this.f34654a.f34889c = true;
        this.f34654a.f34917s = System.currentTimeMillis();
    }

    @Override
    public boolean mo9610b(WebView webView, String str) {
        WebView.HitTestResult hitTestResult;
        if (this.f34664j || this.f34642a == null) {
            return true;
        }
        Util.m945a("urlInterceptManager");
        String m9693a = SwiftWebViewUtils.m9693a(str);
        if (("http".equals(m9693a) || "data".equals(m9693a)) && (super.getActivity() instanceof QQBrowserActivity)) {
            if (this.f34645a != null && this.f34645a.f17474a != null) {
                String a2 = this.f34645a.f17474a.a(str);
                if (a2 != null) {
                    Intent intent = new Intent(super.getActivity(), JumpActivity.class);
                    intent.setData(Uri.parse(a2));
                    intent.putExtra("from", "webview");
                    super.startActivity(intent);
                    return true;
                }
            } else if (QLog.isColorLevel()) {
                QLog.e(i, 2, "URLInterceptManager = null");
            }
        }
        Util.m947b("urlInterceptManager");
        if (("http".equals(m9693a) || "https".equals(m9693a)) && (hitTestResult = webView.getHitTestResult()) != null && hitTestResult.getType() == 0) {
            QLog.i(i, 1, "shouldOverrideUrlLoading detect 302, url: " + str);
            this.f34654a.f34917s = System.currentTimeMillis();
            this.f34666l = str;
            SwiftBrowserCookieMonster.c();
            this.f34654a.f34881a.add(str);
        }
        return false;
    }

    public boolean mo9609a(WebView webView, String str) {
        WebView.HitTestResult hitTestResult;
        if (this.f34664j || this.f34642a == null) {
            return true;
        }
        if (str.startsWith("http://") || str.startsWith("https://")) {
            this.f34654a.f34889c = false;
        }
        if (str.startsWith(FMConstants.f23377aY) || str.startsWith("data:") || str.startsWith("http://") || str.startsWith("https://")) {
            mo9630g();
            if (str.startsWith("http://") || str.startsWith("https://")) {
                this.f34672o = str;
                SwiftBrowserShareMenuHandler swiftBrowserShareMenuHandler = (SwiftBrowserShareMenuHandler) this.f34652a.a(4);
                if (swiftBrowserShareMenuHandler != null) {
                    swiftBrowserShareMenuHandler.a(this.f34672o);
                }
                SwiftBrowserScreenShotHandler swiftBrowserScreenShotHandler = (SwiftBrowserScreenShotHandler) this.f34652a.a(64);
                if (swiftBrowserScreenShotHandler != null) {
                    swiftBrowserScreenShotHandler.m9658a(this.f34672o);
                }
            }
        }
        if (super.getActivity().isFinishing()) {
            this.f34656a.f34959a.setVisibility(8);
        }
        if (webView.getX5WebViewExtension() == null && (hitTestResult = webView.getHitTestResult()) != null && hitTestResult.getType() == 0) {
            if (QLog.isColorLevel()) {
                QLog.i(i, 2, "system webkit detect 302 url: " + str);
            }
            this.f34654a.f34889c = true;
            this.f34654a.f34917s = System.currentTimeMillis();
        }
        return false;
    }

    @Override
    public boolean c(WebView webView, String str) {
        Uri parse = Uri.parse(str);
        String scheme = parse.getScheme();
        if (!super.getActivity().isResume() || (System.currentTimeMillis() - this.f95023b >= 1000 && !this.f34640a.a(webView.getUrl(), scheme).booleanValue())) {
            return false;
        }
        Intent intent = new Intent(XChooserActivity.i, parse);
        intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
        try {
            super.startActivity(intent);
        } catch (ActivityNotFoundException e) {
        }
        return true;
    }

    @Override
    public void a(View view, int i2, IX5WebChromeClient.CustomViewCallback customViewCallback) {
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "show custom view called");
        }
        if (this.f34658a != null) {
            customViewCallback.onCustomViewHidden();
            return;
        }
        this.q = super.getActivity().getRequestedOrientation();
        this.r = super.getActivity().getWindow().getAttributes().flags & 1024;
        if (this.f34639a == null) {
            this.f34639a = new FrameLayout(BaseApplicationImpl.a());
            this.f34639a.setBackgroundColor(-16777216);
            ((ViewGroup) super.getActivity().getWindow().getDecorView()).addView(this.f34639a, new ViewGroup.LayoutParams(-1, -1));
        }
        if (!this.f34655a.x) {
            super.getActivity().getWindow().setFlags(1024, 1024);
        }
        super.getActivity().setRequestedOrientation(i2);
        this.f34681s = true;
        this.f34639a.addView(view);
        this.f34637a = view;
        this.f34658a = customViewCallback;
        this.f34639a.setVisibility(0);
    }

    @Override
    public void s() {
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "hide custom view called");
        }
        if (this.f34658a != null) {
            this.f34637a.setKeepScreenOn(false);
            this.f34639a.setVisibility(8);
            this.f34658a.onCustomViewHidden();
            try {
                this.f34639a.removeAllViews();
            } catch (Exception e) {
            }
            if (!this.f34655a.x) {
                super.getActivity().getWindow().setFlags(this.r, 1024);
            }
            super.getActivity().setRequestedOrientation(this.q);
            this.f34637a = null;
            this.f34658a = null;
            this.f34662b = null;
            this.f34681s = false;
        }
    }

    @Override
    public void a(String str, int i2) {
        this.f34654a.a(str, i2);
    }

    @Override
    public View a() {
        if (this.f34662b == null) {
            this.f34662b = LayoutInflater.from(super.getActivity()).inflate(R.layout.f58348name_res_0x7f0307d3, (ViewGroup) null);
        }
        return this.f34662b;
    }

    @Override
    public void a(String str, GeolocationPermissionsCallback geolocationPermissionsCallback) {
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "onGeolocationPermissionsShowPrompt:" + str);
        }
        if (str != null && str.indexOf(58) == -1 && this.f34642a != null && this.f34642a.getX5WebViewExtension() != null) {
            str = "http://" + str + "/";
        }
        geolocationPermissionsCallback.invoke(str, this.f34640a.m845a(str, "publicAccount.getLocation"), false);
    }

    @Override
    public void a(ValueCallback valueCallback, String str, String str2) {
        if (this.f34641a == null) {
            this.f34641a = new FileChooserHelper();
        }
        this.f34641a.a(super.getActivity(), 0, valueCallback, str, str2);
    }

    @Override
    public boolean a(WebView webView, String str, String str2, JsResult jsResult) {
        return false;
    }

    @Override
    public void b(WebView webView, String str, Bitmap bitmap) {
        if (!this.f34667l && PublicAccountUtil.a(str, this.l, this.f34670n)) {
            this.f34667l = true;
        }
    }

    @Override
    public Object a(String str, Bundle bundle) {
        SwiftBrowserTBSHandler swiftBrowserTBSHandler = (SwiftBrowserTBSHandler) this.f34652a.a(16);
        if (swiftBrowserTBSHandler != null) {
            return swiftBrowserTBSHandler.a(str, bundle);
        }
        return null;
    }

    public String mo1050a() {
        return null;
    }

    public Object mo9616a() {
        AuthorizeConfig authorizeConfig;
        if (!this.f34679r && 14 <= Build.VERSION.SDK_INT && Build.VERSION.SDK_INT <= 18) {
            if (this.f34640a == null) {
                authorizeConfig = AuthorizeConfig.a();
                this.f34640a = authorizeConfig;
            } else {
                authorizeConfig = this.f34640a;
            }
            if (authorizeConfig.a("enable_custom_am", (Boolean) false).booleanValue()) {
                if (QLog.isColorLevel()) {
                    QLog.d(i, 2, "using custom AudioManager");
                }
                return new vvi(BaseApplicationImpl.a());
            }
        }
        return null;
    }

    @Override
    @Deprecated
    public SystemBarCompact mo9615a() {
        return null;
    }

    @Override
    public boolean mo9627e() {
        return this.f34656a.f34966a.f34998b;
    }

    @Override
    public void j(boolean z2) {
        this.f34655a.h = z2;
    }

    @Override
    public void k(boolean z2) {
        this.f34675p = z2;
    }

    @Override
    public void l(boolean z2) {
        this.f34677q = z2;
    }

    @Override
    public void C() {
        this.f34648a.d();
    }

    @Override
    public void e(int i2) {
        this.f34648a.c(i2);
    }

    @Override
    public void f(int i2) {
        this.f34648a.d(i2);
    }

    public long a() {
        return this.f34655a.f34990a;
    }

    @Override
    public void a(long j2) {
        this.f34655a.f34990a = j2;
    }

    public void b(long j2) {
        this.f34655a.f34999c = j2;
    }

    public void a(String str, String str2, String str3, boolean z2, int i2, int i3, JsBridgeListener jsBridgeListener, View.OnClickListener onClickListener) {
        this.f34648a.a(str, str2, str3, z2, i2, i3, jsBridgeListener, onClickListener);
        ((SwiftBrowserShareMenuHandler) this.f34652a.a(4)).d();
        this.f34656a.i();
    }

    @Override
    public void a(String str, String str2, String str3, boolean z2, int i2, int i3, View.OnClickListener onClickListener) {
        a(str, str2, str3, z2, i2, i3, (JsBridgeListener) null, onClickListener);
    }

    @Override
    public void m(boolean z2) {
        this.f34648a.b(z2);
        ((SwiftBrowserShareMenuHandler) this.f34652a.a(4)).d();
        this.f34656a.i();
    }

    @Override
    public View mo9620b() {
        return this.f34648a.f34595a;
    }

    @Override
    public int b() {
        return super.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height);
    }

    @Override
    public int c() {
        return this.f34655a.f;
    }

    @Override
    public void a(JSONObject jSONObject) {
        if (jSONObject != null) {
            this.f34656a.f34966a.f34995a = jSONObject;
        }
        this.f34656a.a(jSONObject, true);
    }

    @Override
    public Activity mo9611a() {
        return BaseActivity.sTopActivity;
    }

    @Override
    public boolean mo9629f() {
        return this.f34683t;
    }

    @Override
    public int a(WebViewPlugin webViewPlugin, byte b2, boolean z2) {
        return switchRequestCode(webViewPlugin, b2);
    }

    @Override
    public long b() {
        return this.f34654a.f34877a;
    }

    @Override
    public void c(long j2) {
        this.f34654a.f34877a = j2;
    }

    @Override
    public boolean b(String str) {
        return ((SwiftBrowserShareMenuHandler) this.f34652a.a(4)).m9665a(str);
    }

    @Override
    public String a(String str) {
        String a2 = a(BaseApplicationImpl.a(), "http://cgi.connect.qq.com/api/get_openids_by_appids", str, this.f95022a.getStringExtra("vkey"), this.f34668m);
        if (QLog.isColorLevel()) {
            QLog.d(i, 2, "<--getOpenidBatch result" + a2);
        }
        return a2;
    }

    @Override
    public boolean a(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
        return m9613a().a(str, str2, str3, str4, str5, str6, str7, str8);
    }

    @Override
    public String mo9628f() {
        return this.f34678r;
    }

    @Override
    public String g() {
        return this.f34676q;
    }

    @Override
    public String h() {
        return this.f34680s;
    }

    @Override
    public String getCurrentUrl() {
        String str = this.f34672o;
        if (!TextUtils.isEmpty(str) || this.f34642a == null) {
            return str;
        }
        return !TextUtils.isEmpty(this.f34642a.getUrl()) ? this.f34642a.getUrl() : this.f95022a.getStringExtra("url");
    }

    @Override
    public CustomWebView getWebView() {
        return this.f34642a;
    }

    @Override
    public void hideQQBrowserButton() {
    }

    @Override
    public void setBottomBarVisible(boolean z2) {
    }

    @Override
    public boolean isActivityResume() {
        if (getActivity() != null) {
            return getActivity().isResume();
        }
        return false;
    }

    @Override
    public void showActionSheet() {
        SwiftBrowserShareMenuHandler swiftBrowserShareMenuHandler = (SwiftBrowserShareMenuHandler) this.f34652a.a(4);
        if (swiftBrowserShareMenuHandler != null) {
            Share m9613a = m9613a();
            if (m9613a != null && TeamWorkUtils.e(m9613a.m1829a()) && !TextUtils.isEmpty(m9613a.d())) {
                TeamWorkUtils.a(m9613a, getActivity(), this.f34644a, this.f34661b);
            } else {
                swiftBrowserShareMenuHandler.a(m9613a, this.f34655a.f34990a);
            }
        }
    }

    @Override
    public boolean isFullScreen() {
        return this.f34656a.f34966a.f34996a;
    }

    @Override
    public boolean setShareUrl(String str) {
        return m9613a().m1832a(str);
    }

    @Override
    public boolean setSummary(String str, String str2, String str3, String str4, Bundle bundle) {
        return m9613a().a(str, str2, str3, str4, bundle);
    }

    @Override
    public Share getShare() {
        return m9613a();
    }

    @Override
    public String i() {
        return this.f34666l;
    }

    public void D() {
        a("返回游戏中心继续浏览", R.drawable.f41275name_res_0x7f0200c5, (String) null, SingleTaskQQBrowser.class.getName());
    }

    public void a(String str, int i2, String str2, String str3) {
        if (this.f95022a.getBooleanExtra(SingleTaskQQBrowser.f85377a, false)) {
            Bundle a2 = DataFactory.a(IPCConstants.ba, "", 0, null);
            a2.putInt("banner_msg", Conversation.I);
            Bundle bundle = new Bundle();
            if (TextUtils.isEmpty(str)) {
                str = "标题为空";
            }
            bundle.putString("tips", str);
            bundle.putString("iconURL", str2);
            bundle.putInt("icon", i2);
            bundle.putInt("timeout", 900000);
            bundle.putString("url", this.f34672o);
            bundle.putString("activity", str3);
            bundle.putInt("flags", 335544320);
            a2.putBundle("barInfo", bundle);
            WebIPCOperator.a().b(a2);
            Intent intent = new Intent();
            intent.setClass(getActivity(), SplashActivity.class);
            intent.setFlags(335544320);
            intent.putExtra("tab_index", MainFragment.f85178b);
            intent.putExtra(SplashActivity.f11216c, 1);
            startActivity(intent);
        }
    }

    public void E() {
        if (!TextUtils.isEmpty(this.f34642a.getUrl()) && this.f34654a != null) {
            this.f34654a.f34889c = false;
            this.f34654a.f34912p = System.currentTimeMillis();
            this.f34642a.reload();
            this.f34642a.setOnCustomScrollChangeListener(null);
            this.f34654a.a(this.f34642a, this.f34642a.getUrl(), 1, 0, 0, 0, 0, null);
            return;
        }
        String currentUrl = getCurrentUrl();
        if (!TextUtils.isEmpty(currentUrl) && this.f34654a != null) {
            this.f34654a.f34889c = false;
            this.f34654a.f34912p = System.currentTimeMillis();
            this.f34642a.loadUrl(currentUrl);
            this.f34654a.a(this.f34642a, currentUrl, 1, 0, 0, 0, 0, null);
        }
    }
}