diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-12-16 00:43:54 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-12-16 13:19:51 -0800 |
commit | 39772c83f8e210eed1186b66f5f4841aa41776ee (patch) | |
tree | 3c9f12f58abd9ca8d69e4d8017d33e11bdeb76b9 /src/com/android | |
parent | a8ea44cd72f651463bdc90b36a11d32633dcc983 (diff) | |
download | packages_apps_Browser-39772c83f8e210eed1186b66f5f4841aa41776ee.zip packages_apps_Browser-39772c83f8e210eed1186b66f5f4841aa41776ee.tar.gz packages_apps_Browser-39772c83f8e210eed1186b66f5f4841aa41776ee.tar.bz2 |
Prepare for some changes to LoaderManager/Loader.
Sorry it is a bit ugly, it is to allow this change to be
checked in prior to the first stage of the framework change
without breaking the build.
Change-Id: I1357b8ee60a9880608069340c1e4e9e0275bee7a
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 8 | ||||
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 10 | ||||
-rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 3 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index ecd038f..262884b 100644 --- a/src/com/android/browser/AddBookmarkPage.java +++ b/src/com/android/browser/AddBookmarkPage.java @@ -410,6 +410,14 @@ public class AddBookmarkPage extends Activity } } + public void onLoaderReset(Loader<Cursor> loader) { + switch (loader.getId()) { + case LOADER_ID_FOLDER_CONTENTS: + mAdapter.changeCursor(null); + break; + } + } + /** * Move cursor to the position that has folderToFind as its "_id". * @param cursor Cursor containing folders in the bookmarks database diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java index c39218c..3fc270e 100644 --- a/src/com/android/browser/BrowserBookmarksPage.java +++ b/src/com/android/browser/BrowserBookmarksPage.java @@ -231,6 +231,16 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte } } + public void onLoaderReset(Loader<Cursor> loader) { + onLoadFinished(loader, null); + switch (loader.getId()) { + case LOADER_BOOKMARKS: { + onLoadFinished(loader, null); + break; + } + } + } + long getFolderId() { LoaderManager manager = getLoaderManager(); BookmarksLoader loader = diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index c623012..01e3c21 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -183,6 +183,9 @@ public class BrowserHistoryPage extends Fragment } } + public void onLoaderReset(Loader<Cursor> loader) { + } + @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); |