APISonar


com.jude.utils.JUtils.Log

> com > jude > utils > JUtils > Log
com APIs jude APIs utils APIs JUtils APIs Log APIs

Example 1
public static Observable<List<NewRecommendContent>> getRecommendsFromDB(final Context context){
        return Observable.create(new Observable.OnSubscribe<List<NewRecommendContent>>() {
            @Override
            public void call(Subscriber<? super List<NewRecommendContent>> subscriber) {
                JUtils.Log("call Thead: "+Thread.currentThread().toString());
                subscriber.onNext(DBManager.getInstance(context).getRecomendContentfromDB()); ;
            }
        }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
    }
Example 2
public static DataSource<CloseableReference<CloseableImage>> getFrescoCacheBitmap(Context context, String url) {

        ImagePipeline imagePipeline = Fresco.getImagePipeline();
        if (imagePipeline.isInBitmapMemoryCache(Uri.parse(url)) || imagePipeline.isInDiskCacheSync(Uri.parse(url))) {
            ImageRequest imageRequest = ImageRequestBuilder
                    .newBuilderWithSource(Uri.parse(url))
                    .setProgressiveRenderingEnabled(true)
                    .build();
            DataSource<CloseableReference<CloseableImage>>
                    dataSource = imagePipeline.fetchDecodedImage(imageRequest, context);
            return dataSource;
        }
        JUtils.Log("getFrescoCacheBitmap ==null !!");
        return null;
    }