95 lines
2.4 KiB
Smali
95 lines
2.4 KiB
Smali
.class Lcom/squareup/picasso/FileRequestHandler;
|
|
.super Lcom/squareup/picasso/ContentStreamRequestHandler;
|
|
.source "FileRequestHandler.java"
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 31
|
|
invoke-direct {p0, p1}, Lcom/squareup/picasso/ContentStreamRequestHandler;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static a(Landroid/net/Uri;)I
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 43
|
|
new-instance v0, Landroid/media/ExifInterface;
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Landroid/media/ExifInterface;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string p0, "Orientation"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 44
|
|
invoke-virtual {v0, p0, v1}, Landroid/media/ExifInterface;->getAttributeInt(Ljava/lang/String;I)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcom/squareup/picasso/Request;I)Lcom/squareup/picasso/RequestHandler$Result;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 39
|
|
new-instance p2, Lcom/squareup/picasso/RequestHandler$Result;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/FileRequestHandler;->b(Lcom/squareup/picasso/Request;)Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/squareup/picasso/Picasso$LoadedFrom;->DISK:Lcom/squareup/picasso/Picasso$LoadedFrom;
|
|
|
|
iget-object p1, p1, Lcom/squareup/picasso/Request;->d:Landroid/net/Uri;
|
|
|
|
invoke-static {p1}, Lcom/squareup/picasso/FileRequestHandler;->a(Landroid/net/Uri;)I
|
|
|
|
move-result p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p2, v2, v0, v1, p1}, Lcom/squareup/picasso/RequestHandler$Result;-><init>(Landroid/graphics/Bitmap;Ljava/io/InputStream;Lcom/squareup/picasso/Picasso$LoadedFrom;I)V
|
|
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public a(Lcom/squareup/picasso/Request;)Z
|
|
.locals 1
|
|
|
|
const-string v0, "file"
|
|
|
|
.line 35
|
|
iget-object p1, p1, Lcom/squareup/picasso/Request;->d:Landroid/net/Uri;
|
|
|
|
invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|