ImageFileRequestHandler.java 1.08 KB
package com.bitstrips.imoji.persistence;

import android.content.ContentResolver;
import android.content.Context;
import android.net.Uri;
import com.squareup.picasso.Picasso.LoadedFrom;
import com.squareup.picasso.Request;
import com.squareup.picasso.RequestHandler;
import com.squareup.picasso.RequestHandler.Result;
import java.io.FileNotFoundException;

public class ImageFileRequestHandler
  extends RequestHandler
{
  private final Context a;
  
  ImageFileRequestHandler(Context paramContext)
  {
    this.a = paramContext;
  }
  
  public boolean canHandleRequest(Request paramRequest)
  {
    return "file".equals(paramRequest.uri.getScheme());
  }
  
  public RequestHandler.Result load(Request paramRequest, int paramInt)
    throws FileNotFoundException
  {
    return new RequestHandler.Result(this.a.getContentResolver().openInputStream(paramRequest.uri), Picasso.LoadedFrom.DISK);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/persistence/ImageFileRequestHandler.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */