| | | |
Offset 6, 396 lines modified | Offset 6, 34 lines modified |
6 | #·annotations | 6 | #·annotations |
7 | .annotation·build·Landroid/annotation/SuppressLint; | 7 | .annotation·build·Landroid/annotation/SuppressLint; |
8 | ····value·=·{ | 8 | ····value·=·{ |
9 | ········"RestrictedAPI" | 9 | ········"RestrictedAPI" |
10 | ····} | 10 | ····} |
11 | .end·annotation | 11 | .end·annotation |
| |
12 | .annotation·system·Ldalvik/annotation/MemberClasses; | |
13 | ····value·=·{ | |
14 | ········Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry; | |
15 | ····} | |
16 | .end·annotation | |
| |
| |
17 | #·static·fields | |
18 | .field·private·static·final·TL_TYPED_VALUE:Ljava/lang/ThreadLocal; | |
19 | ····.annotation·system·Ldalvik/annotation/Signature; | |
20 | ········value·=·{ | |
21 | ············"Ljava/lang/ThreadLocal<", | |
22 | ············"Landroid/util/TypedValue;", | |
23 | ············">;" | |
24 | ········} | |
25 | ····.end·annotation | |
26 | .end·field | |
| |
27 | .field·private·static·final·sColorStateCacheLock:Ljava/lang/Object; | |
| |
28 | .field·private·static·final·sColorStateCaches:Ljava/util/WeakHashMap; | |
29 | ····.annotation·system·Ldalvik/annotation/Signature; | |
30 | ········value·=·{ | |
31 | ············"Ljava/util/WeakHashMap<", | |
32 | ············"Landroid/content/Context;", | |
33 | ············"Landroid/util/SparseArray<", | |
34 | ············"Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry;", | |
35 | ············">;>;" | |
36 | ········} | |
37 | ····.end·annotation | |
38 | .end·field | |
| |
| |
39 | #·direct·methods | 12 | #·direct·methods |
40 | .method·static·constructor·<clinit>()V | |
41 | ····.locals·2 | |
| |
42 | ····.line·50 | |
43 | ····new-instance·v0,·Ljava/lang/ThreadLocal; | |
| |
44 | ····invoke-direct·{v0},·Ljava/lang/ThreadLocal;-><init>()V | |
| |
45 | ····sput-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->TL_TYPED_VALUE:Ljava/lang/ThreadLocal; | |
| |
46 | ····.line·53 | |
47 | ····new-instance·v0,·Ljava/util/WeakHashMap; | |
| |
48 | ····const/4·v1,·0x0 | |
| |
49 | ····invoke-direct·{v0,·v1},·Ljava/util/WeakHashMap;-><init>(I)V | |
| |
50 | ····sput-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCaches:Ljava/util/WeakHashMap; | |
| |
51 | ····.line·55 | |
52 | ····new-instance·v0,·Ljava/lang/Object; | |
| |
53 | ····invoke-direct·{v0},·Ljava/lang/Object;-><init>()V | |
| |
54 | ····sput-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCacheLock:Ljava/lang/Object; | |
| |
55 | ····return-void | |
56 | .end·method | |
| |
57 | .method·private·static·addColorStateListToCache(Landroid/content/Context;ILandroid/content/res/ColorStateList;)V | |
58 | ····.locals·3 | |
| |
59 | ····.line·150 | |
60 | ····sget-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCacheLock:Ljava/lang/Object; | |
| |
61 | ····monitor-enter·v0 | |
| |
62 | ····.line·151 | |
63 | ····:try_start_0 | |
64 | ····sget-object·v1,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCaches:Ljava/util/WeakHashMap; | |
| |
65 | ····invoke-virtual·{v1,·p0},·Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
66 | ····move-result-object·v1 | |
| |
67 | ····check-cast·v1,·Landroid/util/SparseArray; | |
| |
68 | ····if-nez·v1,·:cond_0 | |
| |
69 | ····.line·153 | |
70 | ····new-instance·v1,·Landroid/util/SparseArray; | |
| |
71 | ····invoke-direct·{v1},·Landroid/util/SparseArray;-><init>()V | |
| |
72 | ····.line·154 | |
73 | ····sget-object·v2,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCaches:Ljava/util/WeakHashMap; | |
| |
74 | ····invoke-virtual·{v2,·p0,·v1},·Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; | |
| |
75 | ····.line·156 | |
76 | ····:cond_0 | |
77 | ····new-instance·v2,·Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry; | |
| |
78 | ····.line·157 | |
79 | ····invoke-virtual·{p0},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| |
80 | ····move-result-object·p0 | |
| |
81 | ····invoke-virtual·{p0},·Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration; | |
| |
82 | ····move-result-object·p0 | |
| |
83 | ····invoke-direct·{v2,·p2,·p0},·Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry;-><init>(Landroid/content/res/ColorStateList;Landroid/content/res/Configuration;)V | |
| |
84 | ····.line·156 | |
85 | ····invoke-virtual·{v1,·p1,·v2},·Landroid/util/SparseArray;->append(ILjava/lang/Object;)V | |
| |
86 | ····.line·158 | |
87 | ····monitor-exit·v0 | |
| |
88 | ····return-void | |
| |
89 | ····:catchall_0 | |
90 | ····move-exception·p0 | |
| |
91 | ····monitor-exit·v0 | |
92 | ····:try_end_0 | |
93 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_0 | |
| |
94 | ····throw·p0 | |
95 | .end·method | |
| |
96 | .method·private·static·getCachedColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | |
97 | ····.locals·4 | |
| |
98 | ····.line·130 | |
99 | ····sget-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCacheLock:Ljava/lang/Object; | |
| |
100 | ····monitor-enter·v0 | |
| |
101 | ····.line·131 | |
102 | ····:try_start_0 | |
103 | ····sget-object·v1,·Landroidx/appcompat/content/res/AppCompatResources;->sColorStateCaches:Ljava/util/WeakHashMap; | |
| |
104 | ····invoke-virtual·{v1,·p0},·Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
105 | ····move-result-object·v1 | |
| |
106 | ····check-cast·v1,·Landroid/util/SparseArray; | |
| |
107 | ····if-eqz·v1,·:cond_1 | |
| |
108 | ····.line·132 | |
109 | ····invoke-virtual·{v1},·Landroid/util/SparseArray;->size()I | |
| |
110 | ····move-result·v2 | |
| |
111 | ····if-lez·v2,·:cond_1 | |
| |
112 | ····.line·133 | |
113 | ····invoke-virtual·{v1,·p1},·Landroid/util/SparseArray;->get(I)Ljava/lang/Object; | |
| |
114 | ····move-result-object·v2 | |
| |
115 | ····check-cast·v2,·Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry; | |
| |
116 | ····if-eqz·v2,·:cond_1 | |
| |
117 | ····.line·135 | |
118 | ····iget-object·v3,·v2,·Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry;->configuration:Landroid/content/res/Configuration; | |
| |
119 | ····invoke-virtual·{p0},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| |
120 | ····move-result-object·p0 | |
| |
121 | ····invoke-virtual·{p0},·Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration; | |
| |
122 | ····move-result-object·p0 | |
| |
123 | ····invoke-virtual·{v3,·p0},·Landroid/content/res/Configuration;->equals(Landroid/content/res/Configuration;)Z | |
| |
124 | ····move-result·p0 | |
| |
125 | ····if-eqz·p0,·:cond_0 | |
| |
126 | ····.line·137 | |
127 | ····iget-object·p0,·v2,·Landroidx/appcompat/content/res/AppCompatResources$ColorStateListCacheEntry;->value:Landroid/content/res/ColorStateList; | |
| |
128 | ····monitor-exit·v0 | |
| |
129 | ····return-object·p0 | |
| |
130 | ····.line·140 | |
131 | ····:cond_0 | |
132 | ····invoke-virtual·{v1,·p1},·Landroid/util/SparseArray;->remove(I)V | |
| |
133 | ····.line·144 | |
134 | ····:cond_1 | |
135 | ····monitor-exit·v0 | |
| |
136 | ····const/4·p0,·0x0 | |
| |
137 | ····return-object·p0 | |
| |
138 | ····:catchall_0 | |
139 | ····move-exception·p0 | |
| |
140 | ····monitor-exit·v0 | |
141 | ····:try_end_0 | |
142 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_0 | |
| |
143 | ····throw·p0 | |
144 | .end·method | |
| |
145 | .method·public·static·getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | 13 | .method·public·static·getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; |
146 | ····.locals·2 | 14 | ····.locals·0 |
| |
147 | ····.line·67 | |
148 | ····sget·v0,·Landroid/os/Build$VERSION;->SDK_INT:I | |
| |
149 | ····const/16·v1,·0x17 | |
| |
150 | ····if-lt·v0,·v1,·:cond_0 | |
| |
151 | ····.line·69 | |
152 | ····invoke-virtual·{p0,·p1},·Landroid/content/Context;->getColorStateList(I)Landroid/content/res/ColorStateList; | |
| |
153 | ····move-result-object·p0 | |
| |
154 | ····return-object·p0 | |
| |
155 | ····.line·73 | |
156 | ····:cond_0 | |
157 | ····invoke-static·{p0,·p1},·Landroidx/appcompat/content/res/AppCompatResources;->getCachedColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | |
| |
158 | ····move-result-object·v0 | |
| |
159 | ····if-eqz·v0,·:cond_1 | |
| |
160 | ····return-object·v0 | |
| |
161 | ····.line·78 | |
162 | ····:cond_1 | |
163 | ····invoke-static·{p0,·p1},·Landroidx/appcompat/content/res/AppCompatResources;->inflateColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | |
| |
164 | ····move-result-object·v0 | |
| |
165 | ····if-eqz·v0,·:cond_2 | |
| |
166 | ····.line·81 | 15 | ····.line·48 |
167 | ····invoke-static·{p0,·p1,·v0},·Landroidx/appcompat/content/res/AppCompatResources;->addColorStateListToCache(Landroid/content/Context;ILandroid/content/res/ColorStateList;)V | |
| |
168 | ····return-object·v0 | |
| |
169 | ····.line·86 | |
170 | ····:cond_2 | |
171 | ····invoke-static·{p0,·p1},·Landroidx/core/content/ContextCompat;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | 16 | ····invoke-static·{p0,·p1},·Landroidx/core/content/ContextCompat;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; |
| |
172 | ····move-result-object·p0 | 17 | ····move-result-object·p0 |
| |
173 | ····return-object·p0 | 18 | ····return-object·p0 |
174 | .end·method | 19 | .end·method |
| |
175 | .method·public·static·getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; | 20 | .method·public·static·getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; |
176 | ····.locals·1 | 21 | ····.locals·1 |
| |
177 | ····.line·104 | 22 | ····.line·66 |
178 | ····invoke-static·{},·Landroidx/appcompat/widget/ResourceManagerInternal;->get()Landroidx/appcompat/widget/ResourceManagerInternal; | 23 | ····invoke-static·{},·Landroidx/appcompat/widget/ResourceManagerInternal;->get()Landroidx/appcompat/widget/ResourceManagerInternal; |
| |
179 | ····move-result-object·v0 | 24 | ····move-result-object·v0 |
| |
180 | ····invoke-virtual·{v0,·p0,·p1},·Landroidx/appcompat/widget/ResourceManagerInternal;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; | 25 | ····invoke-virtual·{v0,·p0,·p1},·Landroidx/appcompat/widget/ResourceManagerInternal;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; |
| |
181 | ····move-result-object·p0 | 26 | ····move-result-object·p0 |
| |
182 | ····return-object·p0 | 27 | ····return-object·p0 |
183 | .end·method | 28 | .end·method |
| |
184 | .method·private·static·getTypedValue()Landroid/util/TypedValue; | |
185 | ····.locals·2 | |
| |
186 | ····.line·173 | |
187 | ····sget-object·v0,·Landroidx/appcompat/content/res/AppCompatResources;->TL_TYPED_VALUE:Ljava/lang/ThreadLocal; | |
| |
188 | ····invoke-virtual·{v0},·Ljava/lang/ThreadLocal;->get()Ljava/lang/Object; | |
| |
189 | ····move-result-object·v0 | |
| |
190 | ····check-cast·v0,·Landroid/util/TypedValue; | |
| |
191 | ····if-nez·v0,·:cond_0 | |
| |
192 | ····.line·175 | |
193 | ····new-instance·v0,·Landroid/util/TypedValue; | |
| |
194 | ····invoke-direct·{v0},·Landroid/util/TypedValue;-><init>()V | |
| |
195 | ····.line·176 | |
196 | ····sget-object·v1,·Landroidx/appcompat/content/res/AppCompatResources;->TL_TYPED_VALUE:Ljava/lang/ThreadLocal; | |
| |
197 | ····invoke-virtual·{v1,·v0},·Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V | |
| |
198 | ····:cond_0 | |
199 | ····return-object·v0 | |
200 | .end·method | |
| |
201 | .method·private·static·inflateColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; | |
202 | ····.locals·2 | |
| |
203 | ····.line·112 | |
204 | ····invoke-static·{p0,·p1},·Landroidx/appcompat/content/res/AppCompatResources;->isColorInt(Landroid/content/Context;I)Z | |
| |
205 | ····move-result·v0 | |
| |
206 | ····const/4·v1,·0x0 | |
| |
207 | ····if-eqz·v0,·:cond_0 | |
| |
208 | ····return-object·v1 | |
| |
209 | ····.line·117 | |
210 | ····:cond_0 | |
211 | ····invoke-virtual·{p0},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| |
212 | ····move-result-object·v0 | |
| |
213 | ····.line·118 | |
214 | ····invoke-virtual·{v0,·p1},·Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser; | |
| |
215 | ····move-result-object·p1 | |
| |
216 | ····.line·120 | |
217 | ····:try_start_0 | |
218 | ····invoke-virtual·{p0},·Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme; | |
| |
219 | ····move-result-object·p0 | |
| |
220 | ····invoke-static·{v0,·p1,·p0},·Landroidx/core/content/res/ColorStateListInflaterCompat;->createFromXml(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList; | |
| |
221 | ····move-result-object·p0 | |
222 | ····:try_end_0 | |
223 | ····.catch·Ljava/lang/Exception;·{:try_start_0·..·:try_end_0}·:catch_0 | |
| |
224 | ····return-object·p0 | |
| |
225 | ····:catch_0 | |
226 | ····move-exception·p0 | |
| |
227 | ····const-string·p1,·"AppCompatResources" | |
| |
228 | ····const-string·v0,·"Failed·to·inflate·ColorStateList,·leaving·it·to·the·framework" | |
| |
229 | ····.line·122 | |
230 | ····invoke-static·{p1,·v0,·p0},·Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
| |
231 | ····return-object·v1 | |
232 | .end·method | |
| |
233 | .method·private·static·isColorInt(Landroid/content/Context;I)Z | |
234 | ····.locals·2 | |
| |
235 | ····.line·162 | |
236 | ····invoke-virtual·{p0},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| |
237 | ····move-result-object·p0 | |
| |
238 | ····.line·164 | |
239 | ····invoke-static·{},·Landroidx/appcompat/content/res/AppCompatResources;->getTypedValue()Landroid/util/TypedValue; | |
| |
240 | ····move-result-object·v0 | |
| |
241 | ····const/4·v1,·0x1 | |
| |
242 | ····.line·165 | |
243 | ····invoke-virtual·{p0,·p1,·v0,·v1},·Landroid/content/res/Resources;->getValue(ILandroid/util/TypedValue;Z)V | |
| |
244 | ····.line·167 | |
245 | ····iget·p0,·v0,·Landroid/util/TypedValue;->type:I | |
| |
246 | ····const/16·p1,·0x1c | |
| |
247 | ····if-lt·p0,·p1,·:cond_0 | |
| |
248 | ····const/16·p1,·0x1f | |
| |
249 | ····if-gt·p0,·p1,·:cond_0 | |
| |
250 | ····goto·:goto_0 | |
| |
251 | ····:cond_0 | |
252 | ····const/4·v1,·0x0 | |
| |
253 | ····:goto_0 | |
254 | ····return·v1 | |
255 | .end·method | |