fp.java
4.33 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.graphics.ColorUtils;
import android.support.v7.appcompat.R.attr;
import android.support.v7.appcompat.R.styleable;
import android.util.AttributeSet;
import android.util.StateSet;
import android.util.Xml;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public final class fp
{
@NonNull
public static ColorStateList a(@NonNull Resources paramResources, @NonNull XmlPullParser paramXmlPullParser, @Nullable Resources.Theme paramTheme)
throws XmlPullParserException, IOException
{
AttributeSet localAttributeSet = Xml.asAttributeSet(paramXmlPullParser);
int i;
do
{
i = paramXmlPullParser.next();
} while ((i != 2) && (i != 1));
if (i != 2) {
throw new XmlPullParserException("No start tag found");
}
String str = paramXmlPullParser.getName();
if (!str.equals("selector")) {
throw new XmlPullParserException(paramXmlPullParser.getPositionDescription() + ": invalid color state list tag " + str);
}
return a(paramResources, paramXmlPullParser, localAttributeSet, paramTheme);
}
private static ColorStateList a(@NonNull Resources paramResources, @NonNull XmlPullParser paramXmlPullParser, @NonNull AttributeSet paramAttributeSet, @Nullable Resources.Theme paramTheme)
throws XmlPullParserException, IOException
{
int n = paramXmlPullParser.getDepth() + 1;
int[][] arrayOfInt = new int[20][];
int[] arrayOfInt1 = new int[20];
int j = 0;
int i;
int k;
do
{
i = paramXmlPullParser.next();
if (i == 1) {
break;
}
k = paramXmlPullParser.getDepth();
if ((k < n) && (i == 3)) {
break;
}
} while ((i != 2) || (k > n) || (!paramXmlPullParser.getName().equals("item")));
Object localObject = R.styleable.ColorStateListItem;
label106:
int i1;
float f;
label143:
label168:
int m;
if (paramTheme == null)
{
localObject = paramResources.obtainAttributes(paramAttributeSet, (int[])localObject);
i1 = ((TypedArray)localObject).getColor(R.styleable.ColorStateListItem_android_color, -65281);
f = 1.0F;
if (!((TypedArray)localObject).hasValue(R.styleable.ColorStateListItem_android_alpha)) {
break label255;
}
f = ((TypedArray)localObject).getFloat(R.styleable.ColorStateListItem_android_alpha, 1.0F);
((TypedArray)localObject).recycle();
i = 0;
int i2 = paramAttributeSet.getAttributeCount();
localObject = new int[i2];
k = 0;
if (k >= i2) {
break label288;
}
m = paramAttributeSet.getAttributeNameResource(k);
if ((m == 16843173) || (m == 16843551) || (m == R.attr.alpha)) {
break label387;
}
if (!paramAttributeSet.getAttributeBooleanValue(k, false)) {
break label280;
}
label219:
localObject[i] = m;
i += 1;
}
label255:
label280:
label288:
label387:
for (;;)
{
k += 1;
break label168;
localObject = paramTheme.obtainStyledAttributes(paramAttributeSet, (int[])localObject, 0, 0);
break label106;
if (!((TypedArray)localObject).hasValue(R.styleable.ColorStateListItem_alpha)) {
break label143;
}
f = ((TypedArray)localObject).getFloat(R.styleable.ColorStateListItem_alpha, 1.0F);
break label143;
m = -m;
break label219;
localObject = StateSet.trimStateSet((int[])localObject, i);
arrayOfInt1 = fq.a(arrayOfInt1, j, ColorUtils.setAlphaComponent(i1, Math.round(Color.alpha(i1) * f)));
arrayOfInt = (int[][])fq.a(arrayOfInt, j, localObject);
j += 1;
break;
paramResources = new int[j];
paramXmlPullParser = new int[j][];
System.arraycopy(arrayOfInt1, 0, paramResources, 0, j);
System.arraycopy(arrayOfInt, 0, paramXmlPullParser, 0, j);
return new ColorStateList(paramXmlPullParser, paramResources);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/fp.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/