Reduce unnecessary public visibility on internally used variables
This commit is contained in:
parent
9a2ed38440
commit
b6b2a25dbe
@ -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;
|
return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import acr.browser.lightning.utils.Utils;
|
|||||||
|
|
||||||
public final class BookmarkPage {
|
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" +
|
"<head>\n" +
|
||||||
"<meta content=en-us http-equiv=Content-Language />\n" +
|
"<meta content=en-us http-equiv=Content-Language />\n" +
|
||||||
"<meta content='text/html; charset=utf-8' http-equiv=Content-Type />\n" +
|
"<meta content='text/html; charset=utf-8' http-equiv=Content-Type />\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}</style>\n" +
|
"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>";
|
"<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=margin>\n" +
|
||||||
"<div class=box-content>\n" +
|
"<div class=box-content>\n" +
|
||||||
"<p class=ellipses>\n" +
|
"<p class=ellipses>\n" +
|
||||||
"<img src='";
|
"<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
|
@Inject
|
||||||
BookmarkManager manager;
|
BookmarkManager manager;
|
||||||
|
@ -16,9 +16,9 @@ import acr.browser.lightning.utils.Utils;
|
|||||||
|
|
||||||
public class StartPage {
|
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>"
|
+ "<head>"
|
||||||
+ "<meta content=\"en-us\" http-equiv=\"Content-Language\" />"
|
+ "<meta content=\"en-us\" http-equiv=\"Content-Language\" />"
|
||||||
+ "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />"
|
+ "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />"
|
||||||
@ -41,11 +41,11 @@ public class StartPage {
|
|||||||
+ "font-size: 12px;-moz-border-radius: 2px;-webkit-border-radius: 2px;"
|
+ "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=\"";
|
+ "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\" >"
|
+ "<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 = \"";
|
+ "</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
|
* This method builds the homepage and returns the local URL to be loaded
|
||||||
|
@ -23,11 +23,11 @@ import acr.browser.lightning.database.HistoryItem;
|
|||||||
*/
|
*/
|
||||||
public class DownloadImageTask extends AsyncTask<Void, Void, Bitmap> {
|
public class DownloadImageTask extends AsyncTask<Void, Void, Bitmap> {
|
||||||
|
|
||||||
final ImageView bmImage;
|
private final ImageView bmImage;
|
||||||
final HistoryItem mWeb;
|
private final HistoryItem mWeb;
|
||||||
final File mCacheDir;
|
private final File mCacheDir;
|
||||||
final String mUrl;
|
private final String mUrl;
|
||||||
final Bitmap mDefaultBitmap;
|
private final Bitmap mDefaultBitmap;
|
||||||
|
|
||||||
public DownloadImageTask(@NonNull ImageView bmImage, @NonNull HistoryItem web,
|
public DownloadImageTask(@NonNull ImageView bmImage, @NonNull HistoryItem web,
|
||||||
@NonNull Bitmap defaultBitmap) {
|
@NonNull Bitmap defaultBitmap) {
|
||||||
|
@ -25,7 +25,7 @@ import java.util.regex.Pattern;
|
|||||||
* Utility methods for Url manipulation
|
* Utility methods for Url manipulation
|
||||||
*/
|
*/
|
||||||
public class UrlUtils {
|
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
|
"(?i)" + // switch on case insensitive matching
|
||||||
'(' + // begin group for schema
|
'(' + // begin group for schema
|
||||||
"(?:http|https|file):\\/\\/" +
|
"(?:http|https|file):\\/\\/" +
|
||||||
|
Loading…
Reference in New Issue
Block a user