package ඓ.ῲ.K;

import android.content.ComponentCallbacks2;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.text.TextUtils;
import android.util.Log;
import androidx.fragment.app.FragmentActivity;
import com.bumptech.glide.GeneratedAppGlideModule;
import com.bumptech.glide.MemoryCategory;
import com.bumptech.glide.Registry;
import com.bumptech.glide.load.ImageHeaderParser;
import com.bumptech.glide.load.resource.bitmap.DefaultImageHeaderParser;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import ඓ.ῲ.K.ᓣ.C0841;
import ඓ.ῲ.K.ᓣ.C0845;
import ඓ.ῲ.K.ᕣ.AbstractC0853;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0854;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0855;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0856;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0860;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0873;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0877;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0878;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0879;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0884;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0886;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0889;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0892;
import ඓ.ῲ.K.ᕣ.ᕣ.ʬ.C0893;
import ඓ.ῲ.K.ᕣ.ᕣ.ඓ.C0896;
import ඓ.ῲ.K.ᕣ.ᕣ.ඓ.C0899;
import ඓ.ῲ.K.ᕣ.ᕣ.ⁱ.C0901;
import ඓ.ῲ.K.ᕣ.ᕣ.ⁱ.C0911;
import ඓ.ῲ.K.ᕣ.ᕣ.ⁱ.C0914;
import ඓ.ῲ.K.ᕣ.ᕣ.ⁱ.C0916;
import ඓ.ῲ.K.ᕣ.ᕣ.ⁱ.C0917;
import ඓ.ῲ.K.ᕣ.ᕣ.㴹.C0922;
import ඓ.ῲ.K.ᕣ.ᕣ.㸾.C0924;
import ඓ.ῲ.K.ᕣ.ᕣ.㿎.C0926;
import ඓ.ῲ.K.ᕣ.ᕣ.㿎.C0928;
import ඓ.ῲ.K.ᕣ.ᕣ.㿎.C0930;
import ඓ.ῲ.K.ᕣ.ᕣ.㿎.C0933;
import ඓ.ῲ.K.ᕣ.ᨨ.C1013;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.AbstractC0967;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.AbstractC0976;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.C0962;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.C0964;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.C0972;
import ඓ.ῲ.K.ᕣ.ᨨ.ト.AbstractC0989;
import ඓ.ῲ.K.ᕣ.ᨨ.ト.C0992;
import ඓ.ῲ.K.ᕣ.ᨨ.ト.C0996;
import ඓ.ῲ.K.ᕣ.ᨨ.ト.C1003;
import ඓ.ῲ.K.ᕣ.ᨨ.㮔.ExecutorServiceC1008;
import ඓ.ῲ.K.ᕣ.㳳.C1032;
import ඓ.ῲ.K.ᕣ.㳳.C1035;
import ඓ.ῲ.K.ᕣ.㳳.C1042;
import ඓ.ῲ.K.ᕣ.㳳.C1047;
import ඓ.ῲ.K.ᕣ.㳳.C1067;
import ඓ.ῲ.K.ᕣ.㳳.C1074;
import ඓ.ῲ.K.ᕣ.㳳.C1078;
import ඓ.ῲ.K.ᕣ.㳳.C1085;
import ඓ.ῲ.K.ᕣ.㳳.C1086;
import ඓ.ῲ.K.ᕣ.㳳.C1099;
import ඓ.ῲ.K.ᕣ.㳳.C1101;
import ඓ.ῲ.K.ᕣ.㳳.C1109;
import ඓ.ῲ.K.ᕣ.㳳.C1112;
import ඓ.ῲ.K.ᕣ.㳳.C1116;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1052;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1054;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1059;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1061;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1063;
import ඓ.ῲ.K.ᕣ.㳳.ᑓ.C1065;
import ඓ.ῲ.K.ᕣ.㿎.AbstractC1130;
import ඓ.ῲ.K.ᕣ.㿎.C1132;
import ඓ.ῲ.K.ᕣ.㿎.C1149;
import ඓ.ῲ.K.㑃.AbstractC1186;
import ඓ.ῲ.K.㑃.C1179;
import ඓ.ῲ.K.㑃.C1185;
import ඓ.ῲ.K.㗗.AbstractC1200;
import ඓ.ῲ.K.㗗.㿎.AbstractC1211;
import ඓ.ῲ.K.㗗.㿎.C1209;
import ඓ.ῲ.K.㳳.AbstractC1215;
import ඓ.ῲ.K.䁗.AbstractC1222;
import ඓ.ῲ.K.䁗.C1223;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.㳳.C1841;

/* renamed from: ඓ.ῲ.K.ῲ  reason: contains not printable characters */
/* compiled from: Glide */
public class ComponentCallbacks2C1161 implements ComponentCallbacks2 {

    /* renamed from: ᕣ  reason: contains not printable characters */
    public static volatile boolean f4665;

    /* renamed from: 㳳  reason: contains not printable characters */
    public static volatile ComponentCallbacks2C1161 f4666;

    /* renamed from: ʬ  reason: contains not printable characters */
    public final AbstractC0989 f4667;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final Registry f4668;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final List<ComponentCallbacks2C1163> f4669 = new ArrayList();

    /* renamed from: ῲ  reason: contains not printable characters */
    public final AbstractC0976 f4670;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final C1179 f4671;

    /* renamed from: 㴹  reason: contains not printable characters */
    public final AbstractC0967 f4672;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final C1220 f4673;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final AbstractC1186 f4674;

    /* renamed from: ඓ.ῲ.K.ῲ$K  reason: contains not printable characters */
    /* compiled from: Glide */
    public interface AbstractC1162 {
    }

    public ComponentCallbacks2C1161(Context context, C1013 r24, AbstractC0989 r25, AbstractC0976 r26, AbstractC0967 r27, C1179 r28, AbstractC1186 r29, int i, AbstractC1162 k, Map<Class<?>, AbstractC1221<?, ?>> map, List<AbstractC1200<Object>> list, boolean z, boolean z2) {
        AbstractC0853 r12;
        AbstractC0853 r11;
        MemoryCategory memoryCategory = MemoryCategory.NORMAL;
        this.f4670 = r26;
        this.f4672 = r27;
        this.f4667 = r25;
        this.f4671 = r28;
        this.f4674 = r29;
        Resources resources = context.getResources();
        this.f4668 = new Registry();
        Registry registry = this.f4668;
        registry.f2184.m2410(new DefaultImageHeaderParser());
        if (Build.VERSION.SDK_INT >= 27) {
            Registry registry2 = this.f4668;
            registry2.f2184.m2410(new C0855());
        }
        List<ImageHeaderParser> r7 = this.f4668.m1265();
        C0911 k2 = new C0911(context, r7, r26, r27);
        C0860 r9 = new C0860(r26, new C0860.C0864());
        C0873 r10 = new C0873(this.f4668.m1265(), resources.getDisplayMetrics(), r26, r27);
        if (!z2 || Build.VERSION.SDK_INT < 28) {
            r12 = new C0878(r10);
            r11 = new C0889(r10, r27);
        } else {
            r11 = new C0884();
            r12 = new C0892();
        }
        C0899 r13 = new C0899(context);
        C1042.C1043 r14 = new C1042.C1043(resources);
        C1042.C1046 r15 = new C1042.C1046(resources);
        C1042.C1044 r5 = new C1042.C1044(resources);
        C1042.C1045 k3 = new C1042.C1045(resources);
        C0854 r2 = new C0854(r27);
        C0930 k4 = new C0930();
        C0933 r152 = new C0933();
        ContentResolver contentResolver = context.getContentResolver();
        Registry registry3 = this.f4668;
        registry3.f2183.m2412(ByteBuffer.class, new C1032());
        registry3.f2183.m2412(InputStream.class, new C1116(r27));
        registry3.f2180.m2406("Bitmap", r12, ByteBuffer.class, Bitmap.class);
        registry3.f2180.m2406("Bitmap", r11, InputStream.class, Bitmap.class);
        int i2 = Build.VERSION.SDK_INT;
        Registry registry4 = this.f4668;
        registry4.f2180.m2406("Bitmap", new C0893(r10), ParcelFileDescriptor.class, Bitmap.class);
        Registry registry5 = this.f4668;
        registry5.f2180.m2406("Bitmap", r9, ParcelFileDescriptor.class, Bitmap.class);
        registry5.f2180.m2406("Bitmap", new C0860(r26, new C0860.C0861(null)), AssetFileDescriptor.class, Bitmap.class);
        registry5.f2185.m2860(Bitmap.class, Bitmap.class, C1109.C1111.f4577);
        registry5.f2180.m2406("Bitmap", new C0886(), Bitmap.class, Bitmap.class);
        registry5.f2188.m2414(Bitmap.class, r2);
        registry5.f2180.m2406("BitmapDrawable", new C0879(resources, r12), ByteBuffer.class, BitmapDrawable.class);
        registry5.f2180.m2406("BitmapDrawable", new C0879(resources, r11), InputStream.class, BitmapDrawable.class);
        registry5.f2180.m2406("BitmapDrawable", new C0879(resources, r9), ParcelFileDescriptor.class, BitmapDrawable.class);
        registry5.f2188.m2414(BitmapDrawable.class, new C0877(r26, r2));
        registry5.f2180.m2406("Gif", new C0914(r7, k2, r27), InputStream.class, C0901.class);
        registry5.f2180.m2406("Gif", k2, ByteBuffer.class, C0901.class);
        registry5.f2188.m2414(C0901.class, new C0916());
        registry5.f2185.m2860(AbstractC1215.class, AbstractC1215.class, C1109.C1111.f4577);
        registry5.f2180.m2406("Bitmap", new C0917(r26), AbstractC1215.class, Bitmap.class);
        registry5.f2180.m2406("legacy_append", r13, Uri.class, Drawable.class);
        registry5.f2180.m2406("legacy_append", new C0856(r13, r26), Uri.class, Bitmap.class);
        registry5.f2181.m3059((AbstractC1130.AbstractC1131<?>) new C0924.C0925());
        registry5.f2185.m2860(File.class, ByteBuffer.class, new C1112.C1113());
        registry5.f2185.m2860(File.class, InputStream.class, new C1101.C1103());
        registry5.f2180.m2406("legacy_append", new C0922(), File.class, File.class);
        registry5.f2185.m2860(File.class, ParcelFileDescriptor.class, new C1101.C1105());
        registry5.f2185.m2860(File.class, File.class, C1109.C1111.f4577);
        registry5.f2181.m3059((AbstractC1130.AbstractC1131<?>) new C1132.C1133(r27));
        int i3 = Build.VERSION.SDK_INT;
        Registry registry6 = this.f4668;
        registry6.f2181.m3059((AbstractC1130.AbstractC1131<?>) new C1149.C1151());
        Registry registry7 = this.f4668;
        registry7.f2185.m2860(Integer.TYPE, InputStream.class, r14);
        registry7.f2185.m2860(Integer.TYPE, ParcelFileDescriptor.class, r5);
        registry7.f2185.m2860(Integer.class, InputStream.class, r14);
        registry7.f2185.m2860(Integer.class, ParcelFileDescriptor.class, r5);
        registry7.f2185.m2860(Integer.class, Uri.class, r15);
        registry7.f2185.m2860(Integer.TYPE, AssetFileDescriptor.class, k3);
        registry7.f2185.m2860(Integer.class, AssetFileDescriptor.class, k3);
        registry7.f2185.m2860(Integer.TYPE, Uri.class, r15);
        registry7.f2185.m2860(String.class, InputStream.class, new C1047.C1048());
        registry7.f2185.m2860(Uri.class, InputStream.class, new C1047.C1048());
        registry7.f2185.m2860(String.class, InputStream.class, new C1035.C1036());
        registry7.f2185.m2860(String.class, ParcelFileDescriptor.class, new C1035.C1037());
        registry7.f2185.m2860(String.class, AssetFileDescriptor.class, new C1035.C1038());
        registry7.f2185.m2860(Uri.class, InputStream.class, new C1059.C1060());
        registry7.f2185.m2860(Uri.class, InputStream.class, new C1086.C1087(context.getAssets()));
        registry7.f2185.m2860(Uri.class, ParcelFileDescriptor.class, new C1086.C1088(context.getAssets()));
        registry7.f2185.m2860(Uri.class, InputStream.class, new C1052.C1053(context));
        registry7.f2185.m2860(Uri.class, InputStream.class, new C1065.C1066(context));
        if (Build.VERSION.SDK_INT >= 29) {
            Registry registry8 = this.f4668;
            registry8.f2185.m2860(Uri.class, InputStream.class, new C1054.C1055(context));
            Registry registry9 = this.f4668;
            registry9.f2185.m2860(Uri.class, ParcelFileDescriptor.class, new C1054.C1056(context));
        }
        Registry registry10 = this.f4668;
        registry10.f2185.m2860(Uri.class, InputStream.class, new C1067.C1071(contentResolver));
        registry10.f2185.m2860(Uri.class, ParcelFileDescriptor.class, new C1067.C1069(contentResolver));
        registry10.f2185.m2860(Uri.class, AssetFileDescriptor.class, new C1067.C1070(contentResolver));
        registry10.f2185.m2860(Uri.class, InputStream.class, new C1099.C1100());
        registry10.f2185.m2860(URL.class, InputStream.class, new C1063.C1064());
        registry10.f2185.m2860(Uri.class, File.class, new C1074.C1076(context));
        registry10.f2185.m2860(C1085.class, InputStream.class, new C1061.C1062());
        registry10.f2185.m2860(byte[].class, ByteBuffer.class, new C1078.C1081());
        registry10.f2185.m2860(byte[].class, InputStream.class, new C1078.C1083());
        registry10.f2185.m2860(Uri.class, Uri.class, C1109.C1111.f4577);
        registry10.f2185.m2860(Drawable.class, Drawable.class, C1109.C1111.f4577);
        registry10.f2180.m2406("legacy_append", new C0896(), Drawable.class, Drawable.class);
        registry10.f2187.m2647(Bitmap.class, BitmapDrawable.class, new C0928(resources));
        registry10.f2187.m2647(Bitmap.class, byte[].class, k4);
        registry10.f2187.m2647(Drawable.class, byte[].class, new C0926(r26, k4, r152));
        registry10.f2187.m2647(C0901.class, byte[].class, r152);
        if (Build.VERSION.SDK_INT >= 23) {
            C0860 r0 = new C0860(r26, new C0860.C0867());
            this.f4668.f2180.m2406("legacy_append", r0, ByteBuffer.class, Bitmap.class);
            Registry registry11 = this.f4668;
            registry11.f2180.m2406("legacy_append", new C0879(resources, r0), ByteBuffer.class, BitmapDrawable.class);
        }
        this.f4673 = new C1220(context, r27, this.f4668, new C1209(), k, map, list, r24, z, i);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static ComponentCallbacks2C1163 m3104(Context context) {
        C1841.m4783((Object) context, "You cannot start a load on a not yet attached View or a Fragment where getActivity() returns null (which usually occurs when getActivity() is called before the Fragment is attached or after the Fragment is destroyed).");
        return m3105(context).f4671.m3155(context);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static ComponentCallbacks2C1161 m3105(Context context) {
        GeneratedAppGlideModule generatedAppGlideModule;
        if (f4666 == null) {
            try {
                generatedAppGlideModule = (GeneratedAppGlideModule) Class.forName("com.bumptech.glide.GeneratedAppGlideModuleImpl").getDeclaredConstructor(Context.class).newInstance(context.getApplicationContext().getApplicationContext());
            } catch (ClassNotFoundException unused) {
                if (Log.isLoggable("Glide", 5)) {
                    Log.w("Glide", "Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored");
                }
                generatedAppGlideModule = null;
            } catch (InstantiationException e) {
                m3108(e);
                throw null;
            } catch (IllegalAccessException e2) {
                m3108(e2);
                throw null;
            } catch (NoSuchMethodException e3) {
                m3108(e3);
                throw null;
            } catch (InvocationTargetException e4) {
                m3108(e4);
                throw null;
            }
            synchronized (ComponentCallbacks2C1161.class) {
                if (f4666 == null) {
                    m3107(context, generatedAppGlideModule);
                }
            }
        }
        return f4666;
    }

    public void onConfigurationChanged(Configuration configuration) {
    }

    public void onLowMemory() {
        C0845.m2459();
        ((C0841) this.f4667).m2441();
        this.f4670.m2770();
        ((C0964) this.f4672).m2740();
    }

    public void onTrimMemory(int i) {
        C0845.m2459();
        for (ComponentCallbacks2C1163 r1 : this.f4669) {
            r1.onTrimMemory(i);
        }
        ((C1003) this.f4667).m2806(i);
        this.f4670.m2771(i);
        ((C0964) this.f4672).m2737(i);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m3109(ComponentCallbacks2C1163 r3) {
        synchronized (this.f4669) {
            if (this.f4669.contains(r3)) {
                this.f4669.remove(r3);
            } else {
                throw new IllegalStateException("Cannot unregister not yet registered manager");
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m3107(Context context, GeneratedAppGlideModule generatedAppGlideModule) {
        List<AbstractC1222> list;
        if (!f4665) {
            f4665 = true;
            C0810 r2 = new C0810();
            Context applicationContext = context.getApplicationContext();
            List emptyList = Collections.emptyList();
            if (generatedAppGlideModule == null || generatedAppGlideModule.m3299()) {
                if (Log.isLoggable("ManifestParser", 3)) {
                    Log.d("ManifestParser", "Loading Glide modules");
                }
                ArrayList arrayList = new ArrayList();
                try {
                    ApplicationInfo applicationInfo = applicationContext.getPackageManager().getApplicationInfo(applicationContext.getPackageName(), 128);
                    if (applicationInfo.metaData != null) {
                        if (Log.isLoggable("ManifestParser", 2)) {
                            Log.v("ManifestParser", "Got app info metadata: " + applicationInfo.metaData);
                        }
                        for (String str : applicationInfo.metaData.keySet()) {
                            if ("GlideModule".equals(applicationInfo.metaData.get(str))) {
                                arrayList.add(C1223.m3295(str));
                                if (Log.isLoggable("ManifestParser", 3)) {
                                    Log.d("ManifestParser", "Loaded Glide module: " + str);
                                }
                            }
                        }
                        if (Log.isLoggable("ManifestParser", 3)) {
                            Log.d("ManifestParser", "Finished loading Glide modules");
                        }
                    } else if (Log.isLoggable("ManifestParser", 3)) {
                        Log.d("ManifestParser", "Got null app info metadata");
                    }
                    list = arrayList;
                } catch (PackageManager.NameNotFoundException e) {
                    throw new RuntimeException("Unable to find metadata to parse GlideModules", e);
                }
            } else {
                list = emptyList;
            }
            if (generatedAppGlideModule != null && !generatedAppGlideModule.m1264().isEmpty()) {
                Set<Class<?>> r5 = generatedAppGlideModule.m1264();
                Iterator it2 = list.iterator();
                while (it2.hasNext()) {
                    AbstractC1222 r7 = (AbstractC1222) it2.next();
                    if (r5.contains(r7.getClass())) {
                        if (Log.isLoggable("Glide", 3)) {
                            Log.d("Glide", "AppGlideModule excludes manifest GlideModule: " + r7);
                        }
                        it2.remove();
                    }
                }
            }
            if (Log.isLoggable("Glide", 3)) {
                for (AbstractC1222 r52 : list) {
                    StringBuilder r6 = C1293.m3416("Discovered GlideModule from manifest: ");
                    r6.append(r52.getClass());
                    Log.d("Glide", r6.toString());
                }
            }
            r2.f4027 = generatedAppGlideModule != null ? generatedAppGlideModule.m1263() : null;
            for (AbstractC1222 r4 : list) {
                r4.m3297(applicationContext, r2);
            }
            if (generatedAppGlideModule != null) {
                generatedAppGlideModule.m3298(applicationContext, r2);
            }
            if (r2.f4024 == null) {
                r2.f4024 = ExecutorServiceC1008.m2814();
            }
            if (r2.f4018 == null) {
                r2.f4018 = ExecutorServiceC1008.m2815();
            }
            if (r2.f4011 == null) {
                int i = ExecutorServiceC1008.m2816() >= 4 ? 2 : 1;
                ExecutorServiceC1008.AbstractC1009 r3 = ExecutorServiceC1008.AbstractC1009.f4413;
                if (!TextUtils.isEmpty("animation")) {
                    r2.f4011 = new ExecutorServiceC1008(new ThreadPoolExecutor(i, i, 0, TimeUnit.MILLISECONDS, new PriorityBlockingQueue(), new ExecutorServiceC1008.ThreadFactoryC1011("animation", r3, true)));
                } else {
                    throw new IllegalArgumentException(C1293.m3412("Name must be non-null and non-empty, but given: ", "animation"));
                }
            }
            if (r2.f4016 == null) {
                r2.f4016 = new C0996(new C0996.C0999(applicationContext));
            }
            if (r2.f4023 == null) {
                r2.f4023 = new C1185();
            }
            if (r2.f4010 == null) {
                int i2 = r2.f4016.f4383;
                if (i2 > 0) {
                    r2.f4010 = new C0972((long) i2);
                } else {
                    r2.f4010 = new C0962();
                }
            }
            if (r2.f4025 == null) {
                r2.f4025 = new C0964(r2.f4016.f4384);
            }
            if (r2.f4013 == null) {
                r2.f4013 = new C1003((long) r2.f4016.f4382);
            }
            if (r2.f4026 == null) {
                r2.f4026 = new C0992(applicationContext);
            }
            if (r2.f4017 == null) {
                r2.f4017 = new C1013(r2.f4013, r2.f4026, r2.f4018, r2.f4024, new ExecutorServiceC1008(new ThreadPoolExecutor(0, Integer.MAX_VALUE, ExecutorServiceC1008.f4411, TimeUnit.MILLISECONDS, new SynchronousQueue(), new ExecutorServiceC1008.ThreadFactoryC1011("source-unlimited", ExecutorServiceC1008.AbstractC1009.f4413, false))), r2.f4011, r2.f4021);
            }
            List<AbstractC1200<Object>> list2 = r2.f4012;
            if (list2 == null) {
                r2.f4012 = Collections.emptyList();
            } else {
                r2.f4012 = Collections.unmodifiableList(list2);
            }
            ComponentCallbacks2C1161 r1 = new ComponentCallbacks2C1161(applicationContext, r2.f4017, r2.f4013, r2.f4010, r2.f4025, new C1179(r2.f4027), r2.f4023, r2.f4015, r2.f4020, r2.f4019, r2.f4012, r2.f4014, r2.f4022);
            for (AbstractC1222 r32 : list) {
                try {
                    r32.m3300(applicationContext, r1, r1.f4668);
                } catch (AbstractMethodError e2) {
                    StringBuilder r22 = C1293.m3416("Attempting to register a Glide v3 module. If you see this, you or one of your dependencies may be including Glide v3 even though you're using Glide v4. You'll need to find and remove (or update) the offending dependency. The v3 module name is: ");
                    r22.append(r32.getClass().getName());
                    throw new IllegalStateException(r22.toString(), e2);
                }
            }
            if (generatedAppGlideModule != null) {
                generatedAppGlideModule.m3301(applicationContext, r1, r1.f4668);
            }
            applicationContext.registerComponentCallbacks(r1);
            f4666 = r1;
            f4665 = false;
            return;
        }
        throw new IllegalStateException("You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead");
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m3108(Exception exc) {
        throw new IllegalStateException("GeneratedAppGlideModuleImpl is implemented incorrectly. If you've manually implemented this class, remove your implementation. The Annotation processor will generate a correct implementation.", exc);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static ComponentCallbacks2C1163 m3106(FragmentActivity fragmentActivity) {
        C1841.m4783((Object) fragmentActivity, "You cannot start a load on a not yet attached View or a Fragment where getActivity() returns null (which usually occurs when getActivity() is called before the Fragment is attached or after the Fragment is destroyed).");
        return m3105((Context) fragmentActivity).f4671.m3156(fragmentActivity);
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m3111(AbstractC1211<?> r4) {
        synchronized (this.f4669) {
            for (ComponentCallbacks2C1163 r2 : this.f4669) {
                if (r2.m3116(r4)) {
                    return true;
                }
            }
            return false;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3110(ComponentCallbacks2C1163 r3) {
        synchronized (this.f4669) {
            if (!this.f4669.contains(r3)) {
                this.f4669.add(r3);
            } else {
                throw new IllegalStateException("Cannot register already registered manager");
            }
        }
    }
}
