package ῲ.ῲ.ඓ;

import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.view.LayoutInflater;
import androidx.appcompat.R$style;

/* renamed from: ῲ.ῲ.ඓ.㸾  reason: contains not printable characters */
/* compiled from: ContextThemeWrapper */
public class C1937 extends ContextWrapper {

    /* renamed from: ʬ  reason: contains not printable characters */
    public LayoutInflater f6613;

    /* renamed from: ඓ  reason: contains not printable characters */
    public Resources f6614;

    /* renamed from: ῲ  reason: contains not printable characters */
    public Resources.Theme f6615;

    /* renamed from: K  reason: contains not printable characters */
    public int f6616;

    /* renamed from: 㸾  reason: contains not printable characters */
    public Configuration f6617;

    public C1937() {
        super(null);
    }

    public void attachBaseContext(Context context) {
        super.attachBaseContext(context);
    }

    public AssetManager getAssets() {
        return getResources().getAssets();
    }

    public Resources getResources() {
        if (this.f6614 == null) {
            Configuration configuration = this.f6617;
            if (configuration == null) {
                this.f6614 = super.getResources();
            } else {
                int i = Build.VERSION.SDK_INT;
                this.f6614 = createConfigurationContext(configuration).getResources();
            }
        }
        return this.f6614;
    }

    @Override // android.content.Context, android.content.ContextWrapper
    public Object getSystemService(String str) {
        if (!"layout_inflater".equals(str)) {
            return getBaseContext().getSystemService(str);
        }
        if (this.f6613 == null) {
            this.f6613 = LayoutInflater.from(getBaseContext()).cloneInContext(this);
        }
        return this.f6613;
    }

    public Resources.Theme getTheme() {
        Resources.Theme theme = this.f6615;
        if (theme != null) {
            return theme;
        }
        if (this.f6616 == 0) {
            this.f6616 = R$style.Theme_AppCompat_Light;
        }
        m5011();
        return this.f6615;
    }

    public void setTheme(int i) {
        if (this.f6616 != i) {
            this.f6616 = i;
            m5011();
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5012(Configuration configuration) {
        if (this.f6614 != null) {
            throw new IllegalStateException("getResources() or getAssets() has already been called");
        } else if (this.f6617 == null) {
            this.f6617 = new Configuration(configuration);
        } else {
            throw new IllegalStateException("Override configuration has already been set");
        }
    }

    public C1937(Context context, int i) {
        super(context);
        this.f6616 = i;
    }

    public C1937(Context context, Resources.Theme theme) {
        super(context);
        this.f6615 = theme;
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m5011() {
        if (this.f6615 == null) {
            this.f6615 = getResources().newTheme();
            Resources.Theme theme = getBaseContext().getTheme();
            if (theme != null) {
                this.f6615.setTo(theme);
            }
        }
        this.f6615.applyStyle(this.f6616, true);
    }
}
