Browser: improve some strings and method

CRs-Fixed: 507953

Change-Id: I5ddc67af01b88a535e7d167173b849b446261d1c
diff --git a/src/com/android/browser/DownloadHandler.java b/src/com/android/browser/DownloadHandler.java
index e3d31cd..15167a0 100644
--- a/src/com/android/browser/DownloadHandler.java
+++ b/src/com/android/browser/DownloadHandler.java
@@ -56,18 +56,6 @@
     private static String mExternalStorage;
     private final static String INVALID_PATH = "/storage";
 
-    /**
-     * Notify the host application a download should be done, or that
-     * the data should be streamed if a streaming viewer is available.
-     * @param activity Activity requesting the download.
-     * @param url The full url to the content that should be downloaded
-     * @param userAgent User agent of the downloading application.
-     * @param contentDisposition Content-disposition http header, if present.
-     * @param mimetype The mimetype of the content reported by the server
-     * @param referer The referer associated with the downloaded url
-     * @param privateBrowsing If the request is coming from a private browsing tab.
-     */
-
     public static void startingDownload(Activity activity,
             String url, String userAgent, String contentDisposition,
             String mimetype, String referer, boolean privateBrowsing, long contentLength,
@@ -126,6 +114,18 @@
         showStartDownloadToast(activity);
     }
 
+    /**
+     * Notify the host application a download should be done, or that
+     * the data should be streamed if a streaming viewer is available.
+     * @param activity Activity requesting the download.
+     * @param url The full url to the content that should be downloaded
+     * @param userAgent User agent of the downloading application.
+     * @param contentDisposition Content-disposition http header, if present.
+     * @param mimetype The mimetype of the content reported by the server
+     * @param referer The referer associated with the downloaded url
+     * @param privateBrowsing If the request is coming from a private browsing tab.
+     */
+
     public static boolean onDownloadStart(final Activity activity, final String url,
             final String userAgent, final String contentDisposition, final String mimetype,
             final String referer, final boolean privateBrowsing, final long contentLength) {
@@ -393,16 +393,13 @@
                 .show();
     }
 
-    public static boolean manageNoEnoughMemory(Activity mContext, long contentLength, String root) {
-        Log.i(LOGTAG, "----------- download file contentLength is ------------>" + contentLength);
+    public static boolean manageNoEnoughMemory(long contentLength, String root) {
         long mAvailableBytes = getAvailableMemory(root);
         if (mAvailableBytes > 0) {
             if (contentLength > mAvailableBytes) {
-                showNoEnoughMemoryDialog(mContext);
                 return true;
             }
         } else {
-            showNoEnoughMemoryDialog(mContext);
             return true;
         }
         return false;
@@ -539,7 +536,7 @@
             defaultStorage = getExternalStorageDirectory(context);
         }
 
-        defaultDownloadPath = defaultStorage + context.getString(R.string.default_savepath_name);
+        defaultDownloadPath = defaultStorage + context.getString(R.string.download_default_path);
         Log.e(LOGTAG, "defaultStorage directory is : " + defaultDownloadPath);
         return defaultDownloadPath;
     }
diff --git a/src/com/android/browser/DownloadSettings.java b/src/com/android/browser/DownloadSettings.java
index c1ddcb6..aecb543 100644
--- a/src/com/android/browser/DownloadSettings.java
+++ b/src/com/android/browser/DownloadSettings.java
@@ -168,9 +168,10 @@
                 DownloadHandler.showNoEnoughMemoryDialog(DownloadSettings.this);
                 return;
             }
-            boolean isNoEnoughMemory = DownloadHandler.manageNoEnoughMemory(DownloadSettings.this,
-                    contentLength, downloadPath);
+            boolean isNoEnoughMemory = DownloadHandler.manageNoEnoughMemory(contentLength,
+                    downloadPath);
             if (isNoEnoughMemory) {
+                DownloadHandler.showNoEnoughMemoryDialog(DownloadSettings.this);
                 return;
             }