package p037.p041.p049;

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.view.LayoutInflater;
import p037.p041.C1476;

/* JADX INFO: renamed from: މ.ؠ.ލ.ހ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C1550 extends ContextWrapper {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public int f4924;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public Resources.Theme f4925;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public LayoutInflater f4926;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public Configuration f4927;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public Resources f4928;

    public C1550() {
        super(null);
    }

    public C1550(Context context, int i) {
        super(context);
        this.f4924 = i;
    }

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

    @Override // android.content.ContextWrapper
    public void attachBaseContext(Context context) {
        super.attachBaseContext(context);
    }

    @Override // android.content.ContextWrapper, android.content.Context
    public AssetManager getAssets() {
        return getResources().getAssets();
    }

    @Override // android.content.ContextWrapper, android.content.Context
    public Resources getResources() {
        if (this.f4928 == null) {
            Configuration configuration = this.f4927;
            if (configuration == null) {
                this.f4928 = super.getResources();
            } else {
                this.f4928 = createConfigurationContext(configuration).getResources();
            }
        }
        return this.f4928;
    }

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

    @Override // android.content.ContextWrapper, android.content.Context
    public Resources.Theme getTheme() {
        Resources.Theme theme = this.f4925;
        if (theme != null) {
            return theme;
        }
        if (this.f4924 == 0) {
            this.f4924 = C1476.Theme_AppCompat_Light;
        }
        m3049();
        return this.f4925;
    }

    @Override // android.content.ContextWrapper, android.content.Context
    public void setTheme(int i) {
        if (this.f4924 != i) {
            this.f4924 = i;
            m3049();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m3049() {
        if (this.f4925 == null) {
            this.f4925 = getResources().newTheme();
            Resources.Theme theme = getBaseContext().getTheme();
            if (theme != null) {
                this.f4925.setTo(theme);
            }
        }
        this.f4925.applyStyle(this.f4924, true);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3050(Configuration configuration) {
        if (this.f4928 != null) {
            throw new IllegalStateException("getResources() or getAssets() has already been called");
        }
        if (this.f4927 != null) {
            throw new IllegalStateException("Override configuration has already been set");
        }
        this.f4927 = new Configuration(configuration);
    }
}
