Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Commit

Permalink
Correct api targetting problem for executors in ui spicelist
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed Jan 13, 2014
1 parent 69424ae commit 8e87a20
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Executors;

import roboguice.util.temp.Ln;
import android.content.Context;
Expand All @@ -19,6 +18,7 @@
import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable;
import android.os.AsyncTask;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
Expand Down Expand Up @@ -232,7 +232,11 @@ protected void loadBitmapAsynchronously(final T octo, final ImageView thumbImage
final AsyncDrawable asyncDrawable = new AsyncDrawable(getContext().getResources(), task);
thumbImageView.setImageDrawable(asyncDrawable);
thumbImageView.setTag(tempThumbnailImageFileName);
task.executeOnExecutor(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()), tempThumbnailImageFileName);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, tempThumbnailImageFileName);
} else {
task.execute(tempThumbnailImageFileName);
}
}
}

Expand Down

0 comments on commit 8e87a20

Please sign in to comment.