diff options
author | Patrick Scott <phanna@android.com> | 2010-04-09 12:43:26 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-04-09 12:58:41 -0400 |
commit | f49ecd60e2363d414d3ff1d9d1a7d3110d741125 (patch) | |
tree | b8163ec9b21cc0e0295f76659dfc2c0252a49805 /src/com/android/browser/BrowserBookmarksAdapter.java | |
parent | 1644ff66d8ede7f4a3a8126d5659be5a4a7d3c32 (diff) | |
download | packages_apps_Browser-f49ecd60e2363d414d3ff1d9d1a7d3110d741125.zip packages_apps_Browser-f49ecd60e2363d414d3ff1d9d1a7d3110d741125.tar.gz packages_apps_Browser-f49ecd60e2363d414d3ff1d9d1a7d3110d741125.tar.bz2 |
Create the bookmark adapter in a background thread.
Handling it asynchronously prevented an ANR but it still took forever with large
databases.
Bug: 2581894
Change-Id: I273375e439d7e3ac048728aabb39c6920fa87e5a
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksAdapter.java')
-rw-r--r-- | src/com/android/browser/BrowserBookmarksAdapter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java index 03e3e5d..241b33b 100644 --- a/src/com/android/browser/BrowserBookmarksAdapter.java +++ b/src/com/android/browser/BrowserBookmarksAdapter.java @@ -28,6 +28,7 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; +import android.os.Looper; import android.provider.Browser; import android.provider.Browser.BookmarkColumns; import android.view.KeyEvent; @@ -551,7 +552,7 @@ class BrowserBookmarksAdapter extends BaseAdapter { private class ChangeObserver extends ContentObserver { public ChangeObserver() { - super(new Handler()); + super(new Handler(Looper.getMainLooper())); } @Override |