diff --git a/app/build.gradle b/app/build.gradle index ff3f662..56c449f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,11 +10,7 @@ android { minSdkVersion 14 targetSdkVersion 23 versionName "4.3.3" - generatedDensities = [] - } - - aaptOptions { - additionalParameters "--no-version-vectors" + vectorDrawables.useSupportLibrary = true } sourceSets { diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java index 39e409b..69eb221 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java @@ -353,12 +353,13 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements mRefreshIcon = ThemeUtils.getThemedDrawable(this, R.drawable.ic_action_refresh, mDarkTheme); mClearIcon = ThemeUtils.getThemedDrawable(this, R.drawable.ic_action_delete, mDarkTheme); - int iconBounds = Utils.dpToPx(30); + int iconBounds = Utils.dpToPx(24); mDeleteIcon.setBounds(0, 0, iconBounds, iconBounds); mRefreshIcon.setBounds(0, 0, iconBounds, iconBounds); mClearIcon.setBounds(0, 0, iconBounds, iconBounds); mIcon = mRefreshIcon; SearchListenerClass search = new SearchListenerClass(); + mSearch.setCompoundDrawablePadding(Utils.dpToPx(3)); mSearch.setCompoundDrawables(null, null, mRefreshIcon, null); mSearch.setOnKeyListener(search); mSearch.setOnFocusChangeListener(search); @@ -2163,10 +2164,12 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements return; } - if (!mBookmarkManager.isBookmark(url)) { - addBookmark(title, url); - } else { - deleteBookmark(title, url); + if (!UrlUtils.isSpecialUrl(url)) { + if (!mBookmarkManager.isBookmark(url)) { + addBookmark(title, url); + } else { + deleteBookmark(title, url); + } } } diff --git a/app/src/main/java/acr/browser/lightning/async/ImageDownloadTask.java b/app/src/main/java/acr/browser/lightning/async/ImageDownloadTask.java index e229e8f..1b5378a 100644 --- a/app/src/main/java/acr/browser/lightning/async/ImageDownloadTask.java +++ b/app/src/main/java/acr/browser/lightning/async/ImageDownloadTask.java @@ -45,7 +45,7 @@ public class ImageDownloadTask extends AsyncTask { this.mContextReference = new WeakReference<>(context.getApplicationContext()); } - @Nullable + @NonNull @Override protected Bitmap doInBackground(Void... params) { Bitmap mIcon = null; @@ -65,6 +65,9 @@ public class ImageDownloadTask extends AsyncTask { final String hash = String.valueOf(uri.getHost().hashCode()); final File image = new File(cache, hash + ".png"); final String urlDisplay = uri.getScheme() + "://" + uri.getHost() + "/favicon.ico"; + if (Constants.FILE.startsWith(uri.getScheme())) { + return mDefaultBitmap; + } // checks to see if the image exists if (!image.exists()) { FileOutputStream fos = null; diff --git a/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java b/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java index 6e4a02a..7016483 100644 --- a/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java @@ -42,7 +42,7 @@ public final class BookmarkPage extends AsyncTask { private static final String HEADING_2 = "\n" + "\n" + - "\n" + "
"; diff --git a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java index e628e8a..c1a581f 100644 --- a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java @@ -28,7 +28,7 @@ public class HistoryPage extends AsyncTask { private static final String HEADING_1 = ""; - private static final String HEADING_2 = "
"; + private static final String HEADING_2 = "
"; private static final String PART1 = "
{ private static final String HEAD_2 = "" + "" - + "