diff options
author | John Reck <jreck@google.com> | 2011-07-11 17:44:43 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-07-11 17:44:43 -0700 |
commit | e890c903edc8b0eb0f54649f65f6d11a2b9ba009 (patch) | |
tree | 64bbbde368546c2517288f1d6be25d5f3011dabc | |
parent | 9bcdcf6d0310b65d6582c72d183edb3e2632f3eb (diff) | |
download | packages_apps_Browser-e890c903edc8b0eb0f54649f65f6d11a2b9ba009.zip packages_apps_Browser-e890c903edc8b0eb0f54649f65f6d11a2b9ba009.tar.gz packages_apps_Browser-e890c903edc8b0eb0f54649f65f6d11a2b9ba009.tar.bz2 |
Clear recents folder when changing account
Bug: 4971707
Change-Id: I20fa1fdbf0f832af0b36c81ebba17decbc9a5811
-rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 1 | ||||
-rw-r--r-- | src/com/android/browser/addbookmark/FolderSpinnerAdapter.java | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index f330cd5..32db550 100644 --- a/src/com/android/browser/AddBookmarkPage.java +++ b/src/com/android/browser/AddBookmarkPage.java @@ -959,6 +959,7 @@ public class AddBookmarkPage extends Activity long root = mAccountAdapter.getItem(position).rootFolderId; if (root != mRootFolder) { onRootFolderFound(root); + mFolderAdapter.clearRecentFolder(); } } } diff --git a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java index 67563c0..f86c9c6 100644 --- a/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java +++ b/src/com/android/browser/addbookmark/FolderSpinnerAdapter.java @@ -154,4 +154,10 @@ public class FolderSpinnerAdapter extends BaseAdapter { notifyDataSetChanged(); } + public void clearRecentFolder() { + if (mIncludesRecentFolder) { + mIncludesRecentFolder = false; + notifyDataSetChanged(); + } + } } |