Offset 1, 22 lines modifiedOffset 1, 16 lines modified
  
1 package·androidx.appcompat.widget;1 package·androidx.appcompat.widget;
  
2 import·androidx.appcompat.content.res.AppCompatResources;2 import·androidx.appcompat.content.res.AppCompatResources;
3 import·androidx.appcompat.R$color;3 import·androidx.appcompat.R$color;
4 import·androidx.appcompat.R$dimen;4 import·android.graphics.drawable.LayerDrawable;
5 import·android.graphics.ColorFilter;5 import·android.graphics.ColorFilter;
6 import·android.graphics.PorterDuff$Mode;6 import·android.graphics.PorterDuff$Mode;
7 import·android.graphics.drawable.Drawable;7 import·android.graphics.drawable.Drawable;
8 import·android.graphics.Shader$TileMode; 
9 import·android.graphics.Canvas; 
10 import·android.graphics.Bitmap; 
11 import·android.graphics.Bitmap$Config; 
12 import·android.graphics.drawable.BitmapDrawable; 
13 import·android.graphics.drawable.LayerDrawable; 
14 import·androidx.core.graphics.ColorUtils;8 import·androidx.core.graphics.ColorUtils;
15 import·androidx.appcompat.R$attr;9 import·androidx.appcompat.R$attr;
16 import·android.content.res.ColorStateList;10 import·android.content.res.ColorStateList;
17 import·android.content.Context;11 import·android.content.Context;
18 import·androidx.appcompat.R$drawable;12 import·androidx.appcompat.R$drawable;
  
19 class·AppCompatDrawableManager$1·implements·ResourceManagerInternal$ResourceManagerHooks13 class·AppCompatDrawableManager$1·implements·ResourceManagerInternal$ResourceManagerHooks
Offset 51, 22 lines modifiedOffset 45, 25 lines modified
51 ········final·int·abc_ic_menu_selectall_mtrl_alpha·=·R$drawable.abc_ic_menu_selectall_mtrl_alpha;45 ········final·int·abc_ic_menu_selectall_mtrl_alpha·=·R$drawable.abc_ic_menu_selectall_mtrl_alpha;
52 ········final·int·n6·=·5;46 ········final·int·n6·=·5;
53 ········tint_COLOR_CONTROL_NORMAL[n6]·=·abc_ic_menu_selectall_mtrl_alpha;47 ········tint_COLOR_CONTROL_NORMAL[n6]·=·abc_ic_menu_selectall_mtrl_alpha;
54 ········final·int·abc_ic_menu_paste_mtrl_am_alpha·=·R$drawable.abc_ic_menu_paste_mtrl_am_alpha;48 ········final·int·abc_ic_menu_paste_mtrl_am_alpha·=·R$drawable.abc_ic_menu_paste_mtrl_am_alpha;
55 ········final·int·n7·=·6;49 ········final·int·n7·=·6;
56 ········tint_COLOR_CONTROL_NORMAL[n7]·=·abc_ic_menu_paste_mtrl_am_alpha;50 ········tint_COLOR_CONTROL_NORMAL[n7]·=·abc_ic_menu_paste_mtrl_am_alpha;
57 ········this.TINT_COLOR_CONTROL_NORMAL·=·tint_COLOR_CONTROL_NORMAL;51 ········this.TINT_COLOR_CONTROL_NORMAL·=·tint_COLOR_CONTROL_NORMAL;
58 ········final·int[]·colorfilter_COLOR_CONTROL_ACTIVATED·=·new·int[n4];52 ········final·int[]·colorfilter_COLOR_CONTROL_ACTIVATED·=·new·int[10];
59 ········colorfilter_COLOR_CONTROL_ACTIVATED[0]·=·R$drawable.abc_textfield_activated_mtrl_alpha;53 ········colorfilter_COLOR_CONTROL_ACTIVATED[0]·=·R$drawable.abc_textfield_activated_mtrl_alpha;
60 ········colorfilter_COLOR_CONTROL_ACTIVATED[n2]·=·R$drawable.abc_textfield_search_activated_mtrl_alpha;54 ········colorfilter_COLOR_CONTROL_ACTIVATED[n2]·=·R$drawable.abc_textfield_search_activated_mtrl_alpha;
61 ········colorfilter_COLOR_CONTROL_ACTIVATED[n3]·=·R$drawable.abc_cab_background_top_mtrl_alpha;55 ········colorfilter_COLOR_CONTROL_ACTIVATED[n3]·=·R$drawable.abc_cab_background_top_mtrl_alpha;
62 ········colorfilter_COLOR_CONTROL_ACTIVATED[n]·=·R$drawable.abc_text_cursor_material;56 ········colorfilter_COLOR_CONTROL_ACTIVATED[n]·=·R$drawable.abc_text_cursor_material;
63 ········colorfilter_COLOR_CONTROL_ACTIVATED[n5]·=·R$drawable.abc_text_select_handle_left_mtrl;57 ········colorfilter_COLOR_CONTROL_ACTIVATED[n5]·=·R$drawable.abc_text_select_handle_left_mtrl_dark;
64 ········colorfilter_COLOR_CONTROL_ACTIVATED[n6]·=·R$drawable.abc_text_select_handle_middle_mtrl;58 ········colorfilter_COLOR_CONTROL_ACTIVATED[n6]·=·R$drawable.abc_text_select_handle_middle_mtrl_dark;
65 ········colorfilter_COLOR_CONTROL_ACTIVATED[n7]·=·R$drawable.abc_text_select_handle_right_mtrl;59 ········colorfilter_COLOR_CONTROL_ACTIVATED[n7]·=·R$drawable.abc_text_select_handle_right_mtrl_dark;
 60 ········colorfilter_COLOR_CONTROL_ACTIVATED[n4]·=·R$drawable.abc_text_select_handle_left_mtrl_light;
 61 ········colorfilter_COLOR_CONTROL_ACTIVATED[8]·=·R$drawable.abc_text_select_handle_middle_mtrl_light;
 62 ········colorfilter_COLOR_CONTROL_ACTIVATED[9]·=·R$drawable.abc_text_select_handle_right_mtrl_light;
66 ········this.COLORFILTER_COLOR_CONTROL_ACTIVATED·=·colorfilter_COLOR_CONTROL_ACTIVATED;63 ········this.COLORFILTER_COLOR_CONTROL_ACTIVATED·=·colorfilter_COLOR_CONTROL_ACTIVATED;
67 ········final·int[]·colorfilter_COLOR_BACKGROUND_MULTIPLY·=·new·int[n];64 ········final·int[]·colorfilter_COLOR_BACKGROUND_MULTIPLY·=·new·int[n];
68 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[0]·=·R$drawable.abc_popup_background_mtrl_mult;65 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[0]·=·R$drawable.abc_popup_background_mtrl_mult;
69 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[n2]·=·R$drawable.abc_cab_background_internal_bg;66 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[n2]·=·R$drawable.abc_cab_background_internal_bg;
70 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[n3]·=·R$drawable.abc_menu_hardkey_panel_mtrl_mult;67 ········colorfilter_COLOR_BACKGROUND_MULTIPLY[n3]·=·R$drawable.abc_menu_hardkey_panel_mtrl_mult;
71 ········this.COLORFILTER_COLOR_BACKGROUND_MULTIPLY·=·colorfilter_COLOR_BACKGROUND_MULTIPLY;68 ········this.COLORFILTER_COLOR_BACKGROUND_MULTIPLY·=·colorfilter_COLOR_BACKGROUND_MULTIPLY;
72 ········final·int[]·tint_COLOR_CONTROL_STATE_LIST·=·new·int[n3];69 ········final·int[]·tint_COLOR_CONTROL_STATE_LIST·=·new·int[n3];
Offset 147, 83 lines modifiedOffset 144, 28 lines modified
147 ············array2[n3]·=·ThemeUtils.getThemeAttrColor(context,·R$attr.colorControlActivated);144 ············array2[n3]·=·ThemeUtils.getThemeAttrColor(context,·R$attr.colorControlActivated);
148 ············array[n2]·=·ThemeUtils.EMPTY_STATE_SET;145 ············array[n2]·=·ThemeUtils.EMPTY_STATE_SET;
149 ············array2[n2]·=·ThemeUtils.getThemeAttrColor(context,·R$attr.colorSwitchThumbNormal);146 ············array2[n2]·=·ThemeUtils.getThemeAttrColor(context,·R$attr.colorSwitchThumbNormal);
150 ········}147 ········}
151 ········return·new·ColorStateList(array,·array2);148 ········return·new·ColorStateList(array,·array2);
152 ····}149 ····}
153 ····150 ····
154 ····private·LayerDrawable·getRatingBarLayerDrawable(final·ResourceManagerInternal·resourceManagerInternal,·final·Context·context,·int·abc_star_black_48dp)·{ 
155 ········final·int·dimensionPixelSize·=·context.getResources().getDimensionPixelSize(abc_star_black_48dp); 
156 ········abc_star_black_48dp·=·R$drawable.abc_star_black_48dp; 
157 ········final·Drawable·drawable·=·resourceManagerInternal.getDrawable(context,·abc_star_black_48dp); 
158 ········final·Drawable·drawable2·=·resourceManagerInternal.getDrawable(context,·R$drawable.abc_star_half_black_48dp); 
159 ········BitmapDrawable·bitmapDrawable; 
160 ········BitmapDrawable·bitmapDrawable2; 
161 ········if·(drawable·instanceof·BitmapDrawable·&&·drawable.getIntrinsicWidth()·==·dimensionPixelSize·&&·drawable.getIntrinsicHeight()·==·dimensionPixelSize)·{ 
162 ············bitmapDrawable·=·(BitmapDrawable)drawable; 
163 ············bitmapDrawable2·=·new·BitmapDrawable(bitmapDrawable.getBitmap()); 
164 ········} 
165 ········else·{ 
166 ············final·Bitmap·bitmap·=·Bitmap.createBitmap(dimensionPixelSize,·dimensionPixelSize,·Bitmap$Config.ARGB_8888); 
167 ············final·Canvas·canvas·=·new·Canvas(bitmap); 
168 ············drawable.setBounds(0,·0,·dimensionPixelSize,·dimensionPixelSize); 
169 ············drawable.draw(canvas); 
170 ············bitmapDrawable·=·new·BitmapDrawable(bitmap); 
171 ············bitmapDrawable2·=·new·BitmapDrawable(bitmap); 
172 ········} 
173 ········bitmapDrawable2.setTileModeX(Shader$TileMode.REPEAT); 
174 ········BitmapDrawable·bitmapDrawable3; 
175 ········if·(drawable2·instanceof·BitmapDrawable·&&·((Drawable)drawable2).getIntrinsicWidth()·==·dimensionPixelSize·&&·((Drawable)drawable2).getIntrinsicHeight()·==·dimensionPixelSize)·{ 
176 ············bitmapDrawable3·=·(BitmapDrawable)drawable2; 
177 ········} 
178 ········else·{ 
179 ············final·Bitmap·bitmap2·=·Bitmap.createBitmap(dimensionPixelSize,·dimensionPixelSize,·Bitmap$Config.ARGB_8888); 
180 ············final·Canvas·canvas2·=·new·Canvas(bitmap2); 
181 ············((Drawable)drawable2).setBounds(0,·0,·dimensionPixelSize,·dimensionPixelSize); 
182 ············((Drawable)drawable2).draw(canvas2); 
183 ············bitmapDrawable3·=·new·BitmapDrawable(bitmap2); 
184 ········} 
185 ········final·Drawable[]·array·=·{·bitmapDrawable,·null,·null·}; 
186 ········abc_star_black_48dp·=·1; 
187 ········array[abc_star_black_48dp]·=·(Drawable)bitmapDrawable3; 
188 ········final·int·n·=·2; 
189 ········array[n]·=·(Drawable)bitmapDrawable2; 
190 ········final·LayerDrawable·layerDrawable·=·new·LayerDrawable(array); 
191 ········layerDrawable.setId(0,·16908288); 
192 ········layerDrawable.setId(abc_star_black_48dp,·16908303); 
193 ········layerDrawable.setId(n,·16908301); 
194 ········return·layerDrawable; 
195 ····} 
196 ···· 
197 ····private·void·setPorterDuffColorFilter(Drawable·mutate,·final·int·n,·PorterDuff$Mode·access$000)·{151 ····private·void·setPorterDuffColorFilter(Drawable·mutate,·final·int·n,·PorterDuff$Mode·access$000)·{
198 ········if·(DrawableUtils.canSafelyMutateDrawable(mutate))·{152 ········if·(DrawableUtils.canSafelyMutateDrawable(mutate))·{
199 ············mutate·=·mutate.mutate();153 ············mutate·=·mutate.mutate();
200 ········}154 ········}
201 ········if·(access$000·==·null)·{155 ········if·(access$000·==·null)·{
202 ············access$000·=·AppCompatDrawableManager.access$000();156 ············access$000·=·AppCompatDrawableManager.access$000();
203 ········}157 ········}
204 ········mutate.setColorFilter((ColorFilter)AppCompatDrawableManager.getPorterDuffColorFilter(n,·access$000));158 ········mutate.setColorFilter((ColorFilter)AppCompatDrawableManager.getPorterDuffColorFilter(n,·access$000));
205 ····}159 ····}
206 ····160 ····
207 ····public·Drawable·createDrawableFor(final·ResourceManagerInternal·resourceManagerInternal,·final·Context·context,·int·n)·{161 ····public·Drawable·createDrawableFor(final·ResourceManagerInternal·resourceManagerInternal,·final·Context·context,·final·int·n)·{
208 ········if·(n·==·R$drawable.abc_cab_background_top_material)·{162 ········if·(n·==·R$drawable.abc_cab_background_top_material)·{
209 ············return·(Drawable)new·LayerDrawable(new·Drawable[]·{·resourceManagerInternal.getDrawable(context,·R$drawable.abc_cab_background_internal_bg),·resourceManagerInternal.getDrawable(context,·R$drawable.abc_cab_background_top_mtrl_alpha)·});163 ············return·(Drawable)new·LayerDrawable(new·Drawable[]·{·resourceManagerInternal.getDrawable(context,·R$drawable.abc_cab_background_internal_bg),·resourceManagerInternal.getDrawable(context,·R$drawable.abc_cab_background_top_mtrl_alpha)·});
210 ········}164 ········}
211 ········if·(n·==·R$drawable.abc_ratingbar_material)·{ 
212 ············n·=·R$dimen.abc_star_big; 
213 ············return·(Drawable)this.getRatingBarLayerDrawable(resourceManagerInternal,·context,·n); 
214 ········} 
215 ········if·(n·==·R$drawable.abc_ratingbar_indicator_material)·{ 
216 ············n·=·R$dimen.abc_star_medium; 
217 ············return·(Drawable)this.getRatingBarLayerDrawable(resourceManagerInternal,·context,·n); 
218 ········} 
219 ········if·(n·==·R$drawable.abc_ratingbar_small_material)·{ 
220 ············n·=·R$dimen.abc_star_small; 
221 ············return·(Drawable)this.getRatingBarLayerDrawable(resourceManagerInternal,·context,·n); 
222 ········} 
223 ········return·null;165 ········return·null;
224 ····}166 ····}
225 ····167 ····
226 ····public·ColorStateList·getTintListForDrawableRes(final·Context·context,·final·int·n)·{168 ····public·ColorStateList·getTintListForDrawableRes(final·Context·context,·final·int·n)·{
227 ········if·(n·==·R$drawable.abc_edit_text_material)·{169 ········if·(n·==·R$drawable.abc_edit_text_material)·{
228 ············return·AppCompatResources.getColorStateList(context,·R$color.abc_tint_edittext);170 ············return·AppCompatResources.getColorStateList(context,·R$color.abc_tint_edittext);
229 ········}171 ········}