package androidx.appcompat.widget;

import X.AnonymousClass19K;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
import android.content.res.Resources;
import com.bytedance.covode.number.Covode;

public class am extends ContextWrapper {
    public static final Object LIZ = new Object();
    public final Resources LIZIZ;
    public final Resources.Theme LIZJ;

    public Resources getResources() {
        return this.LIZIZ;
    }

    public AssetManager getAssets() {
        return this.LIZIZ.getAssets();
    }

    static {
        Covode.recordClassIndex(494);
    }

    public Resources.Theme getTheme() {
        Resources.Theme theme = this.LIZJ;
        if (theme == null) {
            return super.getTheme();
        }
        return theme;
    }

    public static Context LIZ(Context context) {
        if (!(context instanceof am) && !(context.getResources() instanceof AnonymousClass19K)) {
            context.getResources();
        }
        return context;
    }

    public void setTheme(int i) {
        Resources.Theme theme = this.LIZJ;
        if (theme == null) {
            super.setTheme(i);
        } else {
            theme.applyStyle(i, true);
        }
    }
}
