You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
280 lines
5.0 KiB
280 lines
5.0 KiB
.class public abstract Lcom/squareup/picasso/RequestHandler; |
|
.super Ljava/lang/Object; |
|
.source "RequestHandler.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/MemberClasses; |
|
value = { |
|
Lcom/squareup/picasso/RequestHandler$Result; |
|
} |
|
.end annotation |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 44 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method static calculateInSampleSize(IIIILandroid/graphics/BitmapFactory$Options;Lcom/squareup/picasso/Request;)V |
|
.locals 4 |
|
|
|
.prologue |
|
.line 177 |
|
const/4 v0, 0x1 |
|
|
|
.line 178 |
|
if-gt p3, p1, :cond_0 |
|
|
|
if-le p2, p0, :cond_1 |
|
|
|
.line 181 |
|
:cond_0 |
|
if-nez p1, :cond_2 |
|
|
|
.line 182 |
|
int-to-float v0, p2 |
|
|
|
int-to-float v1, p0 |
|
|
|
div-float/2addr v0, v1 |
|
|
|
float-to-double v0, v0 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->floor(D)D |
|
|
|
move-result-wide v0 |
|
|
|
double-to-int v0, v0 |
|
|
|
.line 193 |
|
:cond_1 |
|
:goto_0 |
|
iput v0, p4, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I |
|
|
|
.line 194 |
|
const/4 v0, 0x0 |
|
|
|
iput-boolean v0, p4, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z |
|
|
|
.line 195 |
|
return-void |
|
|
|
.line 183 |
|
:cond_2 |
|
if-nez p0, :cond_3 |
|
|
|
.line 184 |
|
int-to-float v0, p3 |
|
|
|
int-to-float v1, p1 |
|
|
|
div-float/2addr v0, v1 |
|
|
|
float-to-double v0, v0 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->floor(D)D |
|
|
|
move-result-wide v0 |
|
|
|
double-to-int v0, v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 186 |
|
:cond_3 |
|
int-to-float v0, p3 |
|
|
|
int-to-float v1, p1 |
|
|
|
div-float/2addr v0, v1 |
|
|
|
float-to-double v0, v0 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->floor(D)D |
|
|
|
move-result-wide v0 |
|
|
|
double-to-int v0, v0 |
|
|
|
.line 187 |
|
int-to-float v1, p2 |
|
|
|
int-to-float v2, p0 |
|
|
|
div-float/2addr v1, v2 |
|
|
|
float-to-double v2, v1 |
|
|
|
invoke-static {v2, v3}, Ljava/lang/Math;->floor(D)D |
|
|
|
move-result-wide v2 |
|
|
|
double-to-int v1, v2 |
|
|
|
.line 188 |
|
iget-boolean v2, p5, Lcom/squareup/picasso/Request;->centerInside:Z |
|
|
|
if-eqz v2, :cond_4 |
|
|
|
.line 189 |
|
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I |
|
|
|
move-result v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 190 |
|
:cond_4 |
|
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I |
|
|
|
move-result v0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method static calculateInSampleSize(IILandroid/graphics/BitmapFactory$Options;Lcom/squareup/picasso/Request;)V |
|
.locals 6 |
|
|
|
.prologue |
|
.line 171 |
|
iget v2, p2, Landroid/graphics/BitmapFactory$Options;->outWidth:I |
|
|
|
iget v3, p2, Landroid/graphics/BitmapFactory$Options;->outHeight:I |
|
|
|
move v0, p0 |
|
|
|
move v1, p1 |
|
|
|
move-object v4, p2 |
|
|
|
move-object v5, p3 |
|
|
|
invoke-static/range {v0 .. v5}, Lcom/squareup/picasso/RequestHandler;->calculateInSampleSize(IIIILandroid/graphics/BitmapFactory$Options;Lcom/squareup/picasso/Request;)V |
|
|
|
.line 173 |
|
return-void |
|
.end method |
|
|
|
.method static createBitmapOptions(Lcom/squareup/picasso/Request;)Landroid/graphics/BitmapFactory$Options; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 152 |
|
invoke-virtual {p0}, Lcom/squareup/picasso/Request;->hasSize()Z |
|
|
|
move-result v2 |
|
|
|
.line 153 |
|
iget-object v0, p0, Lcom/squareup/picasso/Request;->config:Landroid/graphics/Bitmap$Config; |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
const/4 v0, 0x1 |
|
|
|
move v1, v0 |
|
|
|
.line 154 |
|
:goto_0 |
|
const/4 v0, 0x0 |
|
|
|
.line 155 |
|
if-nez v2, :cond_0 |
|
|
|
if-eqz v1, :cond_1 |
|
|
|
.line 156 |
|
:cond_0 |
|
new-instance v0, Landroid/graphics/BitmapFactory$Options; |
|
|
|
invoke-direct {v0}, Landroid/graphics/BitmapFactory$Options;-><init>()V |
|
|
|
.line 157 |
|
iput-boolean v2, v0, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z |
|
|
|
.line 158 |
|
if-eqz v1, :cond_1 |
|
|
|
.line 159 |
|
iget-object v1, p0, Lcom/squareup/picasso/Request;->config:Landroid/graphics/Bitmap$Config; |
|
|
|
iput-object v1, v0, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config; |
|
|
|
.line 162 |
|
:cond_1 |
|
return-object v0 |
|
|
|
.line 153 |
|
:cond_2 |
|
const/4 v0, 0x0 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method static requiresInSampleSize(Landroid/graphics/BitmapFactory$Options;)Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 166 |
|
if-eqz p0, :cond_0 |
|
|
|
iget-boolean v0, p0, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
:goto_0 |
|
return v0 |
|
|
|
:cond_0 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public abstract canHandleRequest(Lcom/squareup/picasso/Request;)Z |
|
.end method |
|
|
|
.method getRetryCount()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 136 |
|
const/4 v0, 0x0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public abstract load(Lcom/squareup/picasso/Request;I)Lcom/squareup/picasso/RequestHandler$Result; |
|
.end method |
|
|
|
.method shouldRetry(ZLandroid/net/NetworkInfo;)Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 140 |
|
const/4 v0, 0x0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method supportsReplay()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 144 |
|
const/4 v0, 0x0 |
|
|
|
return v0 |
|
.end method
|
|
|