.newFixedThreadPool(threadCount + 1);
// 线程池的创建服务器
Runnable calculateBitmapWorker = new Runnable() {
@Override
public void run() {
Bitmap thumb = null;
try {
if (isThumbPath) {
thumb = BitmapFactory.decodeFile(thumbPath);
if (null == thumb) {
thumb = revitionImageSize(sourcePath);
}
} else {
thumb = revitionImageSize(sourcePath);
}
} catch (Exception e) {
}
if (null == thumb) {
thumb = PickPhotoActivity.bimap;
}
put(path, thumb);
final Bitmap bmpToCallback = thumb;
if (null != callback) {
handler.post(new Runnable() {
@Override
public void run() {
callback.imageLoad(iv, bmpToCallback, sourcePath);
}
});
}
}
};
executorService.execute(calculateBitmapWorker);