package defpackage;

import android.content.Context;
import android.graphics.Typeface;
import android.os.Trace;
import androidx.media3.exoplayer.ExoPlaybackException;
import java.lang.reflect.Method;
import java.nio.MappedByteBuffer;

/* renamed from: ᵦˈᵼ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class RunnableC3566 implements Runnable {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ Object f13368;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f13369;

    public /* synthetic */ RunnableC3566(int i, Object obj) {
        this.f13369 = i;
        this.f13368 = obj;
    }

    public /* synthetic */ RunnableC3566(C0911 c0911, int i) {
        this.f13369 = 23;
        this.f13368 = c0911;
    }

    public /* synthetic */ RunnableC3566(C0911 c0911, C4147 c4147) {
        this.f13369 = 24;
        this.f13368 = c4147;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    private final void m8179() {
        C4147 c4147 = (C4147) this.f13368;
        try {
            synchronized (c4147) {
            }
            try {
                c4147.f15486.mo379(c4147.f15485, c4147.f15488);
            } finally {
                c4147.m9047(true);
            }
        } catch (ExoPlaybackException e) {
            ᵳʿˉ.ᵸˑ("Unexpected error delivering message on external thread.", e);
            C1260.m3814(e);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    private final void m8180() {
        C4153 c4153 = (C4153) this.f13368;
        synchronized (c4153.f15524) {
            try {
                if (c4153.f15523 == null) {
                    return;
                }
                try {
                    C3491 c3491M9058 = c4153.m9058();
                    int i = c3491M9058.f13067;
                    if (i == 2) {
                        synchronized (c4153.f15524) {
                        }
                    }
                    if (i != 0) {
                        throw new RuntimeException("fetchFonts result is not OK. (" + i + ")");
                    }
                    try {
                        Method method = AbstractC4789.f17798;
                        Trace.beginSection("EmojiCompat.FontRequestEmojiCompatConfig.buildTypeface");
                        ˉːᵡ r0 = c4153.f15520;
                        Context context = c4153.f15521;
                        r0.getClass();
                        C3491[] c3491Arr = {c3491M9058};
                        ˀʾˀᵛ r4 = AbstractC5382.f20172;
                        Trace.beginSection(ˉˇʨ.ˎˑː("TypefaceCompat.createFromFontInfo"));
                        try {
                            Typeface typeface = AbstractC5382.f20172.ᵹᵝᵶ(context, c3491Arr, 0);
                            Trace.endSection();
                            MappedByteBuffer mappedByteBuffer = ᵺᵣᵬ.ᵧᵾˀˈ(c4153.f15521, c3491M9058.f13069);
                            if (mappedByteBuffer == null || typeface == null) {
                                throw new RuntimeException("Unable to open file.");
                            }
                            try {
                                Trace.beginSection("EmojiCompat.MetadataRepo.create");
                                ᵮᵥٴ r2 = new ᵮᵥٴ(typeface, ˁـᵛ.ˑᵱ(mappedByteBuffer));
                                Trace.endSection();
                                synchronized (c4153.f15524) {
                                    try {
                                        ᵳʿˉ r1 = c4153.f15523;
                                        if (r1 != null) {
                                            r1.ˎˑː(r2);
                                        }
                                    } finally {
                                    }
                                }
                                c4153.m9057();
                            } finally {
                                Method method2 = AbstractC4789.f17798;
                            }
                        } finally {
                            Trace.endSection();
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                } catch (Throwable th2) {
                    synchronized (c4153.f15524) {
                        try {
                            ᵳʿˉ r12 = c4153.f15523;
                            if (r12 != null) {
                                r12.ˑᵥˁ(th2);
                            }
                            c4153.m9057();
                        } finally {
                        }
                    }
                }
            } finally {
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:132:0x027e  */
    /* JADX WARN: Removed duplicated region for block: B:133:0x0286  */
    /* JADX WARN: Removed duplicated region for block: B:157:0x036d  */
    @Override // java.lang.Runnable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void run() {
        /*
            Method dump skipped, instructions count: 1358
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.RunnableC3566.run():void");
    }
}
