package p138.p145.p146;

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 com.bumptech.glide.GeneratedAppGlideModule;
import com.bumptech.glide.GeneratedAppGlideModuleImpl;
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 p138.p139.p143.p144.C2803;
import p138.p145.p146.p148.InterfaceC2830;
import p138.p145.p146.p149.p150.C2836;
import p138.p145.p146.p151.InterfaceC2850;
import p138.p145.p146.p151.p152.C2869;
import p138.p145.p146.p151.p152.C2872;
import p138.p145.p146.p151.p152.InterfaceC2858;
import p138.p145.p146.p151.p154.C2909;
import p138.p145.p146.p151.p154.p155.C2943;
import p138.p145.p146.p151.p154.p155.C2948;
import p138.p145.p146.p151.p154.p155.C2951;
import p138.p145.p146.p151.p154.p155.InterfaceC2940;
import p138.p145.p146.p151.p154.p155.InterfaceC2942;
import p138.p145.p146.p151.p154.p156.C2971;
import p138.p145.p146.p151.p154.p156.C2972;
import p138.p145.p146.p151.p154.p156.C2975;
import p138.p145.p146.p151.p154.p156.InterfaceC2973;
import p138.p145.p146.p151.p154.p157.ExecutorServiceC2982;
import p138.p145.p146.p151.p158.C2987;
import p138.p145.p146.p151.p158.C2991;
import p138.p145.p146.p151.p158.C2998;
import p138.p145.p146.p151.p158.C2999;
import p138.p145.p146.p151.p158.C3002;
import p138.p145.p146.p151.p158.C3007;
import p138.p145.p146.p151.p158.C3015;
import p138.p145.p146.p151.p158.C3021;
import p138.p145.p146.p151.p158.C3040;
import p138.p145.p146.p151.p158.C3045;
import p138.p145.p146.p151.p158.C3046;
import p138.p145.p146.p151.p158.C3050;
import p138.p145.p146.p151.p158.C3053;
import p138.p145.p146.p151.p158.C3058;
import p138.p145.p146.p151.p158.p159.C3060;
import p138.p145.p146.p151.p158.p159.C3062;
import p138.p145.p146.p151.p158.p159.C3064;
import p138.p145.p146.p151.p158.p159.C3066;
import p138.p145.p146.p151.p158.p159.C3068;
import p138.p145.p146.p151.p158.p159.C3073;
import p138.p145.p146.p151.p160.p161.C3079;
import p138.p145.p146.p151.p160.p161.C3080;
import p138.p145.p146.p151.p160.p161.C3081;
import p138.p145.p146.p151.p160.p161.C3085;
import p138.p145.p146.p151.p160.p161.C3086;
import p138.p145.p146.p151.p160.p161.C3095;
import p138.p145.p146.p151.p160.p161.C3101;
import p138.p145.p146.p151.p160.p161.C3107;
import p138.p145.p146.p151.p160.p161.C3109;
import p138.p145.p146.p151.p160.p161.C3112;
import p138.p145.p146.p151.p160.p161.C3113;
import p138.p145.p146.p151.p160.p161.C3117;
import p138.p145.p146.p151.p160.p161.C3119;
import p138.p145.p146.p151.p160.p162.C3128;
import p138.p145.p146.p151.p160.p163.C3134;
import p138.p145.p146.p151.p160.p163.C3135;
import p138.p145.p146.p151.p160.p164.C3136;
import p138.p145.p146.p151.p160.p165.C3138;
import p138.p145.p146.p151.p160.p165.C3142;
import p138.p145.p146.p151.p160.p165.C3144;
import p138.p145.p146.p151.p160.p165.C3151;
import p138.p145.p146.p151.p160.p165.C3153;
import p138.p145.p146.p151.p160.p166.C3154;
import p138.p145.p146.p151.p160.p166.C3155;
import p138.p145.p146.p151.p160.p166.C3156;
import p138.p145.p146.p151.p160.p166.C3157;
import p138.p145.p146.p167.C3169;
import p138.p145.p146.p167.C3176;
import p138.p145.p146.p167.InterfaceC3166;
import p138.p145.p146.p168.C3188;
import p138.p145.p146.p168.InterfaceC3186;
import p138.p145.p146.p170.InterfaceC3202;
import p138.p145.p146.p170.p171.C3215;
import p138.p145.p146.p170.p171.InterfaceC3217;
import p138.p145.p146.p174.C3237;
import p138.p145.p146.p174.C3240;

/* JADX INFO: renamed from: ދ.ؠ.֏.ހ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class ComponentCallbacks2C2806 implements ComponentCallbacks2 {

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public static volatile ComponentCallbacks2C2806 f8631;

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public static volatile boolean f8632;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final C2909 f8633;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final InterfaceC2942 f8634;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final InterfaceC2973 f8635;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final C2810 f8636;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final Registry f8637;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final InterfaceC2940 f8638;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public final C3176 f8639;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public final InterfaceC3166 f8640;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final List<ComponentCallbacks2C2816> f8641 = new ArrayList();

    /* JADX INFO: renamed from: ދ.ؠ.֏.ހ$֏, reason: contains not printable characters */
    public interface InterfaceC2807 {
    }

    public ComponentCallbacks2C2806(Context context, C2909 c2909, InterfaceC2973 interfaceC2973, InterfaceC2942 interfaceC2942, InterfaceC2940 interfaceC2940, C3176 c3176, InterfaceC3166 interfaceC3166, int i, InterfaceC2807 interfaceC2807, Map<Class<?>, AbstractC2820<?, ?>> map, List<InterfaceC3202<Object>> list, boolean z, boolean z2) {
        InterfaceC2850 c3085;
        InterfaceC2850 c3113;
        EnumC2811 enumC2811 = EnumC2811.NORMAL;
        this.f8633 = c2909;
        this.f8634 = interfaceC2942;
        this.f8638 = interfaceC2940;
        this.f8635 = interfaceC2973;
        this.f8639 = c3176;
        this.f8640 = interfaceC3166;
        Resources resources = context.getResources();
        Registry registry = new Registry();
        this.f8637 = registry;
        registry.f1513.m5251(new DefaultImageHeaderParser());
        if (Build.VERSION.SDK_INT >= 27) {
            Registry registry2 = this.f8637;
            registry2.f1513.m5251(new C3101());
        }
        List<ImageHeaderParser> listM1034 = this.f8637.m1034();
        C3138 c3138 = new C3138(context, listM1034, interfaceC2942, interfaceC2940);
        C3119 c3119 = new C3119(interfaceC2942, new C3119.C3126());
        C3095 c3095 = new C3095(this.f8637.m1034(), resources.getDisplayMetrics(), interfaceC2942, interfaceC2940);
        if (!z2 || Build.VERSION.SDK_INT < 28) {
            c3085 = new C3085(c3095);
            c3113 = new C3113(c3095, interfaceC2940);
        } else {
            c3113 = new C3107();
            c3085 = new C3086();
        }
        C3134 c3134 = new C3134(context);
        C3040.C3043 c3043 = new C3040.C3043(resources);
        C3040.C3044 c3044 = new C3040.C3044(resources);
        C3040.C3042 c3042 = new C3040.C3042(resources);
        C3040.C3041 c3041 = new C3040.C3041(resources);
        C3081 c3081 = new C3081(interfaceC2940);
        C3154 c3154 = new C3154();
        C3157 c3157 = new C3157();
        ContentResolver contentResolver = context.getContentResolver();
        Registry registry3 = this.f8637;
        registry3.f1508.m5249(ByteBuffer.class, new C2998());
        registry3.f1508.m5249(InputStream.class, new C3045(interfaceC2940));
        registry3.f1509.m5258("Bitmap", c3085, ByteBuffer.class, Bitmap.class);
        registry3.f1509.m5258("Bitmap", c3113, InputStream.class, Bitmap.class);
        Registry registry4 = this.f8637;
        registry4.f1509.m5258("Bitmap", new C3109(c3095), ParcelFileDescriptor.class, Bitmap.class);
        Registry registry5 = this.f8637;
        registry5.f1509.m5258("Bitmap", c3119, ParcelFileDescriptor.class, Bitmap.class);
        registry5.f1509.m5258("Bitmap", new C3119(interfaceC2942, new C3119.C3122(null)), AssetFileDescriptor.class, Bitmap.class);
        registry5.f1507.m5149(Bitmap.class, Bitmap.class, C3050.C3051.f9233);
        registry5.f1509.m5258("Bitmap", new C3117(), Bitmap.class, Bitmap.class);
        registry5.f1510.m5263(Bitmap.class, c3081);
        registry5.f1509.m5258("BitmapDrawable", new C3079(resources, c3085), ByteBuffer.class, BitmapDrawable.class);
        registry5.f1509.m5258("BitmapDrawable", new C3079(resources, c3113), InputStream.class, BitmapDrawable.class);
        registry5.f1509.m5258("BitmapDrawable", new C3079(resources, c3119), ParcelFileDescriptor.class, BitmapDrawable.class);
        registry5.f1510.m5263(BitmapDrawable.class, new C3080(interfaceC2942, c3081));
        registry5.f1509.m5258("Gif", new C3153(listM1034, c3138, interfaceC2940), InputStream.class, C3142.class);
        registry5.f1509.m5258("Gif", c3138, ByteBuffer.class, C3142.class);
        registry5.f1510.m5263(C3142.class, new C3144());
        registry5.f1507.m5149(InterfaceC2830.class, InterfaceC2830.class, C3050.C3051.f9233);
        registry5.f1509.m5258("Bitmap", new C3151(interfaceC2942), InterfaceC2830.class, Bitmap.class);
        registry5.f1509.m5258("legacy_append", c3134, Uri.class, Drawable.class);
        registry5.f1509.m5258("legacy_append", new C3112(c3134, interfaceC2942), Uri.class, Bitmap.class);
        registry5.f1511.m4996((InterfaceC2858.InterfaceC2859<?>) new C3128.C3129());
        registry5.f1507.m5149(File.class, ByteBuffer.class, new C2999.C3001());
        registry5.f1507.m5149(File.class, InputStream.class, new C3007.C3013());
        registry5.f1509.m5258("legacy_append", new C3136(), File.class, File.class);
        registry5.f1507.m5149(File.class, ParcelFileDescriptor.class, new C3007.C3009());
        registry5.f1507.m5149(File.class, File.class, C3050.C3051.f9233);
        registry5.f1511.m4996((InterfaceC2858.InterfaceC2859<?>) new C2869.C2870(interfaceC2940));
        Registry registry6 = this.f8637;
        registry6.f1511.m4996((InterfaceC2858.InterfaceC2859<?>) new C2872.C2873());
        Registry registry7 = this.f8637;
        registry7.f1507.m5149(Integer.TYPE, InputStream.class, c3043);
        registry7.f1507.m5149(Integer.TYPE, ParcelFileDescriptor.class, c3042);
        registry7.f1507.m5149(Integer.class, InputStream.class, c3043);
        registry7.f1507.m5149(Integer.class, ParcelFileDescriptor.class, c3042);
        registry7.f1507.m5149(Integer.class, Uri.class, c3044);
        registry7.f1507.m5149(Integer.TYPE, AssetFileDescriptor.class, c3041);
        registry7.f1507.m5149(Integer.class, AssetFileDescriptor.class, c3041);
        registry7.f1507.m5149(Integer.TYPE, Uri.class, c3044);
        registry7.f1507.m5149(String.class, InputStream.class, new C3002.C3005());
        registry7.f1507.m5149(Uri.class, InputStream.class, new C3002.C3005());
        registry7.f1507.m5149(String.class, InputStream.class, new C3046.C3049());
        registry7.f1507.m5149(String.class, ParcelFileDescriptor.class, new C3046.C3048());
        registry7.f1507.m5149(String.class, AssetFileDescriptor.class, new C3046.C3047());
        registry7.f1507.m5149(Uri.class, InputStream.class, new C3062.C3063());
        registry7.f1507.m5149(Uri.class, InputStream.class, new C2987.C2990(context.getAssets()));
        registry7.f1507.m5149(Uri.class, ParcelFileDescriptor.class, new C2987.C2989(context.getAssets()));
        registry7.f1507.m5149(Uri.class, InputStream.class, new C3064.C3065(context));
        registry7.f1507.m5149(Uri.class, InputStream.class, new C3066.C3067(context));
        if (Build.VERSION.SDK_INT >= 29) {
            Registry registry8 = this.f8637;
            registry8.f1507.m5149(Uri.class, InputStream.class, new C3068.C3071(context));
            Registry registry9 = this.f8637;
            registry9.f1507.m5149(Uri.class, ParcelFileDescriptor.class, new C3068.C3070(context));
        }
        Registry registry10 = this.f8637;
        registry10.f1507.m5149(Uri.class, InputStream.class, new C3053.C3057(contentResolver));
        registry10.f1507.m5149(Uri.class, ParcelFileDescriptor.class, new C3053.C3055(contentResolver));
        registry10.f1507.m5149(Uri.class, AssetFileDescriptor.class, new C3053.C3054(contentResolver));
        registry10.f1507.m5149(Uri.class, InputStream.class, new C3058.C3059());
        registry10.f1507.m5149(URL.class, InputStream.class, new C3073.C3074());
        registry10.f1507.m5149(Uri.class, File.class, new C3021.C3022(context));
        registry10.f1507.m5149(C3015.class, InputStream.class, new C3060.C3061());
        registry10.f1507.m5149(byte[].class, ByteBuffer.class, new C2991.C2992());
        registry10.f1507.m5149(byte[].class, InputStream.class, new C2991.C2996());
        registry10.f1507.m5149(Uri.class, Uri.class, C3050.C3051.f9233);
        registry10.f1507.m5149(Drawable.class, Drawable.class, C3050.C3051.f9233);
        registry10.f1509.m5258("legacy_append", new C3135(), Drawable.class, Drawable.class);
        registry10.f1512.m5224(Bitmap.class, BitmapDrawable.class, new C3155(resources));
        registry10.f1512.m5224(Bitmap.class, byte[].class, c3154);
        registry10.f1512.m5224(Drawable.class, byte[].class, new C3156(interfaceC2942, c3154, c3157));
        registry10.f1512.m5224(C3142.class, byte[].class, c3157);
        if (Build.VERSION.SDK_INT >= 23) {
            C3119 c31192 = new C3119(interfaceC2942, new C3119.C3123());
            this.f8637.f1509.m5258("legacy_append", c31192, ByteBuffer.class, Bitmap.class);
            Registry registry11 = this.f8637;
            registry11.f1509.m5258("legacy_append", new C3079(resources, c31192), ByteBuffer.class, BitmapDrawable.class);
        }
        this.f8636 = new C2810(context, interfaceC2940, this.f8637, new C3215(), interfaceC2807, map, list, c2909, z, i);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static ComponentCallbacks2C2806 m4903(Context context) {
        if (f8631 == null) {
            GeneratedAppGlideModule generatedAppGlideModule = 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");
                }
            } catch (IllegalAccessException e) {
                m4905(e);
                throw null;
            } catch (InstantiationException e2) {
                m4905(e2);
                throw null;
            } catch (NoSuchMethodException e3) {
                m4905(e3);
                throw null;
            } catch (InvocationTargetException e4) {
                m4905(e4);
                throw null;
            }
            synchronized (ComponentCallbacks2C2806.class) {
                if (f8631 == null) {
                    m4904(context, generatedAppGlideModule);
                }
            }
        }
        return f8631;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m4904(Context context, GeneratedAppGlideModule generatedAppGlideModule) {
        if (f8632) {
            throw new IllegalStateException("You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead");
        }
        f8632 = true;
        C2808 c2808 = new C2808();
        Context applicationContext = context.getApplicationContext();
        Collections.emptyList();
        if (generatedAppGlideModule != null && ((GeneratedAppGlideModuleImpl) generatedAppGlideModule).f1506 == null) {
            throw null;
        }
        if (Log.isLoggable("ManifestParser", 3)) {
            Log.d("ManifestParser", "Loading Glide modules");
        }
        ArrayList<InterfaceC3186> 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(C3188.m5246(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");
            }
            if (generatedAppGlideModule != null && !Collections.emptySet().isEmpty()) {
                Set setEmptySet = Collections.emptySet();
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    InterfaceC3186 interfaceC3186 = (InterfaceC3186) it.next();
                    if (setEmptySet.contains(interfaceC3186.getClass())) {
                        if (Log.isLoggable("Glide", 3)) {
                            Log.d("Glide", "AppGlideModule excludes manifest GlideModule: " + interfaceC3186);
                        }
                        it.remove();
                    }
                }
            }
            if (Log.isLoggable("Glide", 3)) {
                for (InterfaceC3186 interfaceC31862 : arrayList) {
                    StringBuilder sbM4889 = C2803.m4889("Discovered GlideModule from manifest: ");
                    sbM4889.append(interfaceC31862.getClass());
                    Log.d("Glide", sbM4889.toString());
                }
            }
            c2808.f8654 = generatedAppGlideModule != null ? new C2804() : null;
            Iterator it2 = arrayList.iterator();
            while (it2.hasNext()) {
                ((InterfaceC3186) it2.next()).mo1033(applicationContext, c2808);
            }
            if (generatedAppGlideModule != null && ((GeneratedAppGlideModuleImpl) generatedAppGlideModule).f1506 == null) {
                throw null;
            }
            if (c2808.f8647 == null) {
                c2808.f8647 = ExecutorServiceC2982.m5131();
            }
            if (c2808.f8648 == null) {
                c2808.f8648 = ExecutorServiceC2982.m5130();
            }
            if (c2808.f8655 == null) {
                int i = ExecutorServiceC2982.m5129() >= 4 ? 2 : 1;
                ExecutorServiceC2982.InterfaceC2985 interfaceC2985 = ExecutorServiceC2982.InterfaceC2985.f9156;
                if (TextUtils.isEmpty("animation")) {
                    throw new IllegalArgumentException(C2803.m4879("Name must be non-null and non-empty, but given: ", "animation"));
                }
                c2808.f8655 = new ExecutorServiceC2982(new ThreadPoolExecutor(i, i, 0L, TimeUnit.MILLISECONDS, new PriorityBlockingQueue(), new ExecutorServiceC2982.ThreadFactoryC2983("animation", interfaceC2985, true)));
            }
            if (c2808.f8650 == null) {
                c2808.f8650 = new C2975(new C2975.C2976(applicationContext));
            }
            if (c2808.f8651 == null) {
                c2808.f8651 = new C3169();
            }
            if (c2808.f8644 == null) {
                int i2 = c2808.f8650.f9129;
                if (i2 > 0) {
                    c2808.f8644 = new C2951(i2);
                } else {
                    c2808.f8644 = new C2943();
                }
            }
            if (c2808.f8645 == null) {
                c2808.f8645 = new C2948(c2808.f8650.f9132);
            }
            if (c2808.f8646 == null) {
                c2808.f8646 = new C2972(c2808.f8650.f9130);
            }
            if (c2808.f8649 == null) {
                c2808.f8649 = new C2971(applicationContext);
            }
            if (c2808.f8643 == null) {
                c2808.f8643 = new C2909(c2808.f8646, c2808.f8649, c2808.f8648, c2808.f8647, new ExecutorServiceC2982(new ThreadPoolExecutor(0, Integer.MAX_VALUE, ExecutorServiceC2982.f9147, TimeUnit.MILLISECONDS, new SynchronousQueue(), new ExecutorServiceC2982.ThreadFactoryC2983("source-unlimited", ExecutorServiceC2982.InterfaceC2985.f9156, false))), c2808.f8655, false);
            }
            List<InterfaceC3202<Object>> list = c2808.f8656;
            if (list == null) {
                c2808.f8656 = Collections.emptyList();
            } else {
                c2808.f8656 = Collections.unmodifiableList(list);
            }
            ComponentCallbacks2C2806 componentCallbacks2C2806 = new ComponentCallbacks2C2806(applicationContext, c2808.f8643, c2808.f8646, c2808.f8644, c2808.f8645, new C3176(c2808.f8654), c2808.f8651, c2808.f8652, c2808.f8653, c2808.f8642, c2808.f8656, false, false);
            for (InterfaceC3186 interfaceC31863 : arrayList) {
                try {
                    interfaceC31863.mo1032(applicationContext, componentCallbacks2C2806, componentCallbacks2C2806.f8637);
                } catch (AbstractMethodError e) {
                    StringBuilder sbM48892 = C2803.m4889("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: ");
                    sbM48892.append(interfaceC31863.getClass().getName());
                    throw new IllegalStateException(sbM48892.toString(), e);
                }
            }
            if (generatedAppGlideModule != null) {
                Registry registry = componentCallbacks2C2806.f8637;
                new C2836().mo1032(applicationContext, componentCallbacks2C2806, registry);
                ((GeneratedAppGlideModuleImpl) generatedAppGlideModule).f1506.֏(applicationContext, componentCallbacks2C2806, registry);
            }
            applicationContext.registerComponentCallbacks(componentCallbacks2C2806);
            f8631 = componentCallbacks2C2806;
            f8632 = false;
        } catch (PackageManager.NameNotFoundException e2) {
            throw new RuntimeException("Unable to find metadata to parse GlideModules", e2);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m4905(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);
    }

    @Override // android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
    }

    @Override // android.content.ComponentCallbacks
    public void onLowMemory() {
        m4906();
    }

    @Override // android.content.ComponentCallbacks2
    public void onTrimMemory(int i) {
        C3240.m5335();
        Iterator<ComponentCallbacks2C2816> it = this.f8641.iterator();
        while (it.hasNext()) {
            if (it.next() == null) {
                throw null;
            }
        }
        C2972 c2972 = (C2972) this.f8635;
        if (c2972 == null) {
            throw null;
        }
        if (i >= 40) {
            c2972.m5323(0L);
        } else if (i >= 20 || i == 15) {
            c2972.m5323(c2972.m5321() / 2);
        }
        this.f8634.mo5087(i);
        this.f8638.mo5079(i);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m4906() {
        C3240.m5335();
        ((C3237) this.f8635).m5323(0L);
        this.f8634.mo5086();
        this.f8638.mo5078();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m4907(ComponentCallbacks2C2816 componentCallbacks2C2816) {
        synchronized (this.f8641) {
            if (this.f8641.contains(componentCallbacks2C2816)) {
                throw new IllegalStateException("Cannot register already registered manager");
            }
            this.f8641.add(componentCallbacks2C2816);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean m4908(InterfaceC3217<?> interfaceC3217) {
        synchronized (this.f8641) {
            Iterator<ComponentCallbacks2C2816> it = this.f8641.iterator();
            while (it.hasNext()) {
                if (it.next().m4917(interfaceC3217)) {
                    return true;
                }
            }
            return false;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m4909(ComponentCallbacks2C2816 componentCallbacks2C2816) {
        synchronized (this.f8641) {
            if (!this.f8641.contains(componentCallbacks2C2816)) {
                throw new IllegalStateException("Cannot unregister not yet registered manager");
            }
            this.f8641.remove(componentCallbacks2C2816);
        }
    }
}
