The issue appears to have something to do with extensive
concurrency going on there. For now I am just shrinking
the thread pool to one thread and that seems to be addressing
the problem. Next step will be to redesign the photo loading.
Bug:
2441230
Change-Id: I829bf11c4dd9699719fe556223669d477ebdbfc1
synchronized (ContactsListActivity.this) {
// can't sync on sImageFetchThreadPool.
if (sImageFetchThreadPool == null) {
- // Don't use more than 3 threads at a time to update. The thread pool will be
- // shared by all contact items.
- sImageFetchThreadPool = Executors.newFixedThreadPool(3);
+ // TODO: redesign this so that all DB interaction happens
+ // on a single background thread and loads photos in bulk.
+ sImageFetchThreadPool = Executors.newFixedThreadPool(1);
}
sImageFetchThreadPool.execute(mImageFetcher);
}