LiveData$ObserverWrapper.smali
4.0 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
.class abstract Landroidx/lifecycle/LiveData$ObserverWrapper;
.super Ljava/lang/Object;
.source "LiveData.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/LiveData;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x402
name = "ObserverWrapper"
.end annotation
# instance fields
.field mActive:Z
.field mLastVersion:I
.field final mObserver:Landroidx/lifecycle/Observer;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/Observer<",
"-TT;>;"
}
.end annotation
.end field
.field final synthetic this$0:Landroidx/lifecycle/LiveData;
# direct methods
.method constructor <init>(Landroidx/lifecycle/LiveData;Landroidx/lifecycle/Observer;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/lifecycle/Observer<",
"-TT;>;)V"
}
.end annotation
.line 395
iput-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 p1, -0x1
.line 393
iput p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mLastVersion:I
.line 396
iput-object p2, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mObserver:Landroidx/lifecycle/Observer;
return-void
.end method
# virtual methods
.method activeStateChanged(Z)V
.locals 4
.line 409
iget-boolean v0, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
if-ne p1, v0, :cond_0
return-void
.line 414
:cond_0
iput-boolean p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
.line 415
iget-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
iget p1, p1, Landroidx/lifecycle/LiveData;->mActiveCount:I
const/4 v0, 0x1
if-nez p1, :cond_1
move p1, v0
goto :goto_0
:cond_1
const/4 p1, 0x0
.line 416
:goto_0
iget-object v1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
iget v2, v1, Landroidx/lifecycle/LiveData;->mActiveCount:I
iget-boolean v3, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
if-eqz v3, :cond_2
goto :goto_1
:cond_2
const/4 v0, -0x1
:goto_1
add-int/2addr v2, v0
iput v2, v1, Landroidx/lifecycle/LiveData;->mActiveCount:I
if-eqz p1, :cond_3
.line 417
iget-boolean p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
if-eqz p1, :cond_3
.line 418
iget-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
invoke-virtual {p1}, Landroidx/lifecycle/LiveData;->onActive()V
.line 420
:cond_3
iget-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
iget p1, p1, Landroidx/lifecycle/LiveData;->mActiveCount:I
if-nez p1, :cond_4
iget-boolean p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
if-nez p1, :cond_4
.line 421
iget-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
invoke-virtual {p1}, Landroidx/lifecycle/LiveData;->onInactive()V
.line 423
:cond_4
iget-boolean p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->mActive:Z
if-eqz p1, :cond_5
.line 424
iget-object p1, p0, Landroidx/lifecycle/LiveData$ObserverWrapper;->this$0:Landroidx/lifecycle/LiveData;
invoke-virtual {p1, p0}, Landroidx/lifecycle/LiveData;->dispatchingValue(Landroidx/lifecycle/LiveData$ObserverWrapper;)V
:cond_5
return-void
.end method
.method detachObserver()V
.locals 0
return-void
.end method
.method isAttachedTo(Landroidx/lifecycle/LifecycleOwner;)Z
.locals 0
const/4 p1, 0x0
return p1
.end method
.method abstract shouldBeActive()Z
.end method