diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-05-21 13:00:19 -0700 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-05-21 14:49:26 -0700 |
| commit | 725815f455992fbedd7088c78cb1ee64b3ddc74b (patch) | |
| tree | 98602b16ddcba4638feb099ca13386bc707ccb98 /src/com | |
| parent | b7e86a19725f7ebf93c78d613bd610212f072779 (diff) | |
| download | packages_apps_Browser-725815f455992fbedd7088c78cb1ee64b3ddc74b.tar.gz packages_apps_Browser-725815f455992fbedd7088c78cb1ee64b3ddc74b.tar.bz2 packages_apps_Browser-725815f455992fbedd7088c78cb1ee64b3ddc74b.zip | |
Do not display unvisited sites in the history.
Fix for issue 1831854: An unvisited, bookmarked site
shows up in the history under "1 month ago". This is
because although the site will be in the database with
a visited date of 0, it has some visits, so that it
will raise its priority in other lists. Now, ignore
any sites with a visited date of 0 (or less) in the
history page. Make the HistoryAdapter's member
variables private, and make the where clause final.
modified: src/com/android/browser/BrowserHistoryPage.java
modified: src/com/android/browser/BrowserHistoryPage.java
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index 368decf00..2b781a1f6 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -267,18 +267,25 @@ public class BrowserHistoryPage extends ExpandableListActivity { // Array for each of our bins. Each entry represents how many items are // in that bin. - int mItemMap[]; + private int mItemMap[]; // This is our GroupCount. We will have at most DateSorter.DAY_COUNT // bins, less if the user has no items in one or more bins. - int mNumberOfBins; - Vector<DataSetObserver> mObservers; - Cursor mCursor; + private int mNumberOfBins; + private Vector<DataSetObserver> mObservers; + private Cursor mCursor; HistoryAdapter() { mObservers = new Vector<DataSetObserver>(); - String whereClause = Browser.BookmarkColumns.VISITS + " > 0 "; - String orderBy = Browser.BookmarkColumns.DATE + " DESC"; + final String whereClause = Browser.BookmarkColumns.VISITS + " > 0" + // In AddBookmarkPage, where we save new bookmarks, we add + // three visits to newly created bookmarks, so that + // bookmarks that have not been visited will show up in the + // most visited, and higher in the goto search box. + // However, this puts the site in the history, unless we + // ignore sites with a DATE of 0, which the next line does. + + " AND " + Browser.BookmarkColumns.DATE + " > 0"; + final String orderBy = Browser.BookmarkColumns.DATE + " DESC"; mCursor = managedQuery( Browser.BOOKMARKS_URI, |
