summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/Browser.java
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-25 17:17:58 +0000
committerBen Murdoch <benm@google.com>2010-11-26 10:10:33 +0000
commitef67165a877b1cd17d4afc6e2e17caa97fc399f2 (patch)
tree718a0a805936360214e65758ea2bce419e81f2fe /src/com/android/browser/Browser.java
parent50438d9205f5bebc9f3cefd8e00ae37850e2eb4d (diff)
downloadandroid_packages_apps_Gello-ef67165a877b1cd17d4afc6e2e17caa97fc399f2.tar.gz
android_packages_apps_Gello-ef67165a877b1cd17d4afc6e2e17caa97fc399f2.tar.bz2
android_packages_apps_Gello-ef67165a877b1cd17d4afc6e2e17caa97fc399f2.zip
Make BrowserSettings.loadFromDb asynchronous
loadFromDb does a lot of disk IO, including accessing SQLite and SharedPreferences. This should not be done on the UI thread. With this patch we move it into an AsyncTask. However there is one caveat with this solution - all settings must be read and sent to WebCore before BrowserActivity.onCreate is called so we must block there if the async task is not complete. This is better than doing the IO on the UI thread though and fixes a load of Browser StrictMode violations. Change-Id: I0ab37ee9e95c682a59d6170a1327ae4ad1deceec
Diffstat (limited to 'src/com/android/browser/Browser.java')
-rw-r--r--src/com/android/browser/Browser.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/browser/Browser.java b/src/com/android/browser/Browser.java
index 7822ec88..97b99672 100644
--- a/src/com/android/browser/Browser.java
+++ b/src/com/android/browser/Browser.java
@@ -57,7 +57,7 @@ public class Browser extends Application {
CookieSyncManager.createInstance(this);
// remove all expired cookies
CookieManager.getInstance().removeExpiredCookie();
- BrowserSettings.getInstance().loadFromDb(this);
+ BrowserSettings.getInstance().asyncLoadFromDb(this);
}
static Intent createBrowserViewIntent() {