@@ -68,9 +68,9 @@ public boolean handleResult(int requestCode, int resultCode, Intent intent) {
6868 Uri [] results = null ;
6969 if (resultCode == Activity .RESULT_OK ) {
7070 if (fileUri != null && getFileSize (fileUri ) > 0 ) {
71- results = new Uri []{ fileUri };
71+ results = new Uri [] { fileUri };
7272 } else if (videoUri != null && getFileSize (videoUri ) > 0 ) {
73- results = new Uri []{ videoUri };
73+ results = new Uri [] { videoUri };
7474 } else if (intent != null ) {
7575 results = getSelectedFiles (intent );
7676 }
@@ -103,7 +103,7 @@ private Uri[] getSelectedFiles(Intent data) {
103103 if (data .getData () != null ) {
104104 String dataString = data .getDataString ();
105105 if (dataString != null ) {
106- return new Uri []{ Uri .parse (dataString )};
106+ return new Uri [] { Uri .parse (dataString ) };
107107 }
108108 }
109109 // we have multiple files selected
@@ -136,9 +136,9 @@ private Uri[] getSelectedFiles(Intent data) {
136136 webViewClient = new BrowserClient () {
137137 @ Override
138138 public void onReceivedSslError (WebView view , SslErrorHandler handler , SslError error ) {
139- if (ignoreSSLErrors ){
139+ if (ignoreSSLErrors ) {
140140 handler .proceed ();
141- }else {
141+ } else {
142142 super .onReceivedSslError (view , handler , error );
143143 }
144144 }
@@ -175,8 +175,8 @@ public void onScroll(int x, int y, int oldx, int oldy) {
175175
176176 webView .setWebViewClient (webViewClient );
177177 webView .setWebChromeClient (new WebChromeClient () {
178- //The undocumented magic method override
179- //Eclipse will swear at you if you try to put @Override here
178+ // The undocumented magic method override
179+ // Eclipse will swear at you if you try to put @Override here
180180 // For Android 3.0+
181181 public void openFileChooser (ValueCallback <Uri > uploadMsg ) {
182182
@@ -199,7 +199,7 @@ public void openFileChooser(ValueCallback uploadMsg, String acceptType) {
199199 FILECHOOSER_RESULTCODE );
200200 }
201201
202- //For Android 4.1
202+ // For Android 4.1
203203 public void openFileChooser (ValueCallback <Uri > uploadMsg , String acceptType , String capture ) {
204204 mUploadMessage = uploadMsg ;
205205 Intent i = new Intent (Intent .ACTION_GET_CONTENT );
@@ -209,7 +209,7 @@ public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, Str
209209
210210 }
211211
212- //For Android 5.0+
212+ // For Android 5.0+
213213 public boolean onShowFileChooser (
214214 WebView webView , ValueCallback <Uri []> filePathCallback ,
215215 FileChooserParams fileChooserParams ) {
@@ -253,7 +253,6 @@ public boolean onShowFileChooser(
253253 return true ;
254254 }
255255
256-
257256 @ Override
258257 public void onProgressChanged (WebView view , int progress ) {
259258 Map <String , Object > args = new HashMap <>();
@@ -355,7 +354,8 @@ private void clearCache() {
355354 private void registerJavaScriptChannelNames (List <String > channelNames ) {
356355 for (String channelName : channelNames ) {
357356 webView .addJavascriptInterface (
358- new JavaScriptChannel (FlutterWebviewPlugin .channel , channelName , platformThreadHandler ), channelName );
357+ new JavaScriptChannel (FlutterWebviewPlugin .channel , channelName , platformThreadHandler ),
358+ channelName );
359359 }
360360 }
361361
@@ -380,8 +380,7 @@ void openUrl(
380380 String invalidUrlRegex ,
381381 boolean geolocationEnabled ,
382382 boolean debuggingEnabled ,
383- boolean ignoreSSLErrors
384- ) {
383+ boolean ignoreSSLErrors ) {
385384 webView .getSettings ().setJavaScriptEnabled (withJavascript );
386385 webView .getSettings ().setBuiltInZoomControls (withZoom );
387386 webView .getSettings ().setSupportZoom (withZoom );
@@ -392,7 +391,7 @@ void openUrl(
392391
393392 webView .getSettings ().setSupportMultipleWindows (supportMultipleWindows );
394393
395- webView .getSettings ().setAppCacheEnabled ( appCacheEnabled );
394+ webView .getSettings ().setCacheMode ( WebSettings . LOAD_DEFAULT );
396395
397396 webView .getSettings ().setAllowFileAccessFromFileURLs (allowFileURLs );
398397 webView .getSettings ().setAllowUniversalAccessFromFileURLs (allowFileURLs );
@@ -407,7 +406,7 @@ void openUrl(
407406 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT ) {
408407 webView .setWebContentsDebuggingEnabled (debuggingEnabled );
409408 }
410- //ignore SSL errors
409+ // ignore SSL errors
411410 this .ignoreSSLErrors = ignoreSSLErrors ;
412411
413412 webViewClient .updateInvalidUrlRegex (invalidUrlRegex );
@@ -533,7 +532,7 @@ boolean canGoForward() {
533532 /**
534533 * Clears cache
535534 */
536- void cleanCache (){
535+ void cleanCache () {
537536 webView .clearCache (true );
538537 }
539538
0 commit comments