diff options
author | John Reck <jreck@google.com> | 2010-11-30 18:14:02 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2010-11-30 18:14:02 -0800 |
commit | 06e49cecf9b2d0dbae6adb637a719d1885bf92a2 (patch) | |
tree | 77cbf99ca8627d7335cc195bf0ff4c78b3756d7f /src/com/android/browser/BrowserHistoryPage.java | |
parent | 7a5cf4714453bd982afc662f373d0c38cddfb023 (diff) | |
download | packages_apps_Browser-06e49cecf9b2d0dbae6adb637a719d1885bf92a2.zip packages_apps_Browser-06e49cecf9b2d0dbae6adb637a719d1885bf92a2.tar.gz packages_apps_Browser-06e49cecf9b2d0dbae6adb637a719d1885bf92a2.tar.bz2 |
Fix IllegalStateException in HistoryPage
Bug: 3228114
Fixes an IllegalStateException caused by the HistoryAdapter and
the most visited cursor.
Change-Id: I85208448f7af82c382be8be9450730420ce51b7a
Diffstat (limited to 'src/com/android/browser/BrowserHistoryPage.java')
-rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index a3ce0b4..5cd9545 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -366,7 +366,10 @@ public class BrowserHistoryPage extends Fragment mMostVisited.close(); } mMostVisited = cursor; - mMostVisited.registerDataSetObserver(mDataSetObserver); + if (mMostVisited != null) { + mMostVisited.registerDataSetObserver(mDataSetObserver); + } + notifyDataSetChanged(); } @Override |