From b6b2a25dbe721c3b34292995f11ff11b9d38e2e3 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Tue, 15 Sep 2015 23:01:55 -0400 Subject: [PATCH] Reduce unnecessary public visibility on internally used variables --- .../activity/ThemableBrowserActivity.java | 2 +- .../browser/lightning/constant/BookmarkPage.java | 14 +++++++------- .../acr/browser/lightning/constant/StartPage.java | 8 ++++---- .../browser/lightning/utils/DownloadImageTask.java | 10 +++++----- .../java/acr/browser/lightning/utils/UrlUtils.java | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java index a09c20b..88a01dc 100644 --- a/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java @@ -37,7 +37,7 @@ public abstract class ThemableBrowserActivity extends AppCompatActivity { } } - public boolean isTablet() { + boolean isTablet() { return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE; } 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 6137cc1..67c1765 100644 --- a/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java @@ -20,7 +20,7 @@ import acr.browser.lightning.utils.Utils; public final class BookmarkPage { - public static final String HEADING = "\n" + + private static final String HEADING = "\n" + "\n" + "\n" + "\n" + @@ -33,21 +33,21 @@ public final class BookmarkPage { "width:130px;font-size: small;font-family: Arial, Helvetica, 'sans-serif';white-space:nowrap;overflow:hidden;text-align:left;vertical-align:middle;margin:auto;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}.box a{width:100%;height:100%;position:absolute;left:0;top:0}img{vertical-align:middle;margin-right:10px;width:20px;height:20px;}.margin{margin:10px}\n" + "
"; - public static final String PART1 = "
"; + private static final String PART5 = "

"; - public static final String END = ""; + private static final String END = ""; @Inject BookmarkManager manager; diff --git a/app/src/main/java/acr/browser/lightning/constant/StartPage.java b/app/src/main/java/acr/browser/lightning/constant/StartPage.java index 118696f..35b5453 100644 --- a/app/src/main/java/acr/browser/lightning/constant/StartPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/StartPage.java @@ -16,9 +16,9 @@ import acr.browser.lightning.utils.Utils; public class StartPage { - public static final String FILENAME = "homepage.html"; + private static final String FILENAME = "homepage.html"; - public static final String HEAD = "" + private static final String HEAD = "" + "" + "" + "" @@ -41,11 +41,11 @@ public class StartPage { + "font-size: 12px;-moz-border-radius: 2px;-webkit-border-radius: 2px;" + "border-radius: 2px;}


" + private static final String MIDDLE = "\" >

" + "" + "


"; + private static final String END = "\" + document.getElementById(\"search_input\").value;document.getElementById(\"search_input\").value = \"\";}return false;}"; /** * This method builds the homepage and returns the local URL to be loaded diff --git a/app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java b/app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java index 3d1eecc..918fdee 100644 --- a/app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java +++ b/app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java @@ -23,11 +23,11 @@ import acr.browser.lightning.database.HistoryItem; */ public class DownloadImageTask extends AsyncTask { - final ImageView bmImage; - final HistoryItem mWeb; - final File mCacheDir; - final String mUrl; - final Bitmap mDefaultBitmap; + private final ImageView bmImage; + private final HistoryItem mWeb; + private final File mCacheDir; + private final String mUrl; + private final Bitmap mDefaultBitmap; public DownloadImageTask(@NonNull ImageView bmImage, @NonNull HistoryItem web, @NonNull Bitmap defaultBitmap) { diff --git a/app/src/main/java/acr/browser/lightning/utils/UrlUtils.java b/app/src/main/java/acr/browser/lightning/utils/UrlUtils.java index 80a0227..1cb5b9b 100644 --- a/app/src/main/java/acr/browser/lightning/utils/UrlUtils.java +++ b/app/src/main/java/acr/browser/lightning/utils/UrlUtils.java @@ -25,7 +25,7 @@ import java.util.regex.Pattern; * Utility methods for Url manipulation */ public class UrlUtils { - static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile( + private static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile( "(?i)" + // switch on case insensitive matching '(' + // begin group for schema "(?:http|https|file):\\/\\/" +