Skip to content

Commit 279a678

Browse files
committed
Fixed the formatting
1 parent 1bbd61f commit 279a678

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/WebChromeClientHostApiImpl.java

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,28 @@ public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callb
7272
((ViewGroup) mFullscreenView.getParent()).removeView(mFullscreenView);
7373
}
7474
if (context instanceof Activity) {
75-
Window window = ((Activity)context).getWindow();
75+
Window window = ((Activity) context).getWindow();
7676
mFullscreenView = view;
7777
setFullscreenStatus(true, window);
78-
window.addContentView(mFullscreenView,
79-
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
80-
ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER));
78+
window.addContentView(
79+
mFullscreenView,
80+
new FrameLayout.LayoutParams(
81+
ViewGroup.LayoutParams.MATCH_PARENT,
82+
ViewGroup.LayoutParams.MATCH_PARENT,
83+
Gravity.CENTER));
8184
}
8285
}
8386

8487
@Override
8588
public void onHideCustomView() {
86-
if (mFullscreenView == null) {
87-
return;
88-
}
89-
if (context instanceof Activity) {
90-
setFullscreenStatus(false, ((Activity)context).getWindow());
91-
((ViewGroup) mFullscreenView.getParent()).removeView(mFullscreenView);
92-
mFullscreenView = null;
93-
}
89+
if (mFullscreenView == null) {
90+
return;
91+
}
92+
if (context instanceof Activity) {
93+
setFullscreenStatus(false, ((Activity) context).getWindow());
94+
((ViewGroup) mFullscreenView.getParent()).removeView(mFullscreenView);
95+
mFullscreenView = null;
96+
}
9497
}
9598

9699
@SuppressWarnings("deprecation")
@@ -99,13 +102,11 @@ void activateFullscreenDeprecated(Boolean fullscreen, Window window) {
99102
if (fullscreen) {
100103
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
101104

102-
window.addFlags(
103-
WindowManager.LayoutParams.FLAG_FULLSCREEN);
105+
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
104106
} else {
105107
decorView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);
106108

107-
window.clearFlags(
108-
WindowManager.LayoutParams.FLAG_FULLSCREEN);
109+
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
109110
}
110111
}
111112

@@ -294,6 +295,7 @@ public WebChromeClientHostApiImpl(
294295

295296
/**
296297
* Sets the context to construct {@link WebChromeClientImpl}s.
298+
*
297299
* @param context the new context
298300
*/
299301
public void setContext(Context context) {

packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewFlutterPlugin.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ private void setUp(
107107
new WebChromeClientHostApiImpl.WebChromeClientCreator(),
108108
new WebChromeClientFlutterApiImpl(binaryMessenger, instanceManager),
109109
context);
110-
111110

112111
JavaObjectHostApi.setup(binaryMessenger, new JavaObjectHostApiImpl(instanceManager));
113112
WebViewHostApi.setup(binaryMessenger, webViewHostApi);
@@ -118,9 +117,7 @@ private void setUp(
118117
instanceManager,
119118
new WebViewClientHostApiImpl.WebViewClientCreator(),
120119
new WebViewClientFlutterApiImpl(binaryMessenger, instanceManager)));
121-
WebChromeClientHostApi.setup(
122-
binaryMessenger,
123-
webChromeClientHostApi);
120+
WebChromeClientHostApi.setup(binaryMessenger, webChromeClientHostApi);
124121
DownloadListenerHostApi.setup(
125122
binaryMessenger,
126123
new DownloadListenerHostApiImpl(

0 commit comments

Comments
 (0)