Trip On v2.1.2版本的 MD5 值为:55953a6deb5e434bd7a356ea51d31456
以下内容为反编译后的 DCWXWebView.java 源代码,内容仅作参考
package io.dcloud.feature.weex.adapter.webview;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.GeolocationPermissions;
import android.webkit.JavascriptInterface;
import android.webkit.JsPromptResult;
import android.webkit.PermissionRequest;
import android.webkit.SslErrorHandler;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import androidx.core.content.FileProvider;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.dcloud.android.widget.DCWebViewProgressBar;
import com.dcloud.zxing2.common.StringUtils;
import com.taobao.weex.el.parse.Operators;
import com.taobao.weex.ui.view.IWebView;
import com.taobao.weex.utils.WXLogUtils;
import io.dcloud.base.R;
import io.dcloud.common.DHInterface.IActivityDelegate;
import io.dcloud.common.DHInterface.IActivityHandler;
import io.dcloud.common.DHInterface.IApp;
import io.dcloud.common.DHInterface.IWebview;
import io.dcloud.common.adapter.ui.FileChooseDialog;
import io.dcloud.common.adapter.ui.webview.WebViewFactory;
import io.dcloud.common.adapter.util.DeviceInfo;
import io.dcloud.common.adapter.util.PermissionUtil;
import io.dcloud.common.ui.blur.AppEventForBlurManager;
import io.dcloud.common.util.PdrUtil;
import io.dcloud.feature.weex.WeexInstanceMgr;
import io.dcloud.feature.weex.adapter.webview.WXDCWeb;
import io.dcloud.feature.weex.adapter.webview.video.FullscreenHolder;
import io.src.dcloud.adapter.DCloudAdapterUtil;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.HashMap;
public class DCWXWebView implements IDCWebView {
private static final String BRIDGE_NAME = "__dcloud_weex_";
private static final int POST_MESSAGE = 1;
private static final int POST_MESSAGE_TO_CONTROL = 2;
private static final int SDK_VERSION = Build.VERSION.SDK_INT;
DCWXChromeClient chromeClient;
private View customView;
private WebChromeClient.CustomViewCallback customViewCallback;
private FrameLayout fullscreenContainer;
private Context mContext;
private WeakReference<WXDCWeb> mDCWeb;
private String mDefUserAgent;
private Handler mMessageHandler;
private IWebView.OnErrorListener mOnErrorListener;
private WXDCWeb.OnDCMessageListener mOnMessageListener;
private IWebView.OnPageListener mOnPageListener;
private String mOrigin;
private FrameLayout mRootView;
String mSslType;
private DCWebViewProgressBar mWebProgressView;
private WebView mWebView;
private boolean mShowLoading = true;
public int mProgress = 0;
private boolean isStart = false;
private int defaultSystemUI = 0;
@Override
public void setOnMessageListener(IWebView.OnMessageListener listener) {
}
public DCWXWebView(Context context, String origin, WXDCWeb wxdcWeb) {
this.mSslType = "refuse";
this.mContext = context;
this.mOrigin = origin;
this.mDCWeb = new WeakReference<>(wxdcWeb);
IWebview findWebview = WeexInstanceMgr.self().findWebview(wxdcWeb.getInstance());
if (findWebview == null || findWebview.obtainApp() == null) {
return;
}
this.mSslType = findWebview.obtainApp().obtainConfigProperty(IApp.ConfigProperty.CONFIG_UNTRUSTEDCA);
}
@Override
public View getView() {
FrameLayout frameLayout = new FrameLayout(this.mContext);
this.mRootView = frameLayout;
frameLayout.setBackgroundColor(-1);
this.mWebView = new WebView(this.mContext) {
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
AppEventForBlurManager.onScrollChanged(l, t);
}
};
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
layoutParams.gravity = 17;
this.mWebView.setLayoutParams(layoutParams);
this.mRootView.addView(this.mWebView);
this.mWebView.setBackgroundColor(0);
initWebView(this.mWebView);
this.mMessageHandler = new MessageHandler();
return this.mRootView;
}
@Override
public void destroy() {
if (getWebView() != null) {
hideCustomView();
getWebView().setWebViewClient(null);
getWebView().setWebChromeClient(null);
getWebView().removeAllViews();
getWebView().destroy();
this.mWebView = null;
this.mDCWeb.clear();
this.mOnMessageListener = null;
this.mWebProgressView = null;
this.mOnPageListener = null;
this.mOnErrorListener = null;
}
}
@Override
public void loadUrl(String url) {
if (getWebView() == null) {
return;
}
getWebView().loadUrl(url);
}
@Override
public void loadDataWithBaseURL(String source) {
if (getWebView() == null) {
return;
}
getWebView().loadDataWithBaseURL(this.mOrigin, source, "text/html", "utf-8", null);
}
@Override
public void reload() {
if (getWebView() == null) {
return;
}
getWebView().reload();
}
@Override
public void goBack() {
if (getWebView() == null) {
return;
}
getWebView().goBack();
}
@Override
public void goForward() {
if (getWebView() == null) {
return;
}
getWebView().goForward();
}
@Override
public void postMessage(Object msg) {
if (getWebView() == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("type", (Object) "message");
jSONObject.put("data", msg);
evaluateJS("javascript:(function () {var initData = " + jSONObject.toString() + ";try {var event = new MessageEvent('onPostMessage', initData);window.dispatchEvent(event);} catch (e) {}})();");
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@Override
public void setShowLoading(boolean shown) {
this.mShowLoading = shown;
}
@Override
public void setOnErrorListener(IWebView.OnErrorListener listener) {
this.mOnErrorListener = listener;
}
@Override
public void setOnPageListener(IWebView.OnPageListener listener) {
this.mOnPageListener = listener;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
DCWXChromeClient dCWXChromeClient = this.chromeClient;
if (dCWXChromeClient != null) {
dCWXChromeClient.onResult(requestCode, resultCode, data);
}
}
public void setOnDCMessageListener(WXDCWeb.OnDCMessageListener listener) {
this.mOnMessageListener = listener;
}
private void showWebView(boolean shown) {
this.mWebView.setVisibility(shown ? 0 : 4);
}
@Override
public WebView getWebView() {
return this.mWebView;
}
@Override
public void setUserAgent(String ua, boolean overwrite) {
WebView webView = this.mWebView;
if (webView != null) {
WebSettings settings = webView.getSettings();
if (!overwrite) {
if (TextUtils.isEmpty(this.mDefUserAgent)) {
this.mDefUserAgent = settings.getUserAgentString();
}
ua = ua + this.mDefUserAgent + Operators.SPACE_STR + ua;
}
settings.setUserAgentString(ua);
}
}
private void initWebView(WebView wv) {
WebSettings settings = wv.getSettings();
WebViewFactory.openJSEnabled(settings, null);
settings.setAppCacheEnabled(true);
settings.setUseWideViewPort(true);
settings.setDomStorageEnabled(true);
settings.setSupportZoom(false);
settings.setAllowFileAccess(false);
settings.setBuiltInZoomControls(false);
settings.setAllowContentAccess(true);
settings.setSavePassword(false);
if (Build.VERSION.SDK_INT >= 21) {
settings.setMixedContentMode(0);
}
wv.removeJavascriptInterface("searchBoxJavaBridge_");
wv.removeJavascriptInterface("accessibilityTraversal");
wv.removeJavascriptInterface("accessibility");
WebViewFactory.setFileAccess(settings, true);
settings.setDefaultTextEncodingName(StringUtils.GB2312);
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (PdrUtil.isDeviceRootDir(url) || PdrUtil.isNetPath(url) || url.startsWith(DeviceInfo.FILE_PROTOCOL)) {
return false;
}
try {
if (url.startsWith("intent://")) {
Intent parseUri = Intent.parseUri(url, 1);
parseUri.addCategory("android.intent.category.BROWSABLE");
parseUri.setComponent(null);
if (Build.VERSION.SDK_INT >= 15) {
parseUri.setSelector(null);
}
if (DCWXWebView.this.mContext.getPackageManager().queryIntentActivities(parseUri, 0).size() > 0) {
((Activity) DCWXWebView.this.mContext).startActivityIfNeeded(parseUri, -1);
}
} else {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(url));
intent.setFlags(268435456);
DCWXWebView.this.mContext.startActivity(intent);
}
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
WXLogUtils.v("tag", "onPageStarted " + url);
if (DCWXWebView.this.mOnPageListener != null) {
DCWXWebView.this.mOnPageListener.onPageStart(url);
}
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
WXLogUtils.v("tag", "onPageFinished " + url);
if (DCWXWebView.this.isStart) {
DCWXWebView.this.isStart = false;
if (DCWXWebView.this.mWebProgressView != null) {
DCWXWebView.this.mWebProgressView.finishProgress();
}
}
if (DCWXWebView.this.mOnPageListener != null) {
DCWXWebView.this.mOnPageListener.onPageFinish(url, view.canGoBack(), view.canGoForward());
}
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
super.onReceivedError(view, request, error);
if (DCWXWebView.this.mOnErrorListener != null) {
DCWXWebView.this.mOnErrorListener.onError("error", "page error");
}
}
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
super.onReceivedHttpError(view, request, errorResponse);
if (DCWXWebView.this.mOnErrorListener != null) {
DCWXWebView.this.mOnErrorListener.onError("error", "http error");
}
}
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler handler, final SslError error) {
if (PdrUtil.isEquals(DCWXWebView.this.mSslType, "refuse")) {
handler.cancel();
} else if (PdrUtil.isEquals(DCWXWebView.this.mSslType, "warning")) {
Context context = view.getContext();
final AlertDialog create = new AlertDialog.Builder(context).create();
create.setIcon(17301601);
create.setTitle(R.string.dcloud_common_safety_warning);
create.setCanceledOnTouchOutside(false);
String url = Build.VERSION.SDK_INT >= 14 ? error.getUrl() : null;
String string = context.getString(R.string.dcloud_common_certificate_continue);
if (!TextUtils.isEmpty(url)) {
string = url + "\n" + string;
}
create.setMessage(string);
DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == -2) {
create.cancel();
create.dismiss();
} else if (which == -3) {
error.getCertificate().getIssuedBy();
} else if (which == -1) {
WebViewFactory.setSslHandlerState(handler, 1);
create.dismiss();
}
}
};
create.setButton(-2, context.getResources().getString(17039360), onClickListener);
create.setButton(-1, context.getResources().getString(17039370), onClickListener);
create.show();
} else {
WebViewFactory.setSslHandlerState(handler, 1);
}
if (DCWXWebView.this.mOnErrorListener != null) {
DCWXWebView.this.mOnErrorListener.onError("error", "ssl error");
}
}
});
DCWXChromeClient dCWXChromeClient = new DCWXChromeClient();
this.chromeClient = dCWXChromeClient;
wv.setWebChromeClient(dCWXChromeClient);
if (Build.VERSION.SDK_INT > 18) {
wv.addJavascriptInterface(new Object() {
@JavascriptInterface
public void postMessage(String message) {
DCWXWebView.this.onMessage(message, 1);
}
@JavascriptInterface
public void postMessageToService(String message) {
DCWXWebView.this.onMessage(message, 2);
}
}, BRIDGE_NAME);
}
}
public void startWebProgress() {
if (this.mDCWeb.get() == null || this.mDCWeb.get().getHostView() == null) {
return;
}
if (this.mDCWeb.get() == null || this.mDCWeb.get().getWebStyles() == null || this.mDCWeb.get().getWebStyles().getBooleanValue("isProgress")) {
String url = getWebView().getUrl();
if (TextUtils.isEmpty(url) || url.startsWith("file")) {
return;
}
if (this.mWebProgressView == null) {
this.mWebProgressView = new DCWebViewProgressBar(this.mWebView.getContext());
}
int stringToColor = PdrUtil.stringToColor(this.mDCWeb.get().getWebStyles().containsKey("progressColor") ? this.mDCWeb.get().getWebStyles().getString("progressColor") : "#00FF00");
int convertToScreenInt = PdrUtil.convertToScreenInt("2px", this.mWebView.getMeasuredWidth(), 0, this.mWebView.getScale());
this.mWebProgressView.setColorInt(stringToColor);
this.mWebProgressView.setVisibility(0);
this.mWebProgressView.setAlphaInt(255);
if (this.mWebProgressView.getParent() == null) {
this.mRootView.addView(this.mWebProgressView, new ViewGroup.LayoutParams(-1, convertToScreenInt));
}
this.mWebProgressView.startProgress();
}
}
public void onMessage(String message, int type) {
if (message == 0 || this.mOnMessageListener == null) {
return;
}
try {
message = JSON.parse(message);
} catch (Exception unused) {
}
Message message2 = new Message();
message2.what = type;
message2.obj = message;
this.mMessageHandler.sendMessage(message2);
}
private void evaluateJS(String jsStr) {
if (SDK_VERSION < 19) {
this.mWebView.loadUrl(jsStr);
} else {
this.mWebView.evaluateJavascript(jsStr, null);
}
}
private static class MessageHandler extends Handler {
private final WeakReference<DCWXWebView> mWv;
private MessageHandler(DCWXWebView wv) {
this.mWv = new WeakReference<>(wv);
}
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
int i = msg.what;
if (i == 1) {
if (this.mWv.get() == null || this.mWv.get().mOnMessageListener == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("detail", msg.obj);
this.mWv.get().mOnMessageListener.onMessage(hashMap, 1);
} else if (i != 2 || this.mWv.get() == null || this.mWv.get().mOnMessageListener == null) {
} else {
HashMap hashMap2 = new HashMap();
hashMap2.put("data", msg.obj);
this.mWv.get().mOnMessageListener.onMessage(hashMap2, 2);
}
}
}
public class DCWXChromeClient extends WebChromeClient {
FileChooseDialog dialog;
ValueCallback<Uri> mUploadMessage;
ValueCallback<Uri[]> mUploadMessage21Level;
private DCWXChromeClient() {
}
@Override
public void onPermissionRequest(PermissionRequest request) {
request.grant(request.getResources());
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
DCWXWebView.this.mProgress = newProgress;
if (!DCWXWebView.this.isStart && DCWXWebView.this.mProgress < 100) {
DCWXWebView.this.startWebProgress();
DCWXWebView.this.isStart = true;
}
if (DCWXWebView.this.mProgress >= 100 && DCWXWebView.this.isStart) {
DCWXWebView.this.isStart = false;
if (DCWXWebView.this.mWebProgressView != null) {
DCWXWebView.this.mWebProgressView.finishProgress();
}
}
WXLogUtils.v("tag", "onPageProgressChanged " + newProgress);
}
@Override
public void onReceivedTitle(WebView view, String title) {
super.onReceivedTitle(view, title);
if (DCWXWebView.this.mOnPageListener != null) {
DCWXWebView.this.mOnPageListener.onReceivedTitle(view.getTitle());
}
}
@Override
public boolean onJsPrompt(WebView view, String url, String text, String defaultValue, JsPromptResult result) {
return super.onJsPrompt(view, url, text, defaultValue, result);
}
@Override
public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
if (DCWXWebView.this.mContext instanceof Activity) {
PermissionUtil.usePermission((Activity) DCWXWebView.this.mContext, "dc_weexsdk", PermissionUtil.PMS_LOCATION, 2, new PermissionUtil.Request() {
@Override
public void onGranted(String streamPerName) {
callback.invoke(origin, true, false);
}
@Override
public void onDenied(String streamPerName) {
callback.invoke(origin, false, false);
}
});
} else {
super.onGeolocationPermissionsShowPrompt(origin, callback);
}
}
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) {
openFileChooserLogic(webView, null, filePathCallback, fileChooserParams.getAcceptTypes() != null ? fileChooserParams.getAcceptTypes()[0] : null, "");
return true;
}
private void openFileChooserLogic(final WebView webView, final ValueCallback<Uri> uploadMsg, final ValueCallback<Uri[]> uploadMsg21Level, final String acceptType, final String capture) {
if (DCWXWebView.this.mContext == null) {
return;
}
PermissionUtil.usePermission((Activity) DCWXWebView.this.mContext, "dc_weexsdk", PermissionUtil.PMS_STORAGE, 2, new PermissionUtil.Request() {
@Override
public void onDenied(String perName) {
}
@Override
public void onGranted(String perName) {
DCWXChromeClient.this.showOpenFileChooser(webView, uploadMsg, uploadMsg21Level, acceptType, capture);
}
});
}
public void showOpenFileChooser(final WebView webView, ValueCallback<Uri> uploadMsg, ValueCallback<Uri[]> uploadMsg21Level, String acceptType, String capture) {
this.mUploadMessage = uploadMsg;
this.mUploadMessage21Level = uploadMsg21Level;
Intent intent = new Intent("android.intent.action.GET_CONTENT");
intent.addCategory("android.intent.category.OPENABLE");
if (!PdrUtil.isEmpty(acceptType)) {
intent.setType(acceptType);
} else {
intent.setType("*/*");
}
FileChooseDialog fileChooseDialog = new FileChooseDialog(webView.getContext(), (Activity) webView.getContext(), intent);
this.dialog = fileChooseDialog;
try {
fileChooseDialog.show();
this.dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
try {
if (DCWXChromeClient.this.mUploadMessage21Level != null) {
DCWXChromeClient.this.mUploadMessage21Level.onReceiveValue(null);
} else if (DCWXChromeClient.this.mUploadMessage != null) {
DCWXChromeClient.this.mUploadMessage.onReceiveValue(null);
}
} catch (Exception unused) {
}
}
});
} catch (Exception unused) {
}
}
public void onResult(int requestCode, int resultCode, Intent data) {
Uri uri;
FileChooseDialog fileChooseDialog;
Cursor query;
FileChooseDialog fileChooseDialog2 = this.dialog;
if (fileChooseDialog2 != null) {
fileChooseDialog2.dismiss();
if (resultCode != 0) {
if (requestCode != 1) {
if (requestCode == 2 && (fileChooseDialog = this.dialog) != null && fileChooseDialog.uris != null) {
for (File file : this.dialog.uris) {
if (file.exists()) {
uri = FileProvider.getUriForFile(DCWXWebView.this.mContext, DCWXWebView.this.mContext.getPackageName() + ".dc.fileprovider", file);
break;
}
}
}
uri = null;
} else if (data == null) {
ValueCallback<Uri[]> valueCallback = this.mUploadMessage21Level;
if (valueCallback != null) {
valueCallback.onReceiveValue(null);
} else {
ValueCallback<Uri> valueCallback2 = this.mUploadMessage;
if (valueCallback2 != null) {
valueCallback2.onReceiveValue(null);
}
}
this.dialog = null;
return;
} else {
uri = data.getData();
if (uri != null && Build.VERSION.SDK_INT < 29 && "content".equals(uri.getScheme()) && (query = DCWXWebView.this.mContext.getContentResolver().query(uri, new String[]{"_data"}, null, null, null)) != null) {
if (query.moveToFirst()) {
try {
int columnIndexOrThrow = query.getColumnIndexOrThrow("_data");
if (columnIndexOrThrow > -1) {
String string = query.getString(columnIndexOrThrow);
uri = Uri.parse(string);
if (PdrUtil.isEmpty(uri.getScheme())) {
uri = Uri.parse((string.startsWith("/") ? DeviceInfo.FILE_PROTOCOL : "file:///") + string);
}
}
} catch (Exception unused) {
}
}
query.close();
}
}
Uri[] uriArr = uri != null ? new Uri[]{uri} : null;
ValueCallback<Uri[]> valueCallback3 = this.mUploadMessage21Level;
if (valueCallback3 != null) {
valueCallback3.onReceiveValue(uriArr);
} else {
ValueCallback<Uri> valueCallback4 = this.mUploadMessage;
if (valueCallback4 != null) {
valueCallback4.onReceiveValue(uri);
}
}
} else {
ValueCallback<Uri[]> valueCallback5 = this.mUploadMessage21Level;
if (valueCallback5 != null) {
valueCallback5.onReceiveValue(null);
} else {
ValueCallback<Uri> valueCallback6 = this.mUploadMessage;
if (valueCallback6 != null) {
valueCallback6.onReceiveValue(null);
}
}
}
this.dialog = null;
}
}
@Override
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
DCWXWebView.this.showCustomView(view, callback);
}
@Override
public void onHideCustomView() {
DCWXWebView.this.hideCustomView();
}
}
public void showCustomView(View view, WebChromeClient.CustomViewCallback callback) {
if (this.customView != null) {
callback.onCustomViewHidden();
return;
}
Context context = this.mContext;
if (context == null || !(context instanceof Activity)) {
return;
}
Activity activity = (Activity) context;
FrameLayout frameLayout = null;
IActivityHandler iActivityHandler = DCloudAdapterUtil.getIActivityHandler(activity);
if (iActivityHandler != null) {
frameLayout = iActivityHandler.obtainActivityContentView();
iActivityHandler.closeSideBar();
iActivityHandler.setSideBarVisibility(8);
} else if (activity instanceof IActivityDelegate) {
frameLayout = ((IActivityDelegate) activity).obtainActivityContentView();
}
this.mWebView.setVisibility(8);
this.fullscreenContainer = new FullscreenHolder(this.mContext);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
this.fullscreenContainer.addView(view, layoutParams);
frameLayout.addView(this.fullscreenContainer, layoutParams);
this.customView = view;
setStatusBarVisibility(activity, false);
this.customViewCallback = callback;
}
public void hideCustomView() {
Context context;
if (this.customView == null || (context = this.mContext) == null || !(context instanceof Activity)) {
return;
}
setStatusBarVisibility((Activity) context, true);
if (this.fullscreenContainer.getParent() != null) {
((ViewGroup) this.fullscreenContainer.getParent()).removeView(this.fullscreenContainer);
this.fullscreenContainer.removeAllViews();
}
this.fullscreenContainer = null;
this.customView = null;
WebChromeClient.CustomViewCallback customViewCallback = this.customViewCallback;
if (customViewCallback != null) {
customViewCallback.onCustomViewHidden();
this.customViewCallback = null;
}
this.mWebView.setVisibility(0);
}
private void setStatusBarVisibility(Activity activity, boolean visible) {
if (visible) {
activity.getWindow().getDecorView().setSystemUiVisibility(this.defaultSystemUI);
return;
}
this.defaultSystemUI = activity.getWindow().getDecorView().getSystemUiVisibility();
activity.getWindow().getDecorView().setSystemUiVisibility(5894);
}
}