Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 p.java 源代码,内容仅作参考
package com.applovin.exoplayer2.d;
import android.net.Uri;
import android.text.TextUtils;
import com.applovin.exoplayer2.d.m;
import com.applovin.exoplayer2.k.l;
import com.applovin.exoplayer2.k.t;
import com.applovin.exoplayer2.l.ai;
import java.io.Closeable;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public final class p implements r {
private final t.b ts;
private final String tt;
private final boolean tu;
private final Map<String, String> tv;
public p(String str, boolean z, t.b bVar) {
com.applovin.exoplayer2.l.a.checkArgument((z && TextUtils.isEmpty(str)) ? false : true);
this.ts = bVar;
this.tt = str;
this.tu = z;
this.tv = new HashMap();
}
private static String a(t.e eVar, int i) {
Map<String, List<String>> map;
List<String> list;
int i2 = eVar.aaC;
if ((i2 != 307 && i2 != 308) || i >= 5 || (map = eVar.aaM) == null || (list = map.get("Location")) == null || list.isEmpty()) {
return null;
}
return list.get(0);
}
private static byte[] a(t.b bVar, String str, byte[] bArr, Map<String, String> map) throws s {
com.applovin.exoplayer2.k.z zVar = new com.applovin.exoplayer2.k.z(bVar.ox());
com.applovin.exoplayer2.k.l oj = new l.a().aK(str).d(map).fh(2).G(bArr).fi(1).oj();
int i = 0;
com.applovin.exoplayer2.k.l lVar = oj;
while (true) {
try {
com.applovin.exoplayer2.k.k kVar = new com.applovin.exoplayer2.k.k(zVar, lVar);
try {
byte[] a = ai.a((InputStream) kVar);
ai.a((Closeable) kVar);
return a;
} catch (t.e e) {
String a2 = a(e, i);
if (a2 == null) {
throw e;
}
i++;
lVar = lVar.oi().aK(a2).oj();
ai.a((Closeable) kVar);
}
} catch (Exception e2) {
throw new s(oj, (Uri) com.applovin.exoplayer2.l.a.checkNotNull(zVar.oI()), zVar.kT(), zVar.oH(), e2);
}
}
}
@Override
public byte[] a(UUID uuid, m.a aVar) throws s {
String hP = aVar.hP();
if (this.tu || TextUtils.isEmpty(hP)) {
hP = this.tt;
}
if (TextUtils.isEmpty(hP)) {
l.a aVar2 = new l.a();
Uri uri = Uri.EMPTY;
throw new s(aVar2.e(uri).oj(), uri, com.applovin.exoplayer2.common.a.u.gi(), 0L, new IllegalStateException("No license URL"));
}
HashMap hashMap = new HashMap();
UUID uuid2 = com.applovin.exoplayer2.h.an;
hashMap.put("Content-Type", uuid2.equals(uuid) ? "text/xml" : com.applovin.exoplayer2.h.al.equals(uuid) ? "application/json" : "application/octet-stream");
if (uuid2.equals(uuid)) {
hashMap.put("SOAPAction", "http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense");
}
synchronized (this.tv) {
hashMap.putAll(this.tv);
}
return a(this.ts, hP, aVar.hO(), hashMap);
}
@Override
public byte[] a(UUID uuid, m.d dVar) throws s {
return a(this.ts, dVar.hQ() + "&signedRequest=" + ai.J(dVar.hO()), null, Collections.emptyMap());
}
public void c(String str, String str2) {
com.applovin.exoplayer2.l.a.checkNotNull(str);
com.applovin.exoplayer2.l.a.checkNotNull(str2);
synchronized (this.tv) {
this.tv.put(str, str2);
}
}
}