ImageFileRequestHandler.java
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
*/