Live Football Updates v1.0版本的 MD5 值为:95609b5a5bec0a5f5a0b6e8e4d8f1cba
以下内容为反编译后的 u.java 源代码,内容仅作参考
package b2;
import android.annotation.SuppressLint;
import android.media.DeniedByServerException;
import android.media.MediaCrypto;
import android.media.MediaCryptoException;
import android.media.MediaDrm;
import android.media.MediaDrmException;
import android.media.NotProvisionedException;
import android.media.UnsupportedSchemeException;
import android.media.metrics.LogSessionId;
import android.text.TextUtils;
import b2.b;
import b2.n;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import k3.i;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import p1.n;
import s1.e0;
import s1.f0;
import x1.l0;
public final class u implements n {
public static final p f3631d = new p();
public final UUID f3632a;
public final MediaDrm f3633b;
public int f3634c;
public static class a {
public static boolean a(MediaDrm mediaDrm, String str) {
boolean requiresSecureDecoder;
requiresSecureDecoder = mediaDrm.requiresSecureDecoder(str);
return requiresSecureDecoder;
}
public static void b(MediaDrm mediaDrm, byte[] bArr, l0 l0Var) {
LogSessionId logSessionId;
boolean equals;
MediaDrm.PlaybackComponent playbackComponent;
l0.a aVar = l0Var.f33340a;
aVar.getClass();
logSessionId = LogSessionId.LOG_SESSION_ID_NONE;
LogSessionId logSessionId2 = aVar.f33342a;
equals = logSessionId2.equals(logSessionId);
if (!equals) {
playbackComponent = mediaDrm.getPlaybackComponent(bArr);
playbackComponent.getClass();
playbackComponent.setLogSessionId(logSessionId2);
}
}
}
public u(UUID uuid) throws UnsupportedSchemeException {
uuid.getClass();
f0.a("Use C.CLEARKEY_UUID instead", !p1.h.f27939b.equals(uuid));
this.f3632a = uuid;
MediaDrm mediaDrm = new MediaDrm(o(uuid));
this.f3633b = mediaDrm;
this.f3634c = 1;
if (p1.h.f27941d.equals(uuid) && "ASUS_Z00AD".equals(e0.f30450d)) {
mediaDrm.setPropertyString("securityLevel", "L3");
}
}
public static UUID o(UUID uuid) {
return (e0.f30447a >= 27 || !p1.h.f27940c.equals(uuid)) ? uuid : p1.h.f27939b;
}
@Override
public final synchronized void a() {
int i = this.f3634c - 1;
this.f3634c = i;
if (i == 0) {
this.f3633b.release();
}
}
@Override
public final Map<String, String> b(byte[] bArr) {
return this.f3633b.queryKeyStatus(bArr);
}
@Override
public final void c(final b.a aVar) {
this.f3633b.setOnEventListener(new MediaDrm.OnEventListener() {
@Override
public final void onEvent(MediaDrm mediaDrm, byte[] bArr, int i, int i10, byte[] bArr2) {
u uVar = u.this;
n.b bVar = aVar;
uVar.getClass();
b.HandlerC0067b handlerC0067b = b.this.f3596y;
handlerC0067b.getClass();
handlerC0067b.obtainMessage(i, bArr).sendToTarget();
}
});
}
@Override
public final n.d d() {
MediaDrm.ProvisionRequest provisionRequest = this.f3633b.getProvisionRequest();
return new n.d(provisionRequest.getDefaultUrl(), provisionRequest.getData());
}
@Override
public final v1.a e(byte[] bArr) throws MediaCryptoException {
boolean z10;
int i = e0.f30447a;
UUID uuid = this.f3632a;
if (i < 21 && p1.h.f27941d.equals(uuid) && "L3".equals(this.f3633b.getPropertyString("securityLevel"))) {
z10 = true;
} else {
z10 = false;
}
return new o(o(uuid), bArr, z10);
}
@Override
public final byte[] f() throws MediaDrmException {
return this.f3633b.openSession();
}
@Override
public final void g(byte[] bArr, byte[] bArr2) {
this.f3633b.restoreKeys(bArr, bArr2);
}
@Override
public final void h(byte[] bArr) {
this.f3633b.closeSession(bArr);
}
@Override
public final byte[] i(byte[] bArr, byte[] bArr2) throws NotProvisionedException, DeniedByServerException {
if (p1.h.f27940c.equals(this.f3632a) && e0.f30447a < 27) {
try {
JSONObject jSONObject = new JSONObject(e0.n(bArr2));
StringBuilder sb = new StringBuilder("{\"keys\":[");
JSONArray jSONArray = jSONObject.getJSONArray("keys");
for (int i = 0; i < jSONArray.length(); i++) {
if (i != 0) {
sb.append(",");
}
JSONObject jSONObject2 = jSONArray.getJSONObject(i);
sb.append("{\"k\":\"");
sb.append(jSONObject2.getString("k").replace('-', '+').replace('_', '/'));
sb.append("\",\"kid\":\"");
sb.append(jSONObject2.getString("kid").replace('-', '+').replace('_', '/'));
sb.append("\",\"kty\":\"");
sb.append(jSONObject2.getString("kty"));
sb.append("\"}");
}
sb.append("]}");
bArr2 = e0.G(sb.toString());
} catch (JSONException e10) {
s1.n.d("ClearKeyUtil", "Failed to adjust response data: ".concat(e0.n(bArr2)), e10);
}
}
return this.f3633b.provideKeyResponse(bArr, bArr2);
}
@Override
public final void j(byte[] bArr) throws DeniedByServerException {
this.f3633b.provideProvisionResponse(bArr);
}
@Override
@SuppressLint({"WrongConstant"})
public final n.a k(byte[] bArr, List<n.b> list, int i, HashMap<String, String> hashMap) throws NotProvisionedException {
byte[] bArr2;
String str;
n.b bVar;
int i10;
boolean z10;
boolean z11;
byte[] bArr3;
String str2;
int indexOf;
UUID uuid = this.f3632a;
n.b bVar2 = null;
if (list != null) {
if (!p1.h.f27941d.equals(uuid)) {
bVar = list.get(0);
} else {
if (e0.f30447a >= 28 && list.size() > 1) {
n.b bVar3 = list.get(0);
int i11 = 0;
for (int i12 = 0; i12 < list.size(); i12++) {
n.b bVar4 = list.get(i12);
byte[] bArr4 = bVar4.f28049e;
bArr4.getClass();
if (e0.a(bVar4.f28048d, bVar3.f28048d) && e0.a(bVar4.f28047c, bVar3.f28047c)) {
if (k3.i.b(bArr4) != null) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
i11 += bArr4.length;
}
}
z10 = false;
}
z10 = true;
if (z10) {
byte[] bArr5 = new byte[i11];
int i13 = 0;
for (int i14 = 0; i14 < list.size(); i14++) {
byte[] bArr6 = list.get(i14).f28049e;
bArr6.getClass();
int length = bArr6.length;
System.arraycopy(bArr6, 0, bArr5, i13, length);
i13 += length;
}
bVar = new n.b(bVar3.f28046b, bVar3.f28047c, bVar3.f28048d, bArr5);
}
}
for (int i15 = 0; i15 < list.size(); i15++) {
n.b bVar5 = list.get(i15);
byte[] bArr7 = bVar5.f28049e;
bArr7.getClass();
i.a b10 = k3.i.b(bArr7);
if (b10 == null) {
i10 = -1;
} else {
i10 = b10.f25490b;
}
int i16 = e0.f30447a;
if ((i16 < 23 && i10 == 0) || (i16 >= 23 && i10 == 1)) {
bVar = bVar5;
break;
}
}
bVar = list.get(0);
}
byte[] bArr8 = bVar.f28049e;
bArr8.getClass();
UUID uuid2 = p1.h.f27942e;
if (uuid2.equals(uuid)) {
byte[] c10 = k3.i.c(uuid, bArr8);
if (c10 != null) {
bArr8 = c10;
}
s1.u uVar = new s1.u(bArr8);
int i17 = uVar.i();
short k10 = uVar.k();
short k11 = uVar.k();
if (k10 == 1 && k11 == 1) {
short k12 = uVar.k();
Charset charset = dc.c.f21685e;
String t = uVar.t(k12, charset);
if (!t.contains("<LA_URL>")) {
if (t.indexOf("</DATA>") == -1) {
s1.n.g("FrameworkMediaDrm", "Could not find the </DATA> tag. Skipping LA_URL workaround.");
}
String str3 = t.substring(0, indexOf) + "<LA_URL>https://x</LA_URL>" + t.substring(indexOf);
int i18 = i17 + 52;
ByteBuffer allocate = ByteBuffer.allocate(i18);
allocate.order(ByteOrder.LITTLE_ENDIAN);
allocate.putInt(i18);
allocate.putShort(k10);
allocate.putShort(k11);
allocate.putShort((short) (str3.length() * 2));
allocate.put(str3.getBytes(charset));
bArr8 = allocate.array();
}
} else {
s1.n.f("FrameworkMediaDrm", "Unexpected record count or type. Skipping LA_URL workaround.");
}
bArr8 = k3.i.a(uuid2, null, bArr8);
}
int i19 = e0.f30447a;
if (i19 >= 23 || !p1.h.f27941d.equals(uuid)) {
if (uuid2.equals(uuid) && "Amazon".equals(e0.f30449c)) {
String str4 = e0.f30450d;
if (!"AFTB".equals(str4)) {
if (!"AFTS".equals(str4)) {
if (!"AFTM".equals(str4)) {
}
}
}
}
bArr3 = bArr8;
String str5 = bVar.f28048d;
if (i19 < 26 && p1.h.f27940c.equals(uuid) && ("video/mp4".equals(str5) || "audio/mp4".equals(str5))) {
str2 = "cenc";
} else {
str2 = str5;
}
str = str2;
bArr2 = bArr3;
bVar2 = bVar;
}
bArr3 = k3.i.c(uuid, bArr8);
} else {
bArr2 = null;
str = null;
}
MediaDrm.KeyRequest keyRequest = this.f3633b.getKeyRequest(bArr, bArr2, str, i, hashMap);
byte[] data = keyRequest.getData();
if (p1.h.f27940c.equals(uuid) && e0.f30447a < 27) {
data = e0.G(e0.n(data).replace('+', '-').replace('/', '_'));
}
String defaultUrl = keyRequest.getDefaultUrl();
if ("<LA_URL>https://x</LA_URL>".equals(defaultUrl) || (e0.f30447a >= 33 && "https://default.url".equals(defaultUrl))) {
defaultUrl = "";
}
if (TextUtils.isEmpty(defaultUrl) && bVar2 != null) {
String str6 = bVar2.f28047c;
if (!TextUtils.isEmpty(str6)) {
defaultUrl = str6;
}
}
if (e0.f30447a >= 23) {
keyRequest.getRequestType();
}
return new n.a(defaultUrl, data);
}
@Override
public final int l() {
return 2;
}
@Override
public final boolean m(String str, byte[] bArr) {
if (e0.f30447a >= 31) {
return a.a(this.f3633b, str);
}
try {
MediaCrypto mediaCrypto = new MediaCrypto(this.f3632a, bArr);
try {
return mediaCrypto.requiresSecureDecoderComponent(str);
} finally {
mediaCrypto.release();
}
} catch (MediaCryptoException unused) {
return true;
}
}
@Override
public final void n(byte[] bArr, l0 l0Var) {
if (e0.f30447a >= 31) {
try {
a.b(this.f3633b, bArr, l0Var);
} catch (UnsupportedOperationException unused) {
s1.n.g("FrameworkMediaDrm", "setLogSessionId failed.");
}
}
}
}