Cleanup unused methods

This commit is contained in:
Anthony Restaino 2016-01-24 17:00:46 -05:00
parent 425392456c
commit c19dbe09bb
2 changed files with 5 additions and 41 deletions

View File

@ -35,11 +35,12 @@ import acr.browser.lightning.view.LightningView;
public class TabsManager {
private static final String TAG = TabsManager.class.getSimpleName();
private final List<LightningView> mTabList = new ArrayList<>(1);
private LightningView mCurrentTab;
private static final String BUNDLE_KEY = "WEBVIEW_";
private static final String BUNDLE_STORAGE = "SAVED_TABS.parcel";
private final List<LightningView> mTabList = new ArrayList<>(1);
private LightningView mCurrentTab;
@Inject PreferenceManager mPreferenceManager;
@Inject Bus mEventBus;
@Inject Application mApp;
@ -124,6 +125,7 @@ public class TabsManager {
*/
public synchronized void freeMemory() {
for (LightningView tab : mTabList) {
//noinspection deprecation
tab.freeMemory();
}
}

View File

@ -55,7 +55,6 @@ public class BookmarkManager {
private Map<String, HistoryItem> mBookmarksMap;
private String mCurrentFolder = "";
private final ExecutorService mExecutor;
private boolean mReady = false;
private final File mFilesDir;
@Inject
@ -66,13 +65,6 @@ public class BookmarkManager {
mExecutor.execute(new BookmarkInitializer(context));
}
/**
* @return true if the BookmarkManager was initialized, false otherwise
*/
public boolean isReady() {
return mReady;
}
/**
* Look for bookmark using the url
*
@ -135,7 +127,6 @@ public class BookmarkManager {
Utils.close(inputStream);
}
mBookmarksMap = bookmarks;
mReady = true;
}
}
@ -180,6 +171,7 @@ public class BookmarkManager {
if (success) {
// Overwrite the bookmarks file by renaming the temp file
//noinspection ResultOfMethodCallIgnored
tempFile.renameTo(bookmarksFile);
}
}
@ -417,20 +409,6 @@ public class BookmarkManager {
return mCurrentFolder;
}
/**
* Method is used internally for searching the bookmarks
*
* @return a sorted map of all bookmarks, useful for seeing if a bookmark exists
*/
private Set<String> getBookmarkUrls(List<HistoryItem> list) {
Set<String> set = new HashSet<>();
for (HistoryItem item : mBookmarksMap.values()) {
if (!item.isFolder())
set.add(item.getUrl());
}
return set;
}
/**
* This method returns a list of all folders.
* Folders cannot be empty as they are generated from
@ -513,22 +491,6 @@ public class BookmarkManager {
}
}
/**
* find the index of a bookmark in a list using only its URL
*
* @param list the list to search
* @param url the url to compare
* @return returns the index of the bookmark or -1 if none was found
*/
public static int getIndexOfBookmark(final List<HistoryItem> list, final String url) {
for (int n = 0; n < list.size(); n++) {
if (list.get(n).getUrl().equals(url)) {
return n;
}
}
return -1;
}
/**
* This class sorts bookmarks alphabetically, with folders coming after bookmarks
*/