157 lines
4.3 KiB
Java
157 lines
4.3 KiB
Java
package okhttp3.repackaged.internal.framed;
|
|
|
|
import java.util.Arrays;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class Settings {
|
|
static final int COUNT = 10;
|
|
static final int DEFAULT_INITIAL_WINDOW_SIZE = 65536;
|
|
static final int ENABLE_PUSH = 2;
|
|
static final int HEADER_TABLE_SIZE = 1;
|
|
static final int INITIAL_WINDOW_SIZE = 7;
|
|
static final int MAX_CONCURRENT_STREAMS = 4;
|
|
static final int MAX_FRAME_SIZE = 5;
|
|
static final int MAX_HEADER_LIST_SIZE = 6;
|
|
static final int akN = 1;
|
|
static final int akO = 1;
|
|
static final int akP = 2;
|
|
static final int akQ = 1;
|
|
static final int akR = 2;
|
|
static final int akS = 3;
|
|
static final int akT = 5;
|
|
static final int akU = 6;
|
|
static final int akV = 8;
|
|
static final int akW = 10;
|
|
static final int akX = 1;
|
|
private int akY;
|
|
private int akZ;
|
|
private int ala;
|
|
private final int[] alb = new int[10];
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final void clear() {
|
|
this.ala = 0;
|
|
this.akZ = 0;
|
|
this.akY = 0;
|
|
Arrays.fill(this.alb, 0);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final Settings d(int i, int i2, int i3) {
|
|
int[] iArr = this.alb;
|
|
if (i >= iArr.length) {
|
|
return this;
|
|
}
|
|
int i4 = 1 << i;
|
|
this.akY |= i4;
|
|
this.akZ = (i2 & 1) != 0 ? this.akZ | i4 : this.akZ & (~i4);
|
|
this.ala = (i2 & 2) != 0 ? this.ala | i4 : this.ala & (~i4);
|
|
iArr[i] = i3;
|
|
return this;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int get(int i) {
|
|
return this.alb[i];
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int G(int i) {
|
|
int i2 = P(i) ? 2 : 0;
|
|
return O(i) ? i2 | 1 : i2;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int size() {
|
|
return Integer.bitCount(this.akY);
|
|
}
|
|
|
|
final int H(int i) {
|
|
return (this.akY & 2) != 0 ? this.alb[1] : i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int getHeaderTableSize() {
|
|
if ((this.akY & 2) != 0) {
|
|
return this.alb[1];
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
final int I(int i) {
|
|
return (this.akY & 4) != 0 ? this.alb[2] : i;
|
|
}
|
|
|
|
final boolean getEnablePush(boolean z) {
|
|
if ((this.akY & 4) != 0) {
|
|
if (this.alb[2] == 1) {
|
|
return true;
|
|
}
|
|
} else if (z) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
final int J(int i) {
|
|
return (this.akY & 8) != 0 ? this.alb[3] : i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int getMaxConcurrentStreams(int i) {
|
|
return (this.akY & 16) != 0 ? this.alb[4] : i;
|
|
}
|
|
|
|
final int K(int i) {
|
|
return (this.akY & 32) != 0 ? this.alb[5] : i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int getMaxFrameSize(int i) {
|
|
return (this.akY & 32) != 0 ? this.alb[5] : i;
|
|
}
|
|
|
|
final int L(int i) {
|
|
return (this.akY & 64) != 0 ? this.alb[6] : i;
|
|
}
|
|
|
|
final int getMaxHeaderListSize(int i) {
|
|
return (this.akY & 64) != 0 ? this.alb[6] : i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final int M(int i) {
|
|
return (this.akY & 128) != 0 ? this.alb[7] : i;
|
|
}
|
|
|
|
final int N(int i) {
|
|
return (this.akY & 256) != 0 ? this.alb[8] : i;
|
|
}
|
|
|
|
final boolean uS() {
|
|
return (((this.akY & 1024) != 0 ? this.alb[10] : 0) & 1) != 0;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final void b(Settings settings) {
|
|
for (int i = 0; i < 10; i++) {
|
|
if (settings.isSet(i)) {
|
|
d(i, settings.G(i), settings.get(i));
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final boolean isSet(int i) {
|
|
return ((1 << i) & this.akY) != 0;
|
|
}
|
|
|
|
final boolean P(int i) {
|
|
return ((1 << i) & this.ala) != 0;
|
|
}
|
|
|
|
final boolean O(int i) {
|
|
return ((1 << i) & this.akZ) != 0;
|
|
}
|
|
}
|