mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 18:37:17 +01:00
28 lines
1.1 KiB
Java
28 lines
1.1 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.Resources;
|
|
import android.graphics.drawable.Drawable;
|
|
import androidx.annotation.NonNull;
|
|
import java.lang.ref.WeakReference;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
class TintResources extends ResourcesWrapper {
|
|
private final WeakReference<Context> mContextRef;
|
|
|
|
public TintResources(@NonNull Context context, @NonNull Resources resources) {
|
|
super(resources);
|
|
this.mContextRef = new WeakReference<>(context);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.ResourcesWrapper, android.content.res.Resources
|
|
public Drawable getDrawable(int i) throws Resources.NotFoundException {
|
|
Drawable drawableCanonical = getDrawableCanonical(i);
|
|
Context context = this.mContextRef.get();
|
|
if (drawableCanonical != null && context != null) {
|
|
ResourceManagerInternal.get().tintDrawableUsingColorFilter(context, i, drawableCanonical);
|
|
}
|
|
return drawableCanonical;
|
|
}
|
|
}
|