package s;

import android.text.TextUtils;
import android.util.Log;
import b0.D;
import com.mstar.android.samba.NanoHTTPD;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import u.d;
import u.h;

/* JADX INFO: loaded from: classes.dex */
public class f implements h {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private static final Map f6382b = Collections.singletonMap("Content-Type", NanoHTTPD.MIME_DEFAULT_BINARY);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private static final Map f6383c;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private String f6384a;

    static {
        HashMap map = new HashMap();
        map.put("Content-Type", NanoHTTPD.MIME_XML);
        map.put("SOAPAction", "http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense");
        f6383c = map;
    }

    public f() {
        Log.d("SmoothStreamingTestMediaDrmCallback", "laUrl=" + this.f6384a);
    }

    @Override // u.h
    public byte[] a(UUID uuid, d.c cVar) {
        String strA = cVar.a();
        if (!TextUtils.isEmpty(this.f6384a)) {
            strA = this.f6384a;
        }
        return D.k(strA + "&signedRequest=" + new String(cVar.b()), null, f6382b);
    }

    @Override // u.h
    public byte[] b(UUID uuid, d.a aVar) {
        String strA = aVar.a();
        if (TextUtils.isEmpty(strA)) {
            strA = "http://playready.directtaps.net/pr/svc/rightsmanager.asmx";
        }
        if (!TextUtils.isEmpty(this.f6384a)) {
            strA = this.f6384a;
        }
        Log.d("SmoothStreamingTestMediaDrmCallback", "executeKeyRequest laUrl=" + strA);
        return D.k(strA, aVar.b(), f6383c);
    }

    public f(String str) {
        this();
        this.f6384a = str;
        Log.d("SmoothStreamingTestMediaDrmCallback", "set laUrl=" + str);
    }
}
