mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Fix build with latest SDK tools.
This commit is contained in:
parent
aa798fad85
commit
d6d22a82bc
@ -9,6 +9,7 @@ import java.util.concurrent.RejectedExecutionException;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -96,6 +97,7 @@ public class ContactPictureLoader {
|
|||||||
final int cacheSize = 1024 * 1024 * memClass / 16;
|
final int cacheSize = 1024 * 1024 * memClass / 16;
|
||||||
|
|
||||||
mBitmapCache = new LruCache<String, Bitmap>(cacheSize) {
|
mBitmapCache = new LruCache<String, Bitmap>(cacheSize) {
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
|
||||||
@Override
|
@Override
|
||||||
protected int sizeOf(String key, Bitmap bitmap) {
|
protected int sizeOf(String key, Bitmap bitmap) {
|
||||||
// The cache size will be measured in bytes rather than number of items.
|
// The cache size will be measured in bytes rather than number of items.
|
||||||
@ -266,6 +268,7 @@ public class ContactPictureLoader {
|
|||||||
mAddress = new Address(address);
|
mAddress = new Address(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
public void exec(Void... args) {
|
public void exec(Void... args) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, args);
|
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, args);
|
||||||
|
Loading…
Reference in New Issue
Block a user