AnimatedImageView.java
3.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
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
package com.instabug.library.internal.view;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.util.AttributeSet;
import android.widget.ImageView;
public class AnimatedImageView
extends ImageView
{
private a[] a;
private Drawable b = null;
private final Handler c = new Handler();
private boolean d = false;
private Thread e;
private final Runnable f = new Runnable()
{
public final void run()
{
if (AnimatedImageView.a(AnimatedImageView.this) != null) {
AnimatedImageView.this.setImageDrawable(AnimatedImageView.a(AnimatedImageView.this));
}
}
};
public AnimatedImageView(Context paramContext)
{
super(paramContext);
}
public AnimatedImageView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
public void a()
{
int i = 1;
this.d = true;
if ((this.d) && (this.a != null) && (this.e == null)) {}
for (;;)
{
if (i != 0)
{
this.e = new Thread(new b((byte)0));
this.e.start();
}
return;
i = 0;
}
}
public void b()
{
this.d = false;
if (this.e != null)
{
this.e.interrupt();
this.e = null;
}
}
public void setFrames(a[] paramArrayOfa)
{
this.a = paramArrayOfa;
try
{
this.b = getResources().getDrawable(paramArrayOfa[0].a);
setImageDrawable(this.b);
a();
return;
}
catch (OutOfMemoryError paramArrayOfa)
{
paramArrayOfa.printStackTrace();
this.a = null;
}
}
public static class a
{
public int a;
public int b;
public a(int paramInt1, int paramInt2)
{
this.b = paramInt2;
this.a = paramInt1;
}
}
final class b
implements Runnable
{
private b() {}
public final void run()
{
int j = AnimatedImageView.b(AnimatedImageView.this).length;
for (;;)
{
int i = 0;
label11:
if (i < j)
{
Drawable localDrawable = AnimatedImageView.a(AnimatedImageView.this);
AnimatedImageView.a(AnimatedImageView.this, AnimatedImageView.this.getResources().getDrawable(AnimatedImageView.b(AnimatedImageView.this)[i].a));
if (localDrawable != null) {
localDrawable.setCallback(null);
}
}
try
{
Thread.sleep(AnimatedImageView.b(AnimatedImageView.this)[i].b);
AnimatedImageView.d(AnimatedImageView.this).post(AnimatedImageView.c(AnimatedImageView.this));
i += 1;
break label11;
if (AnimatedImageView.e(AnimatedImageView.this)) {
continue;
}
return;
}
catch (InterruptedException localInterruptedException)
{
for (;;) {}
}
}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/internal/view/AnimatedImageView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/