ViewExposureManager$c.smali
8.9 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
.class public final Lcom/bytedance/applog/exposure/ViewExposureManager$c;
.super Lkotlin/jvm/internal/Lambda;
.source ""
# interfaces
.implements Lkotlin/jvm/functions/Function0;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/bytedance/applog/exposure/ViewExposureManager;->a(Landroid/app/Activity;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/internal/Lambda;",
"Lkotlin/jvm/functions/Function0<",
"Lkotlin/Unit;",
">;"
}
.end annotation
# instance fields
.field public final synthetic a:Lcom/bytedance/applog/exposure/ViewExposureManager;
.field public final synthetic b:Landroid/app/Activity;
# direct methods
.method public constructor <init>(Lcom/bytedance/applog/exposure/ViewExposureManager;Landroid/app/Activity;)V
.locals 0
iput-object p1, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->a:Lcom/bytedance/applog/exposure/ViewExposureManager;
iput-object p2, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->b:Landroid/app/Activity;
const/4 p1, 0x0
invoke-direct {p0, p1}, Lkotlin/jvm/internal/Lambda;-><init>(I)V
return-void
.end method
# virtual methods
.method public invoke()Ljava/lang/Object;
.locals 9
.line 1
iget-object v0, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->a:Lcom/bytedance/applog/exposure/ViewExposureManager;
invoke-static {v0}, Lcom/bytedance/applog/exposure/ViewExposureManager;->access$getActivitiesMap$p(Lcom/bytedance/applog/exposure/ViewExposureManager;)Ljava/util/WeakHashMap;
move-result-object v0
iget-object v1, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->b:Landroid/app/Activity;
invoke-virtual {v0, v1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/WeakHashMap;
if-eqz v0, :cond_a
const-string v1, "activitiesMap[activity] ?: return@runSafely"
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_a
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroid/view/View;
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bytedance/bdtracker/o0;
invoke-virtual {v1}, Lcom/bytedance/bdtracker/o0;->a()Lcom/bytedance/applog/exposure/ViewExposureData;
move-result-object v3
.line 2
iget-boolean v4, v1, Lcom/bytedance/bdtracker/o0;->b:Z
const-string v5, "view"
.line 3
invoke-static {v2, v5}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v3}, Lcom/bytedance/applog/exposure/ViewExposureData;->getConfig()Lcom/bytedance/applog/exposure/ViewExposureConfig;
move-result-object v5
const/4 v6, 0x0
if-eqz v5, :cond_1
invoke-virtual {v5}, Lcom/bytedance/applog/exposure/ViewExposureConfig;->getAreaRatio()Ljava/lang/Float;
move-result-object v5
goto :goto_1
:cond_1
move-object v5, v6
:goto_1
invoke-static {v2, v5}, Lcom/bytedance/bdtracker/n0;->a(Landroid/view/View;Ljava/lang/Float;)Z
move-result v5
if-eq v4, v5, :cond_0
.line 4
iget-boolean v4, v1, Lcom/bytedance/bdtracker/o0;->b:Z
const/4 v5, 0x1
const/4 v7, 0x0
if-nez v4, :cond_2
.line 5
iget-object v4, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->a:Lcom/bytedance/applog/exposure/ViewExposureManager;
invoke-static {v4, v2, v3}, Lcom/bytedance/applog/exposure/ViewExposureManager;->access$sendViewExposureEvent(Lcom/bytedance/applog/exposure/ViewExposureManager;Landroid/view/View;Lcom/bytedance/applog/exposure/ViewExposureData;)V
move v4, v5
goto :goto_2
:cond_2
move v4, v7
.line 6
:goto_2
iput-boolean v4, v1, Lcom/bytedance/bdtracker/o0;->b:Z
.line 7
invoke-virtual {v3}, Lcom/bytedance/applog/exposure/ViewExposureData;->getConfig()Lcom/bytedance/applog/exposure/ViewExposureConfig;
move-result-object v4
if-eqz v4, :cond_3
invoke-virtual {v4}, Lcom/bytedance/applog/exposure/ViewExposureConfig;->getVisualDiagnosis()Ljava/lang/Boolean;
move-result-object v6
:cond_3
invoke-static {v5}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v4
invoke-static {v6, v4}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_9
.line 8
iget-boolean v4, v1, Lcom/bytedance/bdtracker/o0;->b:Z
.line 9
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v6, 0x10
if-lt v5, v6, :cond_9
if-eqz v4, :cond_4
const/high16 v4, -0x10000
goto :goto_3
:cond_4
const/16 v4, -0x100
:goto_3
instance-of v5, v2, Landroid/widget/ImageView;
const-string v6, "null cannot be cast to non-null type com.bytedance.applog.exposure.DebugDrawable"
if-eqz v5, :cond_6
move-object v5, v2
check-cast v5, Landroid/widget/ImageView;
invoke-virtual {v5}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v8
instance-of v8, v8, Lcom/bytedance/bdtracker/l0;
if-eqz v8, :cond_6
invoke-virtual {v5}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_5
check-cast v5, Lcom/bytedance/bdtracker/l0;
invoke-virtual {v5, v4}, Lcom/bytedance/bdtracker/l0;->a(I)V
goto :goto_4
:cond_5
new-instance v0, Lkotlin/TypeCastException;
invoke-direct {v0, v6}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw v0
:cond_6
:goto_4
invoke-virtual {v2}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
instance-of v5, v5, Lcom/bytedance/bdtracker/l0;
if-eqz v5, :cond_8
invoke-virtual {v2}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v5
if-eqz v5, :cond_7
check-cast v5, Lcom/bytedance/bdtracker/l0;
invoke-virtual {v5, v4}, Lcom/bytedance/bdtracker/l0;->a(I)V
goto :goto_5
:cond_7
new-instance v0, Lkotlin/TypeCastException;
invoke-direct {v0, v6}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw v0
:cond_8
:goto_5
invoke-virtual {v2}, Landroid/view/View;->invalidate()V
.line 10
:cond_9
iget-object v4, p0, Lcom/bytedance/applog/exposure/ViewExposureManager$c;->a:Lcom/bytedance/applog/exposure/ViewExposureManager;
invoke-virtual {v4}, Lcom/bytedance/applog/exposure/ViewExposureManager;->getAppLog()Lcom/bytedance/bdtracker/d;
move-result-object v4
.line 11
iget-object v4, v4, Lcom/bytedance/bdtracker/d;->D:Lcom/bytedance/applog/log/IAppLogLogger;
const-string v5, "[ViewExposure] visible change to "
.line 12
invoke-static {v5}, Lcom/bytedance/bdtracker/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
.line 13
iget-boolean v1, v1, Lcom/bytedance/bdtracker/o0;->b:Z
.line 14
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
const-string v1, ", config="
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Lcom/bytedance/applog/exposure/ViewExposureData;->getConfig()Lcom/bytedance/applog/exposure/ViewExposureConfig;
move-result-object v1
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " view="
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
new-array v2, v7, [Ljava/lang/Object;
const/4 v3, 0x7
invoke-interface {v4, v3, v1, v2}, Lcom/bytedance/applog/log/IAppLogLogger;->debug(ILjava/lang/String;[Ljava/lang/Object;)V
goto/16 :goto_0
.line 15
:cond_a
sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
return-object v0
.end method