diff options
| author | Owen Lin <owenlin@google.com> | 2012-08-16 21:44:23 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-16 21:44:24 -0700 |
| commit | c2b8e1c0906398cbdb5aea6bef67d71f3d36f25c (patch) | |
| tree | d6ad05566f31223796116afc77c7f1ce2e01cc8a /src | |
| parent | 0e90b72790fa85813819937db5b45fae63e2ac77 (diff) | |
| parent | 91055408e94f0a7517971f52290c52f2a75ed52a (diff) | |
| download | android_packages_apps_Gallery2-c2b8e1c0906398cbdb5aea6bef67d71f3d36f25c.tar.gz android_packages_apps_Gallery2-c2b8e1c0906398cbdb5aea6bef67d71f3d36f25c.tar.bz2 android_packages_apps_Gallery2-c2b8e1c0906398cbdb5aea6bef67d71f3d36f25c.zip | |
Merge "Load AsyncTask class in UI thread." into gb-ub-photos-arches
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/app/GalleryAppImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/GalleryAppImpl.java b/src/com/android/gallery3d/app/GalleryAppImpl.java index 0164bce65..9576093a4 100644 --- a/src/com/android/gallery3d/app/GalleryAppImpl.java +++ b/src/com/android/gallery3d/app/GalleryAppImpl.java @@ -20,6 +20,7 @@ import android.app.Application; import android.content.ComponentName; import android.content.Context; import android.content.pm.PackageManager; +import android.os.AsyncTask; import com.android.gallery3d.common.ApiHelper; import com.android.gallery3d.data.DataManager; @@ -48,6 +49,7 @@ public class GalleryAppImpl extends Application implements GalleryApp { public void onCreate() { super.onCreate(); com.android.camera.Util.initialize(this); + initializeAsyncTask(); GalleryUtils.initialize(this); WidgetUtils.initialize(this); PicasaSource.initialize(this); @@ -107,4 +109,13 @@ public class GalleryAppImpl extends Application implements GalleryApp { } return mDownloadCache; } + + private void initializeAsyncTask() { + // AsyncTask class needs to be loaded in UI thread. + // So we load it here to comply the rule. + try { + Class.forName(AsyncTask.class.getName()); + } catch (ClassNotFoundException e) { + } + } } |
