commit | 73c341f8b174782ab7a42fc4767f67168b6916ee | [log] [tgz] |
---|---|---|
author | Makoto Onuki <omakoto@google.com> | Mon Aug 29 09:31:44 2011 -0700 |
committer | Makoto Onuki <omakoto@google.com> | Mon Aug 29 15:42:27 2011 -0700 |
tree | b8c880f20231c983dcfd58647215e2617e26f5c4 | |
parent | c3429d2a5b95f8717ee7d235841176b8a1567141 [diff] |
Use THREAD_POOL_EXECUTOR when loading a contact Checked other usescases too, but there are no other ones that're obviously changeable. Bug 5224505 Change-Id: I9703400e4a93f18e014fcd0e4386374eb0658548
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java index a28b1db..8a2a6ca 100644 --- a/src/com/android/contacts/ContactLoader.java +++ b/src/com/android/contacts/ContactLoader.java
@@ -1240,7 +1240,7 @@ @Override protected void onForceLoad() { final LoadContactTask task = new LoadContactTask(); - task.execute((Void[])null); + task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[])null); } @Override
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index f22369f..472f701 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -432,7 +432,7 @@ if (result == null) return; photoView.setImageBitmap(result); } - }.execute(); + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null); } final int photoColumnIndex = cursor.getColumnIndex(Photo.PHOTO); final byte[] photoBlob = cursor.getBlob(photoColumnIndex);