DrawableWrapperGingerbread.java
8.21 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
package android.support.v4.graphics.drawable;
import android.annotation.TargetApi;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff.Mode;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.graphics.drawable.Drawable.ConstantState;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
@TargetApi(9)
@RequiresApi(9)
public class DrawableWrapperGingerbread
extends Drawable
implements Drawable.Callback, DrawableWrapper, TintAwareDrawable
{
static final PorterDuff.Mode a = PorterDuff.Mode.SRC_IN;
protected DrawableWrapperState b;
protected Drawable c;
private int d;
private PorterDuff.Mode e;
private boolean f;
private boolean g;
protected DrawableWrapperGingerbread(@Nullable Drawable paramDrawable)
{
this.b = a();
setWrappedDrawable(paramDrawable);
}
protected DrawableWrapperGingerbread(@NonNull DrawableWrapperState paramDrawableWrapperState, @Nullable Resources paramResources)
{
this.b = paramDrawableWrapperState;
if ((this.b != null) && (this.b.b != null)) {
setWrappedDrawable(this.b.b.newDrawable(paramResources));
}
}
private boolean a(int[] paramArrayOfInt)
{
if (!b()) {}
PorterDuff.Mode localMode;
int i;
do
{
return false;
ColorStateList localColorStateList = this.b.c;
localMode = this.b.d;
if ((localColorStateList == null) || (localMode == null)) {
break;
}
i = localColorStateList.getColorForState(paramArrayOfInt, localColorStateList.getDefaultColor());
} while ((this.f) && (i == this.d) && (localMode == this.e));
setColorFilter(i, localMode);
this.d = i;
this.e = localMode;
this.f = true;
return true;
this.f = false;
clearColorFilter();
return false;
}
@NonNull
public DrawableWrapperState a()
{
return new a(this.b);
}
public boolean b()
{
return true;
}
public void draw(Canvas paramCanvas)
{
this.c.draw(paramCanvas);
}
public int getChangingConfigurations()
{
int j = super.getChangingConfigurations();
if (this.b != null) {}
for (int i = this.b.getChangingConfigurations();; i = 0) {
return i | j | this.c.getChangingConfigurations();
}
}
@Nullable
public Drawable.ConstantState getConstantState()
{
if (this.b != null)
{
if (this.b.b != null) {}
for (int i = 1; i != 0; i = 0)
{
this.b.a = getChangingConfigurations();
return this.b;
}
}
return null;
}
public Drawable getCurrent()
{
return this.c.getCurrent();
}
public int getIntrinsicHeight()
{
return this.c.getIntrinsicHeight();
}
public int getIntrinsicWidth()
{
return this.c.getIntrinsicWidth();
}
public int getMinimumHeight()
{
return this.c.getMinimumHeight();
}
public int getMinimumWidth()
{
return this.c.getMinimumWidth();
}
public int getOpacity()
{
return this.c.getOpacity();
}
public boolean getPadding(Rect paramRect)
{
return this.c.getPadding(paramRect);
}
public int[] getState()
{
return this.c.getState();
}
public Region getTransparentRegion()
{
return this.c.getTransparentRegion();
}
public final Drawable getWrappedDrawable()
{
return this.c;
}
public void invalidateDrawable(Drawable paramDrawable)
{
invalidateSelf();
}
public boolean isStateful()
{
if ((b()) && (this.b != null)) {}
for (ColorStateList localColorStateList = this.b.c; ((localColorStateList != null) && (localColorStateList.isStateful())) || (this.c.isStateful()); localColorStateList = null) {
return true;
}
return false;
}
public Drawable mutate()
{
DrawableWrapperState localDrawableWrapperState;
if ((!this.g) && (super.mutate() == this))
{
this.b = a();
if (this.c != null) {
this.c.mutate();
}
if (this.b != null)
{
localDrawableWrapperState = this.b;
if (this.c == null) {
break label77;
}
}
}
label77:
for (Drawable.ConstantState localConstantState = this.c.getConstantState();; localConstantState = null)
{
localDrawableWrapperState.b = localConstantState;
this.g = true;
return this;
}
}
protected void onBoundsChange(Rect paramRect)
{
if (this.c != null) {
this.c.setBounds(paramRect);
}
}
protected boolean onLevelChange(int paramInt)
{
return this.c.setLevel(paramInt);
}
public void scheduleDrawable(Drawable paramDrawable, Runnable paramRunnable, long paramLong)
{
scheduleSelf(paramRunnable, paramLong);
}
public void setAlpha(int paramInt)
{
this.c.setAlpha(paramInt);
}
public void setChangingConfigurations(int paramInt)
{
this.c.setChangingConfigurations(paramInt);
}
public void setColorFilter(ColorFilter paramColorFilter)
{
this.c.setColorFilter(paramColorFilter);
}
public void setDither(boolean paramBoolean)
{
this.c.setDither(paramBoolean);
}
public void setFilterBitmap(boolean paramBoolean)
{
this.c.setFilterBitmap(paramBoolean);
}
public boolean setState(int[] paramArrayOfInt)
{
boolean bool = this.c.setState(paramArrayOfInt);
return (a(paramArrayOfInt)) || (bool);
}
public void setTint(int paramInt)
{
setTintList(ColorStateList.valueOf(paramInt));
}
public void setTintList(ColorStateList paramColorStateList)
{
this.b.c = paramColorStateList;
a(getState());
}
public void setTintMode(PorterDuff.Mode paramMode)
{
this.b.d = paramMode;
a(getState());
}
public boolean setVisible(boolean paramBoolean1, boolean paramBoolean2)
{
return (super.setVisible(paramBoolean1, paramBoolean2)) || (this.c.setVisible(paramBoolean1, paramBoolean2));
}
public final void setWrappedDrawable(Drawable paramDrawable)
{
if (this.c != null) {
this.c.setCallback(null);
}
this.c = paramDrawable;
if (paramDrawable != null)
{
paramDrawable.setCallback(this);
setVisible(paramDrawable.isVisible(), true);
setState(paramDrawable.getState());
setLevel(paramDrawable.getLevel());
setBounds(paramDrawable.getBounds());
if (this.b != null) {
this.b.b = paramDrawable.getConstantState();
}
}
invalidateSelf();
}
public void unscheduleDrawable(Drawable paramDrawable, Runnable paramRunnable)
{
unscheduleSelf(paramRunnable);
}
public static abstract class DrawableWrapperState
extends Drawable.ConstantState
{
int a;
Drawable.ConstantState b;
ColorStateList c = null;
PorterDuff.Mode d = DrawableWrapperGingerbread.a;
protected DrawableWrapperState(@Nullable DrawableWrapperState paramDrawableWrapperState)
{
if (paramDrawableWrapperState != null)
{
this.a = paramDrawableWrapperState.a;
this.b = paramDrawableWrapperState.b;
this.c = paramDrawableWrapperState.c;
this.d = paramDrawableWrapperState.d;
}
}
public int getChangingConfigurations()
{
int j = this.a;
if (this.b != null) {}
for (int i = this.b.getChangingConfigurations();; i = 0) {
return i | j;
}
}
public Drawable newDrawable()
{
return newDrawable(null);
}
public abstract Drawable newDrawable(@Nullable Resources paramResources);
}
static final class a
extends DrawableWrapperGingerbread.DrawableWrapperState
{
a(@Nullable DrawableWrapperGingerbread.DrawableWrapperState paramDrawableWrapperState)
{
super();
}
public final Drawable newDrawable(@Nullable Resources paramResources)
{
return new DrawableWrapperGingerbread(this, paramResources);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/graphics/drawable/DrawableWrapperGingerbread.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/