You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/04/16 06:17:55 UTC

[GitHub] [cordova-android] erisu commented on a change in pull request #1137: breaking: implement WebViewAssetLoader

erisu commented on a change in pull request #1137:
URL: https://github.com/apache/cordova-android/pull/1137#discussion_r614585850



##########
File path: framework/build.gradle
##########
@@ -152,3 +152,7 @@ bintray {
         }
     }
 }
+
+dependencies {
+    implementation 'androidx.webkit:webkit:1.3.0'
+}

Review comment:
       ```suggestion
   }
   
   ```
   
   I think we always add a new line to the end of our files. But not sure about the gradle extension files.

##########
File path: framework/src/org/apache/cordova/PluginManager.java
##########
@@ -577,4 +580,19 @@ public Bundle onSaveInstanceState() {
         }
         return state;
     }
+
+    /**
+     * Collect all plugins PathHandlers
+     * @return list of PathHandlers in no particular order
+     *

Review comment:
       ```suggestion
        * Collect all plugins PathHandlers
        *
        * @return list of PathHandlers in no particular order
   ```
   
   Move new line above or delete new line.

##########
File path: framework/src/org/apache/cordova/CordovaWebViewImpl.java
##########
@@ -117,7 +117,7 @@ public void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, Cord
 
         pluginManager.addService(CoreAndroid.PLUGIN_NAME, "org.apache.cordova.CoreAndroid");
         pluginManager.init();
-
+        

Review comment:
       ```suggestion
   ```
   
   Delete this line

##########
File path: framework/src/org/apache/cordova/engine/SystemWebViewClient.java
##########
@@ -64,6 +71,53 @@ Licensed to the Apache Software Foundation (ASF) under one
 
     public SystemWebViewClient(SystemWebViewEngine parentEngine) {
         this.parentEngine = parentEngine;
+
+        WebViewAssetLoader.Builder assetLoaderBuilder = new WebViewAssetLoader.Builder()
+                .setDomain(parentEngine.preferences.getString("hostname", "localhost"))
+                .setHttpAllowed(true);
+                
+
+
+        assetLoaderBuilder.addPathHandler("/", path -> {

Review comment:
       ```suggestion
                   .setHttpAllowed(true);
   
           assetLoaderBuilder.addPathHandler("/", path -> {
   ```
   
   To many new lines




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org