SPAIN TV+ v2.14.8版本的 MD5 值为:fb654ec376ec94e584d29f71bc1f6f4b

以下内容为反编译后的 l0.java 源代码,内容仅作参考


package r2;

import android.net.Uri;
import android.text.TextUtils;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import r2.g0;
import v4.a0;
import v4.m;
import v4.q;
import x4.c1;
public final class l0 implements n0 {
    private final m.a f20507a;
    private final String f20508b;
    private final boolean f20509c;
    private final Map<String, String> f20510d;

    public l0(String str, boolean z7, m.a aVar) {
        x4.a.a((z7 && TextUtils.isEmpty(str)) ? false : true);
        this.f20507a = aVar;
        this.f20508b = str;
        this.f20509c = z7;
        this.f20510d = new HashMap();
    }

    private static byte[] c(m.a aVar, String str, byte[] bArr, Map<String, String> map) {
        v4.o0 o0Var = new v4.o0(aVar.a());
        v4.q a8 = new q.b().j(str).e(map).d(2).c(bArr).b(1).a();
        int i8 = 0;
        v4.q qVar = a8;
        while (true) {
            try {
                v4.o oVar = new v4.o(o0Var, qVar);
                try {
                    byte[] j12 = c1.j1(oVar);
                    c1.o(oVar);
                    return j12;
                } catch (a0.e e8) {
                    String d8 = d(e8, i8);
                    if (d8 == null) {
                        throw e8;
                    }
                    i8++;
                    qVar = qVar.a().j(d8).a();
                    c1.o(oVar);
                }
            } catch (Exception e9) {
                throw new o0(a8, (Uri) x4.a.e(o0Var.t()), o0Var.m(), o0Var.f(), e9);
            }
        }
    }

    private static String d(a0.e eVar, int i8) {
        Map<String, List<String>> map;
        List<String> list;
        int i9 = eVar.f21943e;
        if (!((i9 == 307 || i9 == 308) && i8 < 5) || (map = eVar.f21945g) == null || (list = map.get("Location")) == null || list.isEmpty()) {
            return null;
        }
        return list.get(0);
    }

    @Override
    public byte[] a(UUID uuid, g0.d dVar) {
        return c(this.f20507a, dVar.b() + "&signedRequest=" + c1.E(dVar.a()), null, Collections.emptyMap());
    }

    @Override
    public byte[] b(UUID uuid, g0.a aVar) {
        String b8 = aVar.b();
        if (this.f20509c || TextUtils.isEmpty(b8)) {
            b8 = this.f20508b;
        }
        if (TextUtils.isEmpty(b8)) {
            throw new o0(new q.b().i(Uri.EMPTY).a(), Uri.EMPTY, a5.a0.k(), 0L, new IllegalStateException("No license URL"));
        }
        HashMap hashMap = new HashMap();
        UUID uuid2 = m2.n.f17692e;
        hashMap.put("Content-Type", uuid2.equals(uuid) ? "text/xml" : m2.n.f17690c.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.f20510d) {
            hashMap.putAll(this.f20510d);
        }
        return c(this.f20507a, b8, aVar.a(), hashMap);
    }

    public void e(String str, String str2) {
        x4.a.e(str);
        x4.a.e(str2);
        synchronized (this.f20510d) {
            this.f20510d.put(str, str2);
        }
    }
}