- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
81 lines
2.8 KiB
Java
81 lines
2.8 KiB
Java
package com.fyber.inneractive.sdk.flow.vast;
|
|
|
|
import android.text.TextUtils;
|
|
import com.fyber.inneractive.sdk.model.vast.q;
|
|
import com.fyber.inneractive.sdk.model.vast.s;
|
|
import java.util.Comparator;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class h implements Comparator<q> {
|
|
public final int a;
|
|
public final int b;
|
|
public final int c;
|
|
|
|
public h(int i, int i2, int i3) {
|
|
this.a = i;
|
|
this.b = i2;
|
|
this.c = i3;
|
|
}
|
|
|
|
@Override // java.util.Comparator
|
|
public final int compare(q qVar, q qVar2) {
|
|
q qVar3 = qVar;
|
|
q qVar4 = qVar2;
|
|
int i = -1;
|
|
if (TextUtils.equals("VPAID", qVar4.f)) {
|
|
return -1;
|
|
}
|
|
if (!TextUtils.equals("VPAID", qVar3.f)) {
|
|
Integer num = qVar3.e;
|
|
int intValue = num == null ? 0 : num.intValue();
|
|
Integer num2 = qVar4.e;
|
|
int intValue2 = num2 == null ? 0 : num2.intValue();
|
|
int i2 = this.a;
|
|
if (intValue2 > i2 && intValue <= i2) {
|
|
return -1;
|
|
}
|
|
if (intValue <= i2 || intValue2 > i2) {
|
|
s a = s.a(qVar4.d);
|
|
s sVar = s.MEDIA_TYPE_MP4;
|
|
Integer num3 = a == sVar ? 3 : a == s.MEDIA_TYPE_3GPP ? 2 : a == s.MEDIA_TYPE_WEBM ? 1 : -1;
|
|
s a2 = s.a(qVar3.d);
|
|
if (a2 == sVar) {
|
|
i = 3;
|
|
} else if (a2 == s.MEDIA_TYPE_3GPP) {
|
|
i = 2;
|
|
} else if (a2 == s.MEDIA_TYPE_WEBM) {
|
|
i = 1;
|
|
}
|
|
int compareTo = num3.compareTo(i);
|
|
if (compareTo != 0) {
|
|
return compareTo;
|
|
}
|
|
if (intValue >= intValue2) {
|
|
if (intValue > intValue2) {
|
|
return -1;
|
|
}
|
|
Integer num4 = qVar3.b;
|
|
int intValue3 = num4 == null ? 0 : num4.intValue();
|
|
Integer num5 = qVar3.c;
|
|
int intValue4 = num5 == null ? 0 : num5.intValue();
|
|
Integer num6 = qVar4.b;
|
|
int intValue5 = num6 == null ? 0 : num6.intValue();
|
|
Integer num7 = qVar4.c;
|
|
int i3 = intValue3 * intValue4;
|
|
int intValue6 = intValue5 * (num7 == null ? 0 : num7.intValue());
|
|
int i4 = this.b * this.c;
|
|
int abs = Math.abs(i3 - i4);
|
|
int abs2 = Math.abs(intValue6 - i4);
|
|
if (abs < abs2) {
|
|
return -1;
|
|
}
|
|
if (abs <= abs2) {
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return 1;
|
|
}
|
|
}
|