Last updates for public release 4.0.8a. Updated adblocking hosts and added some default bookmarks for better UX
This commit is contained in:
parent
38d44b8c2f
commit
a6a1baf41b
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="acr.browser.lightning"
|
package="acr.browser.lightning"
|
||||||
android:versionCode="75"
|
android:versionCode="76"
|
||||||
android:versionName="4.0.7a" >
|
android:versionName="4.0.8a" >
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
|
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
|
||||||
|
2934
assets/hosts.txt
2934
assets/hosts.txt
File diff suppressed because it is too large
Load Diff
@ -443,4 +443,17 @@ public class BookmarkManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String[] DEV = {"https://twitter.com/RestainoAnthony", "The Developer"};
|
||||||
|
private static final String[] FACEBOOK = {"https://www.facebook.com/", "Facebook"};
|
||||||
|
private static final String[] TWITTER = {"https://twitter.com", "Twitter"};
|
||||||
|
private static final String[] GOOGLE = {"https://www.google.com/", "Google"};
|
||||||
|
private static final String[] YAHOO = {"https://www.yahoo.com/", "Yahoo"};
|
||||||
|
public static final String[][] DEFAULT_BOOKMARKS = {
|
||||||
|
DEV,
|
||||||
|
FACEBOOK,
|
||||||
|
TWITTER,
|
||||||
|
GOOGLE,
|
||||||
|
YAHOO
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -248,6 +248,16 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
|
|||||||
public void run() {
|
public void run() {
|
||||||
mBookmarkManager = BookmarkManager.getInstance(mActivity.getApplicationContext());
|
mBookmarkManager = BookmarkManager.getInstance(mActivity.getApplicationContext());
|
||||||
mBookmarkList = mBookmarkManager.getBookmarks(true);
|
mBookmarkList = mBookmarkManager.getBookmarks(true);
|
||||||
|
if (mBookmarkList.size() == 0 && mPreferences.getDefaultBookmarks()) {
|
||||||
|
for (String[] array : BookmarkManager.DEFAULT_BOOKMARKS) {
|
||||||
|
HistoryItem bookmark = new HistoryItem(array[0], array[1]);
|
||||||
|
if (mBookmarkManager.addBookmark(bookmark)) {
|
||||||
|
mBookmarkList.add(bookmark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Collections.sort(mBookmarkList, new SortIgnoreCase());
|
||||||
|
mPreferences.setDefaultBookmarks(false);
|
||||||
|
}
|
||||||
mBookmarkAdapter = new BookmarkViewAdapter(mActivity, R.layout.bookmark_list_item,
|
mBookmarkAdapter = new BookmarkViewAdapter(mActivity, R.layout.bookmark_list_item,
|
||||||
mBookmarkList);
|
mBookmarkList);
|
||||||
mDrawerListRight.setAdapter(mBookmarkAdapter);
|
mDrawerListRight.setAdapter(mBookmarkAdapter);
|
||||||
|
@ -43,6 +43,7 @@ public class PreferenceManager {
|
|||||||
public static final String INVERT_COLORS = "invertColors";
|
public static final String INVERT_COLORS = "invertColors";
|
||||||
public static final String READING_TEXT_SIZE = "readingTextSize";
|
public static final String READING_TEXT_SIZE = "readingTextSize";
|
||||||
public static final String DARK_THEME = "darkTheme";
|
public static final String DARK_THEME = "darkTheme";
|
||||||
|
public static final String DEFAULT_BOOKMARKS = "defaultBookmarks";
|
||||||
|
|
||||||
public static final String USE_PROXY = "useProxy";
|
public static final String USE_PROXY = "useProxy";
|
||||||
public static final String USE_PROXY_HOST = "useProxyHost";
|
public static final String USE_PROXY_HOST = "useProxyHost";
|
||||||
@ -95,13 +96,17 @@ public class PreferenceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getColorModeEnabled() {
|
public boolean getColorModeEnabled() {
|
||||||
return mPrefs.getBoolean(Name.ENABLE_COLOR_MODE, true);
|
return mPrefs.getBoolean(Name.ENABLE_COLOR_MODE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getCookiesEnabled() {
|
public boolean getCookiesEnabled() {
|
||||||
return mPrefs.getBoolean(Name.COOKIES, true);
|
return mPrefs.getBoolean(Name.COOKIES, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getDefaultBookmarks() {
|
||||||
|
return mPrefs.getBoolean(Name.DEFAULT_BOOKMARKS, true);
|
||||||
|
}
|
||||||
|
|
||||||
public String getDownloadDirectory() {
|
public String getDownloadDirectory() {
|
||||||
return mPrefs.getString(Name.DOWNLOAD_DIRECTORY, Environment.DIRECTORY_DOWNLOADS);
|
return mPrefs.getString(Name.DOWNLOAD_DIRECTORY, Environment.DIRECTORY_DOWNLOADS);
|
||||||
}
|
}
|
||||||
@ -278,6 +283,10 @@ public class PreferenceManager {
|
|||||||
putBoolean(Name.COOKIES, enable);
|
putBoolean(Name.COOKIES, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDefaultBookmarks(boolean show) {
|
||||||
|
putBoolean(Name.DEFAULT_BOOKMARKS, show);
|
||||||
|
}
|
||||||
|
|
||||||
public void setDownloadDirectory(String directory) {
|
public void setDownloadDirectory(String directory) {
|
||||||
putString(Name.DOWNLOAD_DIRECTORY, directory);
|
putString(Name.DOWNLOAD_DIRECTORY, directory);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user