Settings.smali
5.2 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
.class public final Lokhttp3/internal/http2/Settings;
.super Ljava/lang/Object;
.source "Settings.java"
# static fields
.field static final COUNT:I = 0xa
.field static final DEFAULT_INITIAL_WINDOW_SIZE:I = 0xffff
.field static final ENABLE_PUSH:I = 0x2
.field static final HEADER_TABLE_SIZE:I = 0x1
.field static final INITIAL_WINDOW_SIZE:I = 0x7
.field static final MAX_CONCURRENT_STREAMS:I = 0x4
.field static final MAX_FRAME_SIZE:I = 0x5
.field static final MAX_HEADER_LIST_SIZE:I = 0x6
# instance fields
.field private set:I
.field private final values:[I
# direct methods
.method public constructor <init>()V
.locals 1
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/16 v0, 0xa
.line 51
new-array v0, v0, [I
iput-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
return-void
.end method
# virtual methods
.method clear()V
.locals 2
const/4 v0, 0x0
.line 54
iput v0, p0, Lokhttp3/internal/http2/Settings;->set:I
.line 55
iget-object v1, p0, Lokhttp3/internal/http2/Settings;->values:[I
invoke-static {v1, v0}, Ljava/util/Arrays;->fill([II)V
return-void
.end method
.method get(I)I
.locals 1
.line 77
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
aget p1, v0, p1
return p1
.end method
.method getEnablePush(Z)Z
.locals 3
.line 94
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x4
const/4 v1, 0x0
const/4 v2, 0x1
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x2
aget p1, p1, v0
goto :goto_0
:cond_0
if-eqz p1, :cond_1
move p1, v2
goto :goto_0
:cond_1
move p1, v1
:goto_0
if-ne p1, v2, :cond_2
move v1, v2
:cond_2
return v1
.end method
.method getHeaderTableSize()I
.locals 2
.line 88
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x2
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v1, 0x1
aget v0, v0, v1
goto :goto_0
:cond_0
const/4 v0, -0x1
:goto_0
return v0
.end method
.method getInitialWindowSize()I
.locals 2
.line 114
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit16 v0, v0, 0x80
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v1, 0x7
aget v0, v0, v1
goto :goto_0
:cond_0
const v0, 0xffff
:goto_0
return v0
.end method
.method getMaxConcurrentStreams(I)I
.locals 1
.line 99
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x10
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x4
aget p1, p1, v0
:cond_0
return p1
.end method
.method getMaxFrameSize(I)I
.locals 1
.line 104
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x20
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x5
aget p1, p1, v0
:cond_0
return p1
.end method
.method getMaxHeaderListSize(I)I
.locals 1
.line 109
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x40
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x6
aget p1, p1, v0
:cond_0
return p1
.end method
.method isSet(I)Z
.locals 2
const/4 v0, 0x1
shl-int p1, v0, p1
.line 72
iget v1, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/2addr p1, v1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method merge(Lokhttp3/internal/http2/Settings;)V
.locals 2
const/4 v0, 0x0
:goto_0
const/16 v1, 0xa
if-ge v0, v1, :cond_1
.line 123
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->isSet(I)Z
move-result v1
if-nez v1, :cond_0
goto :goto_1
.line 124
:cond_0
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->get(I)I
move-result v1
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method set(II)Lokhttp3/internal/http2/Settings;
.locals 3
if-ltz p1, :cond_1
.line 59
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
array-length v1, v0
if-lt p1, v1, :cond_0
goto :goto_0
:cond_0
const/4 v1, 0x1
shl-int/2addr v1, p1
.line 64
iget v2, p0, Lokhttp3/internal/http2/Settings;->set:I
or-int/2addr v1, v2
iput v1, p0, Lokhttp3/internal/http2/Settings;->set:I
.line 65
aput p2, v0, p1
:cond_1
:goto_0
return-object p0
.end method
.method size()I
.locals 1
.line 82
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
invoke-static {v0}, Ljava/lang/Integer;->bitCount(I)I
move-result v0
return v0
.end method