Browse Source

Reduce unnecessary public visibility on internally used variables

master
Anthony Restaino 9 years ago
parent
commit
b6b2a25dbe
  1. 2
      app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java
  2. 14
      app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java
  3. 8
      app/src/main/java/acr/browser/lightning/constant/StartPage.java
  4. 10
      app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java
  5. 2
      app/src/main/java/acr/browser/lightning/utils/UrlUtils.java

2
app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java

@ -37,7 +37,7 @@ public abstract class ThemableBrowserActivity extends AppCompatActivity { @@ -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;
}

14
app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java

@ -20,7 +20,7 @@ import acr.browser.lightning.utils.Utils; @@ -20,7 +20,7 @@ import acr.browser.lightning.utils.Utils;
public final class BookmarkPage {
public static final String HEADING = "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml>\n" +
private static final String HEADING = "<!DOCTYPE html><html xmlns=http://www.w3.org/1999/xhtml>\n" +
"<head>\n" +
"<meta content=en-us http-equiv=Content-Language />\n" +
"<meta content='text/html; charset=utf-8' http-equiv=Content-Type />\n" +
@ -33,21 +33,21 @@ public final class BookmarkPage { @@ -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}</style>\n" +
"<body><div id=content>";
public static final String PART1 = "<div class=box><a href='";
private static final String PART1 = "<div class=box><a href='";
public static final String PART2 = "'></a>\n" +
private static final String PART2 = "'></a>\n" +
"<div class=margin>\n" +
"<div class=box-content>\n" +
"<p class=ellipses>\n" +
"<img src='";
public static final String PART3 = "http://www.google.com/s2/favicons?domain=";
private static final String PART3 = "http://www.google.com/s2/favicons?domain=";
public static final String PART4 = "' />";
private static final String PART4 = "' />";
public static final String PART5 = "</p></div></div></div>";
private static final String PART5 = "</p></div></div></div>";
public static final String END = "</div></body></html>";
private static final String END = "</div></body></html>";
@Inject
BookmarkManager manager;

8
app/src/main/java/acr/browser/lightning/constant/StartPage.java

@ -16,9 +16,9 @@ import acr.browser.lightning.utils.Utils; @@ -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 = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\">"
private static final String HEAD = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\">"
+ "<head>"
+ "<meta content=\"en-us\" http-equiv=\"Content-Language\" />"
+ "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />"
@ -41,11 +41,11 @@ public class StartPage { @@ -41,11 +41,11 @@ public class StartPage {
+ "font-size: 12px;-moz-border-radius: 2px;-webkit-border-radius: 2px;"
+ "border-radius: 2px;}</style><body> <div class=\"outer\"><div class=\"middle\"><div class=\"inner\"><img class=\"smaller\" src=\"";
public static final String MIDDLE = "\" ></br></br><form onsubmit=\"return search()\" class=\"search_bar\">"
private static final String MIDDLE = "\" ></br></br><form onsubmit=\"return search()\" class=\"search_bar\">"
+ "<input type=\"submit\" id=\"search_submit\" value=\"Search\" ><span><input class=\"search\" type=\"text\" value=\"\" id=\"search_input\" >"
+ "</span></form></br></br></div></div></div><script type=\"text/javascript\">function search(){if(document.getElementById(\"search_input\").value != \"\"){window.location.href = \"";
public static final String END = "\" + document.getElementById(\"search_input\").value;document.getElementById(\"search_input\").value = \"\";}return false;}</script></body></html>";
private static final String END = "\" + document.getElementById(\"search_input\").value;document.getElementById(\"search_input\").value = \"\";}return false;}</script></body></html>";
/**
* This method builds the homepage and returns the local URL to be loaded

10
app/src/main/java/acr/browser/lightning/utils/DownloadImageTask.java

@ -23,11 +23,11 @@ import acr.browser.lightning.database.HistoryItem; @@ -23,11 +23,11 @@ import acr.browser.lightning.database.HistoryItem;
*/
public class DownloadImageTask extends AsyncTask<Void, Void, Bitmap> {
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) {

2
app/src/main/java/acr/browser/lightning/utils/UrlUtils.java

@ -25,7 +25,7 @@ import java.util.regex.Pattern; @@ -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):\\/\\/" +

Loading…
Cancel
Save