VectorEnabledTintResources.java
1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package android.support.v7.widget;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.support.v7.app.AppCompatDelegate;
import java.lang.ref.WeakReference;
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public class VectorEnabledTintResources
extends Resources
{
public static final int MAX_SDK_WHERE_REQUIRED = 20;
private final WeakReference<Context> a;
public VectorEnabledTintResources(@NonNull Context paramContext, @NonNull Resources paramResources)
{
super(paramResources.getAssets(), paramResources.getDisplayMetrics(), paramResources.getConfiguration());
this.a = new WeakReference(paramContext);
}
public static boolean shouldBeUsed()
{
return (AppCompatDelegate.isCompatVectorFromResourcesEnabled()) && (Build.VERSION.SDK_INT <= 20);
}
public Drawable getDrawable(int paramInt)
throws Resources.NotFoundException
{
Context localContext = (Context)this.a.get();
if (localContext != null)
{
AppCompatDrawableManager localAppCompatDrawableManager = AppCompatDrawableManager.get();
Drawable localDrawable2 = localAppCompatDrawableManager.a(localContext, paramInt);
Drawable localDrawable1 = localDrawable2;
if (localDrawable2 == null) {
localDrawable1 = super.getDrawable(paramInt);
}
if (localDrawable1 != null) {
return localAppCompatDrawableManager.a(localContext, paramInt, false, localDrawable1);
}
return null;
}
return super.getDrawable(paramInt);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/widget/VectorEnabledTintResources.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/