bh.java
6.64 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
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.transition.TransitionPort;
import android.support.transition.TransitionPort.TransitionListenerAdapter;
import android.support.v4.util.ArrayMap;
import android.support.v4.view.ViewCompat;
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
@TargetApi(14)
@RequiresApi(14)
final class bh
{
static TransitionPort a;
static ArrayList<ViewGroup> b = new ArrayList();
private static final String[] g = new String[0];
private static String h = "TransitionManager";
private static ThreadLocal<WeakReference<ArrayMap<ViewGroup, ArrayList<TransitionPort>>>> i;
ArrayMap<as, TransitionPort> c = new ArrayMap();
ArrayMap<as, ArrayMap<as, TransitionPort>> d = new ArrayMap();
ArrayMap<as, ArrayMap<String, TransitionPort>> e = new ArrayMap();
ArrayMap<String, ArrayMap<as, TransitionPort>> f = new ArrayMap();
static
{
a = new af();
i = new ThreadLocal();
}
static ArrayMap<ViewGroup, ArrayList<TransitionPort>> a()
{
WeakReference localWeakReference2 = (WeakReference)i.get();
WeakReference localWeakReference1;
if (localWeakReference2 != null)
{
localWeakReference1 = localWeakReference2;
if (localWeakReference2.get() != null) {}
}
else
{
localWeakReference1 = new WeakReference(new ArrayMap());
i.set(localWeakReference1);
}
return (ArrayMap)localWeakReference1.get();
}
public static void a(ViewGroup paramViewGroup)
{
a(paramViewGroup, null);
}
public static void a(ViewGroup paramViewGroup, TransitionPort paramTransitionPort)
{
if ((!b.contains(paramViewGroup)) && (ViewCompat.isLaidOut(paramViewGroup)))
{
b.add(paramViewGroup);
TransitionPort localTransitionPort = paramTransitionPort;
if (paramTransitionPort == null) {
localTransitionPort = a;
}
paramTransitionPort = localTransitionPort.e();
c(paramViewGroup, paramTransitionPort);
as.a(paramViewGroup, null);
b(paramViewGroup, paramTransitionPort);
}
}
public static void a(as paramas)
{
a(paramas, a);
}
static void a(as paramas, TransitionPort paramTransitionPort)
{
ViewGroup localViewGroup = paramas.d;
TransitionPort localTransitionPort = null;
if (paramTransitionPort != null)
{
localTransitionPort = paramTransitionPort.e();
localTransitionPort.b(localViewGroup);
}
paramTransitionPort = as.a(localViewGroup);
if (paramTransitionPort != null) {
if (paramTransitionPort.c <= 0) {
break label69;
}
}
label69:
for (int j = 1;; j = 0)
{
if (j != 0) {
localTransitionPort.b(true);
}
c(localViewGroup, localTransitionPort);
paramas.b();
b(localViewGroup, localTransitionPort);
return;
}
}
private static void b(ViewGroup paramViewGroup, TransitionPort paramTransitionPort)
{
if ((paramTransitionPort != null) && (paramViewGroup != null))
{
paramTransitionPort = new bh.a(paramTransitionPort, paramViewGroup);
paramViewGroup.addOnAttachStateChangeListener(paramTransitionPort);
paramViewGroup.getViewTreeObserver().addOnPreDrawListener(paramTransitionPort);
}
}
public static void b(as paramas, TransitionPort paramTransitionPort)
{
a(paramas, paramTransitionPort);
}
private static void c(ViewGroup paramViewGroup, TransitionPort paramTransitionPort)
{
Object localObject = (ArrayList)a().get(paramViewGroup);
if ((localObject != null) && (((ArrayList)localObject).size() > 0))
{
localObject = ((ArrayList)localObject).iterator();
while (((Iterator)localObject).hasNext()) {
((TransitionPort)((Iterator)localObject).next()).c(paramViewGroup);
}
}
if (paramTransitionPort != null) {
paramTransitionPort.a(paramViewGroup, true);
}
paramViewGroup = as.a(paramViewGroup);
if (paramViewGroup != null) {
paramViewGroup.a();
}
}
static final class a
implements View.OnAttachStateChangeListener, ViewTreeObserver.OnPreDrawListener
{
TransitionPort a;
ViewGroup b;
a(TransitionPort paramTransitionPort, ViewGroup paramViewGroup)
{
this.a = paramTransitionPort;
this.b = paramViewGroup;
}
private void a()
{
this.b.getViewTreeObserver().removeOnPreDrawListener(this);
this.b.removeOnAttachStateChangeListener(this);
}
public final boolean onPreDraw()
{
a();
bh.b.remove(this.b);
final ArrayMap localArrayMap = bh.a();
ArrayList localArrayList = (ArrayList)localArrayMap.get(this.b);
Object localObject;
if (localArrayList == null)
{
localArrayList = new ArrayList();
localArrayMap.put(this.b, localArrayList);
localObject = null;
}
for (;;)
{
localArrayList.add(this.a);
this.a.a(new TransitionPort.TransitionListenerAdapter()
{
public final void onTransitionEnd(TransitionPort paramAnonymousTransitionPort)
{
((ArrayList)localArrayMap.get(bh.a.this.b)).remove(paramAnonymousTransitionPort);
}
});
this.a.a(this.b, false);
if (localObject != null)
{
localObject = ((ArrayList)localObject).iterator();
for (;;)
{
if (((Iterator)localObject).hasNext())
{
((TransitionPort)((Iterator)localObject).next()).d(this.b);
continue;
if (localArrayList.size() <= 0) {
break label162;
}
localObject = new ArrayList(localArrayList);
break;
}
}
}
this.a.a(this.b);
return true;
label162:
localObject = null;
}
}
public final void onViewAttachedToWindow(View paramView) {}
public final void onViewDetachedFromWindow(View paramView)
{
a();
bh.b.remove(this.b);
paramView = (ArrayList)bh.a().get(this.b);
if ((paramView != null) && (paramView.size() > 0))
{
paramView = paramView.iterator();
while (paramView.hasNext()) {
((TransitionPort)paramView.next()).d(this.b);
}
}
this.a.a(true);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/bh.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/