Fix Edge Navigation incorrect page index detection

Swiping from the left edge on a new tab before the
page loads, could some times leave edge navigation
in a bad state. This was because there was no
history for that tab.

Also added minor fix for download paths and file names

Change-Id: I94c94363275ceeb59b9d7756e728b535e3eaa32a
diff --git a/src/com/android/browser/DownloadSettings.java b/src/com/android/browser/DownloadSettings.java
index 99be356..0f91a0c 100644
--- a/src/com/android/browser/DownloadSettings.java
+++ b/src/com/android/browser/DownloadSettings.java
@@ -205,7 +205,7 @@
         public void onClick(View v) {
             filenameBase = getFilenameBaseFromUserEnter();
             // check the filename user enter is null or not
-            if (filenameBase.length() <= 0) {
+            if (TextUtils.isEmpty(filenameBase) || TextUtils.isEmpty(downloadPath)) {
                 DownloadHandler.showFilenameEmptyDialog(DownloadSettings.this);
                 return;
             }