GitToTheHub commented on code in PR #1951:
URL: https://github.com/apache/cordova-android/pull/1951#discussion_r3369499530


##########
framework/src/org/apache/cordova/engine/SystemWebChromeClient.java:
##########
@@ -73,21 +73,16 @@ private interface PermissionListener {
     private PermissionListener permissionListener;
     private static final int FILECHOOSER_RESULTCODE = 5173;
     private static final String LOG_TAG = "SystemWebChromeClient";
-    private long MAX_QUOTA = 100 * 1024 * 1024;
     protected final SystemWebViewEngine parentEngine;
 
     // the video progress view
     private View mVideoProgressView;
 
-    private CordovaDialogsHelper dialogsHelper;
-    private Context appContext;
-
-    private WebChromeClient.CustomViewCallback mCustomViewCallback;
-    private View mCustomView;
+    private final CordovaDialogsHelper dialogsHelper;
 
     public SystemWebChromeClient(SystemWebViewEngine parentEngine) {
         this.parentEngine = parentEngine;
-        appContext = parentEngine.webView.getContext();
+        Context appContext = parentEngine.webView.getContext();
         dialogsHelper = new CordovaDialogsHelper(appContext);

Review Comment:
   I think the temporary variable `appContect` is not needed here and `new 
CordovaDialogsHelper` could be directly called with 
`parentEngine.webView.getContext()`:
   
   ```java
   dialogsHelper = new CordovaDialogsHelper(parentEngine.webView.getContext());
   ```



##########
framework/src/org/apache/cordova/engine/SystemWebChromeClient.java:
##########
@@ -173,6 +160,7 @@ public void onExceededDatabaseQuota(String url, String 
databaseIdentifier, long
             long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
     {
         LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d  
currentQuota: %d  totalUsedQuota: %d", estimatedSize, currentQuota, 
totalUsedQuota);
+        long MAX_QUOTA = 100 * 1024 * 1024;
         quotaUpdater.updateQuota(MAX_QUOTA);

Review Comment:
   I think the variable assignment `MAX_QUOTA` is redundant here. I would 
suggest this code:
   
   ```java
   quotaUpdater.updateQuota(100 * 1024 * 1024);
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to