package com.kwai.sodler.lib.kwai.b; import android.content.ComponentCallbacks; import android.content.Context; import android.content.res.Resources; import android.view.ContextThemeWrapper; import com.kwad.sdk.utils.r; /* access modifiers changed from: package-private */ public final class c extends ContextThemeWrapper implements b { private final ContextThemeWrapper aRs; private Resources.Theme aRt; private int aRu; private String bLp; c(ContextThemeWrapper contextThemeWrapper, String str) { super(contextThemeWrapper, 0); this.aRs = contextThemeWrapper; this.bLp = str; this.aRu = ((Integer) r.a((Object) contextThemeWrapper, "getThemeResId", new Object[0])).intValue(); } public final Context getApplicationContext() { return a.aF(super.getApplicationContext(), this.bLp); } public final Context getBaseContext() { return this.aRs; } 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.aRs; } public final Resources getResources() { return a.a(super.getResources(), this.bLp); } @Override // android.content.Context, android.view.ContextThemeWrapper, android.content.ContextWrapper public final Object getSystemService(String str) { return a.wrapSystemService(this.aRs.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.aRs.registerComponentCallbacks(componentCallbacks); } @Override // android.view.ContextThemeWrapper public final void setTheme(int i) { this.aRu = i; super.setTheme(i); } public final void unregisterComponentCallbacks(ComponentCallbacks componentCallbacks) { this.aRs.unregisterComponentCallbacks(componentCallbacks); } }