RequestHandler.java
4 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package com.squareup.picasso;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory.Options;
import android.net.NetworkInfo;
import java.io.IOException;
import java.io.InputStream;
import sy;
public abstract class RequestHandler
{
protected static void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, BitmapFactory.Options paramOptions, Request paramRequest)
{
int i = 1;
if ((paramInt4 > paramInt2) || (paramInt3 > paramInt1))
{
if (paramInt2 != 0) {
break label43;
}
i = (int)Math.floor(paramInt3 / paramInt1);
}
for (;;)
{
paramOptions.inSampleSize = i;
paramOptions.inJustDecodeBounds = false;
return;
label43:
if (paramInt1 == 0)
{
i = (int)Math.floor(paramInt4 / paramInt2);
}
else
{
paramInt2 = (int)Math.floor(paramInt4 / paramInt2);
paramInt1 = (int)Math.floor(paramInt3 / paramInt1);
if (paramRequest.centerInside) {
i = Math.max(paramInt2, paramInt1);
} else {
i = Math.min(paramInt2, paramInt1);
}
}
}
}
public static void a(int paramInt1, int paramInt2, BitmapFactory.Options paramOptions, Request paramRequest)
{
a(paramInt1, paramInt2, paramOptions.outWidth, paramOptions.outHeight, paramOptions, paramRequest);
}
public static boolean a(BitmapFactory.Options paramOptions)
{
return (paramOptions != null) && (paramOptions.inJustDecodeBounds);
}
public static BitmapFactory.Options b(Request paramRequest)
{
boolean bool = paramRequest.hasSize();
if (paramRequest.config != null) {}
for (int i = 1;; i = 0)
{
Object localObject = null;
if ((bool) || (i != 0))
{
BitmapFactory.Options localOptions = new BitmapFactory.Options();
localOptions.inJustDecodeBounds = bool;
localObject = localOptions;
if (i != 0)
{
localOptions.inPreferredConfig = paramRequest.config;
localObject = localOptions;
}
}
return (BitmapFactory.Options)localObject;
}
}
public int a()
{
return 0;
}
public boolean a(NetworkInfo paramNetworkInfo)
{
return false;
}
public boolean b()
{
return false;
}
public abstract boolean canHandleRequest(Request paramRequest);
public abstract Result load(Request paramRequest, int paramInt)
throws IOException;
public static final class Result
{
public final int a;
private final Picasso.LoadedFrom b;
private final Bitmap c;
private final InputStream d;
public Result(Bitmap paramBitmap, Picasso.LoadedFrom paramLoadedFrom)
{
this((Bitmap)sy.a(paramBitmap, "bitmap == null"), null, paramLoadedFrom, 0);
}
public Result(Bitmap paramBitmap, InputStream paramInputStream, Picasso.LoadedFrom paramLoadedFrom, int paramInt)
{
int i;
if (paramBitmap != null)
{
i = 1;
if (paramInputStream == null) {
break label40;
}
}
for (;;)
{
if ((j ^ i) != 0) {
break label46;
}
throw new AssertionError();
i = 0;
break;
label40:
j = 0;
}
label46:
this.c = paramBitmap;
this.d = paramInputStream;
this.b = ((Picasso.LoadedFrom)sy.a(paramLoadedFrom, "loadedFrom == null"));
this.a = paramInt;
}
public Result(InputStream paramInputStream, Picasso.LoadedFrom paramLoadedFrom)
{
this(null, (InputStream)sy.a(paramInputStream, "stream == null"), paramLoadedFrom, 0);
}
public final Bitmap getBitmap()
{
return this.c;
}
public final Picasso.LoadedFrom getLoadedFrom()
{
return this.b;
}
public final InputStream getStream()
{
return this.d;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/picasso/RequestHandler.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/