翰林优商.apk(点击下载) / e.java


package com.kwai.sodler.lib.kwai.b;

import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Resources;
import com.kwad.sdk.utils.r;

/* access modifiers changed from: package-private */
public final class e extends ContextWrapper implements b {
    private Resources.Theme aRt;
    private int aRu = -1;
    private String bLp;
    private final Context mContext;

    e(Context context, String str) {
        super(context);
        this.mContext = context;
        this.bLp = str;
        this.aRu = ((Integer) r.a((Object) context, "getThemeResId", new Object[0])).intValue();
    }

    public final Context getApplicationContext() {
        return a.aF(super.getApplicationContext(), this.bLp);
    }

    public final Context getBaseContext() {
        return this.mContext;
    }

    public final ClassLoader getClassLoader() {
        return a.b(super.getClassLoader(), this.bLp);
    }

    @Override // com.kwai.sodler.lib.kwai.b.b
    public final Context getDelegatedContext() {
        return this.mContext;
    }

    public final Resources getResources() {
        return a.a(super.getResources(), this.bLp);
    }

    @Override // android.content.Context, android.content.ContextWrapper
    public final Object getSystemService(String str) {
        return a.wrapSystemService(super.getSystemService(str), str, this);
    }

    public final Resources.Theme getTheme() {
        Resources.Theme theme;
        try {
            theme = super.getTheme();
        } catch (Exception e) {
            e.printStackTrace();
            theme = null;
        }
        Resources.Theme theme2 = this.aRt;
        if (theme2 == null || theme2 == theme) {
            this.aRt = a.a(theme, theme2, this.aRu, this.bLp);
        }
        return this.aRt;
    }

    public final void registerComponentCallbacks(ComponentCallbacks componentCallbacks) {
        this.mContext.registerComponentCallbacks(componentCallbacks);
    }

    public final void setTheme(int i) {
        this.aRu = i;
        super.setTheme(i);
    }

    public final void unregisterComponentCallbacks(ComponentCallbacks componentCallbacks) {
        this.mContext.unregisterComponentCallbacks(componentCallbacks);
    }
}