package c.f.d;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.os.Build;
import c.f.c.b.k;
import c.f.g.n;

/* JADX INFO: compiled from: TypefaceCompat.java */
/* JADX INFO: loaded from: classes.dex */
public class d {
    public static final j a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final c.d.f<String, Typeface> f1336b;

    /* JADX INFO: compiled from: TypefaceCompat.java */
    public static class a extends n {
        public k.e a;

        public a(k.e eVar) {
            this.a = eVar;
        }
    }

    static {
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 29) {
            a = new h();
        } else if (i2 >= 28) {
            a = new g();
        } else {
            a = new f();
        }
        f1336b = new c.d.f<>(16);
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0027  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x002a  */
    /* JADX WARN: Removed duplicated region for block: B:19:0x0030  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static android.graphics.Typeface a(android.content.Context r6, c.f.c.b.g r7, android.content.res.Resources r8, int r9, java.lang.String r10, int r11, int r12, c.f.c.b.k.e r13, android.os.Handler r14, boolean r15) {
        /*
            Method dump skipped, instruction units count: 355
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.d.d.a(android.content.Context, c.f.c.b.g, android.content.res.Resources, int, java.lang.String, int, int, c.f.c.b.k$e, android.os.Handler, boolean):android.graphics.Typeface");
    }

    public static Typeface b(Context context, Resources resources, int i2, String str, int i3, int i4) {
        Typeface typefaceC = a.c(context, resources, i2, str, i4);
        if (typefaceC != null) {
            f1336b.b(c(resources, i2, str, i3, i4), typefaceC);
        }
        return typefaceC;
    }

    public static String c(Resources resources, int i2, String str, int i3, int i4) {
        return resources.getResourcePackageName(i2) + '-' + str + '-' + i3 + '-' + i2 + '-' + i4;
    }
}
