正在查看: 星辰VPN v1.2.3 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 星辰VPN v1.2.3 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package c2;
import android.net.Uri;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
import androidx.exifinterface.media.ExifInterface;
import c2.k;
import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.drm.DrmInitData;
import com.google.android.exoplayer2.i0;
import com.google.android.exoplayer2.upstream.v;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import q2.d0;
import q2.f0;
public final class d extends DefaultHandler implements v.a<c> {
public static final Pattern f527b = Pattern.compile("(\\d+)(?:/(\\d+))?");
public static final Pattern f528c = Pattern.compile("CC([1-4])=.*");
public static final Pattern f529d = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
public static final int[] f530e = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};
public final XmlPullParserFactory f531a;
public static final class a {
public final i0 f532a;
public final ImmutableList<b> f533b;
public final k f534c;
@Nullable
public final String f535d;
public final ArrayList<DrmInitData.SchemeData> f536e;
public final ArrayList<e> f537f;
public final long f538g = -1;
public final List<e> f539h;
public final List<e> f540i;
public a(i0 i0Var, List list, k kVar, @Nullable String str, ArrayList arrayList, ArrayList arrayList2, List list2, List list3) {
this.f532a = i0Var;
this.f533b = ImmutableList.copyOf((Collection) list);
this.f534c = kVar;
this.f535d = str;
this.f536e = arrayList;
this.f537f = arrayList2;
this.f539h = list2;
this.f540i = list3;
}
}
public d() {
try {
this.f531a = XmlPullParserFactory.newInstance();
} catch (XmlPullParserException e3) {
throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e3);
}
}
public static long c(long j3, long j4) {
if (j4 != -9223372036854775807L) {
j3 = j4;
}
if (j3 == Long.MAX_VALUE) {
return -9223372036854775807L;
}
return j3;
}
public static void d(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
if (q2.b.g(xmlPullParser)) {
int i3 = 1;
while (i3 != 0) {
xmlPullParser.next();
if (q2.b.g(xmlPullParser)) {
i3++;
} else {
if (xmlPullParser.getEventType() == 3) {
i3--;
}
}
}
}
}
public static e j(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
if (attributeValue == null) {
attributeValue = "";
}
String attributeValue2 = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue2 == null) {
attributeValue2 = null;
}
String attributeValue3 = xmlPullParser.getAttributeValue(null, "id");
String str2 = attributeValue3 != null ? attributeValue3 : null;
do {
xmlPullParser.next();
} while (!q2.b.f(xmlPullParser, str));
return new e(attributeValue, attributeValue2, str2);
}
public static long k(XmlPullParser xmlPullParser, String str, long j3) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
if (attributeValue == null) {
return j3;
}
Matcher matcher = f0.f7200h.matcher(attributeValue);
if (!matcher.matches()) {
return (long) (Double.parseDouble(attributeValue) * 3600.0d * 1000.0d);
}
boolean isEmpty = true ^ TextUtils.isEmpty(matcher.group(1));
String group = matcher.group(3);
double d3 = ShadowDrawableWrapper.COS_45;
double parseDouble = group != null ? Double.parseDouble(group) * 3.1556908E7d : 0.0d;
String group2 = matcher.group(5);
double parseDouble2 = parseDouble + (group2 != null ? Double.parseDouble(group2) * 2629739.0d : 0.0d);
String group3 = matcher.group(7);
double parseDouble3 = parseDouble2 + (group3 != null ? Double.parseDouble(group3) * 86400.0d : 0.0d);
String group4 = matcher.group(10);
double parseDouble4 = parseDouble3 + (group4 != null ? Double.parseDouble(group4) * 3600.0d : 0.0d);
String group5 = matcher.group(12);
double parseDouble5 = parseDouble4 + (group5 != null ? Double.parseDouble(group5) * 60.0d : 0.0d);
String group6 = matcher.group(14);
if (group6 != null) {
d3 = Double.parseDouble(group6);
}
long j4 = (long) ((parseDouble5 + d3) * 1000.0d);
return isEmpty ? -j4 : j4;
}
public static float l(XmlPullParser xmlPullParser, float f3) {
String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
if (attributeValue == null) {
return f3;
}
Matcher matcher = f527b.matcher(attributeValue);
if (!matcher.matches()) {
return f3;
}
int parseInt = Integer.parseInt(matcher.group(1));
return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt;
}
public static int m(XmlPullParser xmlPullParser, String str, int i3) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? i3 : Integer.parseInt(attributeValue);
}
public static long n(XmlPullParser xmlPullParser, String str, long j3) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j3 : Long.parseLong(attributeValue);
}
public static String w(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String str2 = "";
do {
xmlPullParser.next();
if (xmlPullParser.getEventType() == 4) {
str2 = xmlPullParser.getText();
} else {
d(xmlPullParser);
}
} while (!q2.b.f(xmlPullParser, str));
return str2;
}
@Override
public final c a(Uri uri, InputStream inputStream) throws IOException {
try {
XmlPullParser newPullParser = this.f531a.newPullParser();
newPullParser.setInput(inputStream, null);
if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
return o(newPullParser, uri);
}
throw ParserException.createForMalformedManifest("inputStream does not contain a valid media presentation description", null);
} catch (XmlPullParserException e3) {
throw ParserException.createForMalformedManifest(null, e3);
}
}
public final long b(List<k.d> list, long j3, long j4, int i3, long j5) {
int i4;
if (i3 >= 0) {
i4 = i3 + 1;
} else {
int i5 = f0.f7193a;
i4 = (int) ((((j5 - j3) + j4) - 1) / j4);
}
for (int i6 = 0; i6 < i4; i6++) {
list.add(new k.d(j3, j4));
j3 += j4;
}
return j3;
}
public final int e(org.xmlpull.v1.XmlPullParser r10) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: c2.d.e(org.xmlpull.v1.XmlPullParser):int");
}
public final long f(XmlPullParser xmlPullParser, long j3) {
String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
if (attributeValue == null) {
return j3;
}
if ("INF".equals(attributeValue)) {
return Long.MAX_VALUE;
}
return (long) (Float.parseFloat(attributeValue) * 1000000.0f);
}
public final List<b> g(XmlPullParser xmlPullParser, List<b> list, boolean z2) throws XmlPullParserException, IOException {
String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z2 ? 1 : Integer.MIN_VALUE;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "dvb:weight");
int parseInt2 = attributeValue2 != null ? Integer.parseInt(attributeValue2) : 1;
String attributeValue3 = xmlPullParser.getAttributeValue(null, "serviceLocation");
String w3 = w(xmlPullParser, "BaseURL");
if ((w3 == null || d0.a(w3)[0] == -1) ? false : true) {
if (attributeValue3 == null) {
attributeValue3 = w3;
}
return Lists.c(new b(w3, attributeValue3, parseInt, parseInt2));
}
ArrayList arrayList = new ArrayList();
for (int i3 = 0; i3 < list.size(); i3++) {
b bVar = list.get(i3);
String c3 = d0.c(bVar.f510a, w3);
String str = attributeValue3 == null ? c3 : attributeValue3;
if (z2) {
parseInt = bVar.f512c;
parseInt2 = bVar.f513d;
str = bVar.f511b;
}
arrayList.add(new b(c3, str, parseInt, parseInt2));
}
return arrayList;
}
public final android.util.Pair<java.lang.String, com.google.android.exoplayer2.drm.DrmInitData.SchemeData> h(org.xmlpull.v1.XmlPullParser r14) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: c2.d.h(org.xmlpull.v1.XmlPullParser):android.util.Pair");
}
public final int i(XmlPullParser xmlPullParser) {
String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
if (!TextUtils.isEmpty(attributeValue)) {
if ("audio".equals(attributeValue)) {
return 1;
}
if ("video".equals(attributeValue)) {
return 2;
}
if (NotificationCompat.MessagingStyle.Message.KEY_TEXT.equals(attributeValue)) {
return 3;
}
}
return -1;
}
public final c2.c o(org.xmlpull.v1.XmlPullParser r142, android.net.Uri r143) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: c2.d.o(org.xmlpull.v1.XmlPullParser, android.net.Uri):c2.c");
}
public final i p(XmlPullParser xmlPullParser, String str, String str2) {
long j3;
long j4;
String attributeValue = xmlPullParser.getAttributeValue(null, str);
String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
if (attributeValue2 != null) {
String[] split = attributeValue2.split("-");
j3 = Long.parseLong(split[0]);
if (split.length == 2) {
j4 = (Long.parseLong(split[1]) - j3) + 1;
return new i(attributeValue, j3, j4);
}
} else {
j3 = 0;
}
j4 = -1;
return new i(attributeValue, j3, j4);
}
public final int q(@Nullable String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
public final int r(List<e> list) {
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
if (com.google.common.base.h.p("http://dashif.org/guidelines/trickmode", list.get(i4).f541a)) {
i3 |= 16384;
}
}
return i3;
}
public final k.e s(XmlPullParser xmlPullParser, @Nullable k.e eVar) throws XmlPullParserException, IOException {
long j3;
long j4;
long n = n(xmlPullParser, "timescale", eVar != null ? eVar.f573b : 1L);
long n3 = n(xmlPullParser, "presentationTimeOffset", eVar != null ? eVar.f574c : 0L);
long j5 = eVar != null ? eVar.f587d : 0L;
long j6 = eVar != null ? eVar.f588e : 0L;
String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange");
if (attributeValue != null) {
String[] split = attributeValue.split("-");
long parseLong = Long.parseLong(split[0]);
j3 = (Long.parseLong(split[1]) - parseLong) + 1;
j4 = parseLong;
} else {
j3 = j6;
j4 = j5;
}
i iVar = eVar != null ? eVar.f572a : null;
do {
xmlPullParser.next();
if (q2.b.h(xmlPullParser, "Initialization")) {
iVar = p(xmlPullParser, "sourceURL", "range");
} else {
d(xmlPullParser);
}
} while (!q2.b.f(xmlPullParser, "SegmentBase"));
return new k.e(iVar, n, n3, j4, j3);
}
public final k.b t(XmlPullParser xmlPullParser, @Nullable k.b bVar, long j3, long j4, long j5, long j6, long j7) throws XmlPullParserException, IOException {
i iVar;
List list;
List<k.d> list2;
long n = n(xmlPullParser, "timescale", bVar != null ? bVar.f573b : 1L);
long n3 = n(xmlPullParser, "presentationTimeOffset", bVar != null ? bVar.f574c : 0L);
long n4 = n(xmlPullParser, "duration", bVar != null ? bVar.f576e : -9223372036854775807L);
long n5 = n(xmlPullParser, "startNumber", bVar != null ? bVar.f575d : 1L);
long c3 = c(j5, j6);
List<k.d> list3 = null;
List list4 = null;
i iVar2 = null;
do {
xmlPullParser.next();
if (q2.b.h(xmlPullParser, "Initialization")) {
iVar2 = p(xmlPullParser, "sourceURL", "range");
} else if (q2.b.h(xmlPullParser, "SegmentTimeline")) {
list3 = v(xmlPullParser, n, j4);
} else if (q2.b.h(xmlPullParser, "SegmentURL")) {
if (list4 == null) {
list4 = new ArrayList();
}
List list5 = list4;
list5.add(p(xmlPullParser, "media", "mediaRange"));
list4 = list5;
} else {
d(xmlPullParser);
}
} while (!q2.b.f(xmlPullParser, "SegmentList"));
if (bVar != null) {
if (iVar2 == null) {
iVar2 = bVar.f572a;
}
if (list3 == null) {
list3 = bVar.f577f;
}
if (list4 == null) {
list2 = list3;
iVar = iVar2;
list = bVar.f581j;
return new k.b(iVar, n, n3, n5, n4, list2, c3, list, f0.Q(j7), f0.Q(j3));
}
}
iVar = iVar2;
list = list4;
list2 = list3;
return new k.b(iVar, n, n3, n5, n4, list2, c3, list, f0.Q(j7), f0.Q(j3));
}
public final k.c u(XmlPullParser xmlPullParser, @Nullable k.c cVar, List<e> list, long j3, long j4, long j5, long j6, long j7) throws XmlPullParserException, IOException {
long j8;
long n = n(xmlPullParser, "timescale", cVar != null ? cVar.f573b : 1L);
long n3 = n(xmlPullParser, "presentationTimeOffset", cVar != null ? cVar.f574c : 0L);
long n4 = n(xmlPullParser, "duration", cVar != null ? cVar.f576e : -9223372036854775807L);
long n5 = n(xmlPullParser, "startNumber", cVar != null ? cVar.f575d : 1L);
int i3 = 0;
while (true) {
if (i3 >= list.size()) {
j8 = -1;
break;
}
e eVar = list.get(i3);
if (com.google.common.base.h.p("http://dashif.org/guidelines/last-segment-number", eVar.f541a)) {
j8 = Long.parseLong(eVar.f542b);
break;
}
i3++;
}
long j9 = j8;
long c3 = c(j5, j6);
List<k.d> list2 = null;
m x2 = x(xmlPullParser, "media", cVar != null ? cVar.f583k : null);
m x3 = x(xmlPullParser, "initialization", cVar != null ? cVar.f582j : null);
i iVar = null;
do {
xmlPullParser.next();
if (q2.b.h(xmlPullParser, "Initialization")) {
iVar = p(xmlPullParser, "sourceURL", "range");
} else if (q2.b.h(xmlPullParser, "SegmentTimeline")) {
list2 = v(xmlPullParser, n, j4);
} else {
d(xmlPullParser);
}
} while (!q2.b.f(xmlPullParser, "SegmentTemplate"));
if (cVar != null) {
if (iVar == null) {
iVar = cVar.f572a;
}
if (list2 == null) {
list2 = cVar.f577f;
}
}
return new k.c(iVar, n, n3, n5, j9, n4, list2, c3, x3, x2, f0.Q(j7), f0.Q(j3));
}
public final List<k.d> v(XmlPullParser xmlPullParser, long j3, long j4) throws XmlPullParserException, IOException {
ArrayList arrayList = new ArrayList();
long j5 = 0;
long j6 = -9223372036854775807L;
boolean z2 = false;
int i3 = 0;
do {
xmlPullParser.next();
if (q2.b.h(xmlPullParser, ExifInterface.LATITUDE_SOUTH)) {
long n = n(xmlPullParser, "t", -9223372036854775807L);
if (z2) {
j5 = b(arrayList, j5, j6, i3, n);
}
if (n == -9223372036854775807L) {
n = j5;
}
j6 = n(xmlPullParser, "d", -9223372036854775807L);
i3 = m(xmlPullParser, "r", 0);
j5 = n;
z2 = true;
} else {
d(xmlPullParser);
}
} while (!q2.b.f(xmlPullParser, "SegmentTimeline"));
if (z2) {
b(arrayList, j5, j6, i3, f0.W(j4, j3, 1000L));
}
return arrayList;
}
@Nullable
public final m x(XmlPullParser xmlPullParser, String str, @Nullable m mVar) {
String str2;
String attributeValue = xmlPullParser.getAttributeValue(null, str);
if (attributeValue == null) {
return mVar;
}
String[] strArr = new String[5];
int[] iArr = new int[4];
String[] strArr2 = new String[4];
strArr[0] = "";
int i3 = 0;
int i4 = 0;
while (i3 < attributeValue.length()) {
int indexOf = attributeValue.indexOf("$", i3);
if (indexOf == -1) {
strArr[i4] = strArr[i4] + attributeValue.substring(i3);
i3 = attributeValue.length();
} else if (indexOf != i3) {
strArr[i4] = strArr[i4] + attributeValue.substring(i3, indexOf);
i3 = indexOf;
} else if (attributeValue.startsWith("$$", i3)) {
strArr[i4] = android.support.v4.media.a.r(new StringBuilder(), strArr[i4], "$");
i3 += 2;
} else {
int i5 = i3 + 1;
int indexOf2 = attributeValue.indexOf("$", i5);
String substring = attributeValue.substring(i5, indexOf2);
if (substring.equals("RepresentationID")) {
iArr[i4] = 1;
} else {
int indexOf3 = substring.indexOf("%0");
if (indexOf3 != -1) {
str2 = substring.substring(indexOf3);
if (!str2.endsWith("d") && !str2.endsWith("x") && !str2.endsWith("X")) {
str2 = android.support.v4.media.a.n(str2, "d");
}
substring = substring.substring(0, indexOf3);
} else {
str2 = "%01d";
}
Objects.requireNonNull(substring);
substring.hashCode();
switch (substring) {
case "Number":
iArr[i4] = 2;
break;
case "Time":
iArr[i4] = 4;
break;
case "Bandwidth":
iArr[i4] = 3;
break;
default:
throw new IllegalArgumentException(android.support.v4.media.a.n("Invalid template: ", attributeValue));
}
strArr2[i4] = str2;
}
i4++;
strArr[i4] = "";
i3 = indexOf2 + 1;
}
}
return new m(strArr, iArr, strArr2, i4);
}
}