.class public final Landroidx/appcompat/widget/AppCompatDrawableManager; .super Ljava/lang/Object; # annotations .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope; } .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/appcompat/widget/AppCompatDrawableManager$AsldcInflateDelegate;, Landroidx/appcompat/widget/AppCompatDrawableManager$AvdcInflateDelegate;, Landroidx/appcompat/widget/AppCompatDrawableManager$VdcInflateDelegate;, Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache;, Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate; } .end annotation # static fields .field private static final COLORFILTER_COLOR_BACKGROUND_MULTIPLY:[I .field private static final COLORFILTER_COLOR_CONTROL_ACTIVATED:[I .field private static final COLORFILTER_TINT_COLOR_CONTROL_NORMAL:[I .field private static final COLOR_FILTER_CACHE:Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache; .field private static final DEBUG:Z = false .field private static final DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; .field private static INSTANCE:Landroidx/appcompat/widget/AppCompatDrawableManager; = null .field private static final PLATFORM_VD_CLAZZ:Ljava/lang/String; = "android.graphics.drawable.VectorDrawable" .field private static final SKIP_DRAWABLE_TAG:Ljava/lang/String; = "appcompat_skip_skip" .field private static final TAG:Ljava/lang/String; = "AppCompatDrawableManag" .field private static final TINT_CHECKABLE_BUTTON_LIST:[I .field private static final TINT_COLOR_CONTROL_NORMAL:[I .field private static final TINT_COLOR_CONTROL_STATE_LIST:[I # instance fields .field private mDelegates:Landroidx/collection/ArrayMap; .annotation system Ldalvik/annotation/Signature; value = { "Landroidx/collection/ArrayMap<", "Ljava/lang/String;", "Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;", ">;" } .end annotation .end field .field private final mDrawableCaches:Ljava/util/WeakHashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/WeakHashMap<", "Landroid/content/Context;", "Landroidx/collection/LongSparseArray<", "Ljava/lang/ref/WeakReference<", "Landroid/graphics/drawable/Drawable$ConstantState;", ">;>;>;" } .end annotation .end field .field private mHasCheckedVectorDrawableSetup:Z .field private mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; .annotation system Ldalvik/annotation/Signature; value = { "Landroidx/collection/SparseArrayCompat<", "Ljava/lang/String;", ">;" } .end annotation .end field .field private mTintLists:Ljava/util/WeakHashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/WeakHashMap<", "Landroid/content/Context;", "Landroidx/collection/SparseArrayCompat<", "Landroid/content/res/ColorStateList;", ">;>;" } .end annotation .end field .field private mTypedValue:Landroid/util/TypedValue; # direct methods .method static constructor ()V .locals 10 sget-object v0, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode; sput-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; new-instance v0, Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache; const/4 v1, 0x6 invoke-direct {v0, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache;->(I)V sput-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLOR_FILTER_CACHE:Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache; const/4 v0, 0x3 new-array v2, v0, [I sget v3, Landroidx/appcompat/R$drawable;->abc_textfield_search_default_mtrl_alpha:I const/4 v4, 0x0 aput v3, v2, v4 sget v3, Landroidx/appcompat/R$drawable;->abc_textfield_default_mtrl_alpha:I const/4 v5, 0x1 aput v3, v2, v5 sget v3, Landroidx/appcompat/R$drawable;->abc_ab_share_pack_mtrl_alpha:I const/4 v6, 0x2 aput v3, v2, v6 sput-object v2, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_TINT_COLOR_CONTROL_NORMAL:[I const/4 v2, 0x7 new-array v3, v2, [I sget v7, Landroidx/appcompat/R$drawable;->abc_ic_commit_search_api_mtrl_alpha:I aput v7, v3, v4 sget v7, Landroidx/appcompat/R$drawable;->abc_seekbar_tick_mark_material:I aput v7, v3, v5 sget v7, Landroidx/appcompat/R$drawable;->abc_ic_menu_share_mtrl_alpha:I aput v7, v3, v6 sget v7, Landroidx/appcompat/R$drawable;->abc_ic_menu_copy_mtrl_am_alpha:I aput v7, v3, v0 sget v7, Landroidx/appcompat/R$drawable;->abc_ic_menu_cut_mtrl_alpha:I const/4 v8, 0x4 aput v7, v3, v8 sget v7, Landroidx/appcompat/R$drawable;->abc_ic_menu_selectall_mtrl_alpha:I const/4 v9, 0x5 aput v7, v3, v9 sget v7, Landroidx/appcompat/R$drawable;->abc_ic_menu_paste_mtrl_am_alpha:I aput v7, v3, v1 sput-object v3, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_COLOR_CONTROL_NORMAL:[I const/16 v3, 0xa new-array v3, v3, [I sget v7, Landroidx/appcompat/R$drawable;->abc_textfield_activated_mtrl_alpha:I aput v7, v3, v4 sget v7, Landroidx/appcompat/R$drawable;->abc_textfield_search_activated_mtrl_alpha:I aput v7, v3, v5 sget v7, Landroidx/appcompat/R$drawable;->abc_cab_background_top_mtrl_alpha:I aput v7, v3, v6 sget v7, Landroidx/appcompat/R$drawable;->abc_text_cursor_material:I aput v7, v3, v0 sget v7, Landroidx/appcompat/R$drawable;->abc_text_select_handle_left_mtrl_dark:I aput v7, v3, v8 sget v7, Landroidx/appcompat/R$drawable;->abc_text_select_handle_middle_mtrl_dark:I aput v7, v3, v9 sget v7, Landroidx/appcompat/R$drawable;->abc_text_select_handle_right_mtrl_dark:I aput v7, v3, v1 sget v1, Landroidx/appcompat/R$drawable;->abc_text_select_handle_left_mtrl_light:I aput v1, v3, v2 sget v1, Landroidx/appcompat/R$drawable;->abc_text_select_handle_middle_mtrl_light:I const/16 v2, 0x8 aput v1, v3, v2 sget v1, Landroidx/appcompat/R$drawable;->abc_text_select_handle_right_mtrl_light:I const/16 v2, 0x9 aput v1, v3, v2 sput-object v3, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_COLOR_CONTROL_ACTIVATED:[I new-array v0, v0, [I sget v1, Landroidx/appcompat/R$drawable;->abc_popup_background_mtrl_mult:I aput v1, v0, v4 sget v1, Landroidx/appcompat/R$drawable;->abc_cab_background_internal_bg:I aput v1, v0, v5 sget v1, Landroidx/appcompat/R$drawable;->abc_menu_hardkey_panel_mtrl_mult:I aput v1, v0, v6 sput-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_COLOR_BACKGROUND_MULTIPLY:[I new-array v0, v6, [I sget v1, Landroidx/appcompat/R$drawable;->abc_tab_indicator_material:I aput v1, v0, v4 sget v1, Landroidx/appcompat/R$drawable;->abc_textfield_search_material:I aput v1, v0, v5 sput-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_COLOR_CONTROL_STATE_LIST:[I new-array v0, v6, [I sget v1, Landroidx/appcompat/R$drawable;->abc_btn_check_material:I aput v1, v0, v4 sget v1, Landroidx/appcompat/R$drawable;->abc_btn_radio_material:I aput v1, v0, v5 sput-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_CHECKABLE_BUTTON_LIST:[I return-void .end method .method public constructor ()V .locals 2 invoke-direct {p0}, Ljava/lang/Object;->()V new-instance v0, Ljava/util/WeakHashMap; const/4 v1, 0x0 invoke-direct {v0, v1}, Ljava/util/WeakHashMap;->(I)V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDrawableCaches:Ljava/util/WeakHashMap; return-void .end method .method private addDelegate(Ljava/lang/String;Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;)V .locals 1 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate; .annotation build Landroidx/annotation/NonNull; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; if-nez v0, :cond_0 new-instance v0, Landroidx/collection/ArrayMap; invoke-direct {v0}, Landroidx/collection/ArrayMap;->()V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; :cond_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {v0, p1, p2}, Landroidx/collection/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; return-void .end method .method private declared-synchronized addDrawableToCache(Landroid/content/Context;JLandroid/graphics/drawable/Drawable;)Z .locals 2 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p4 # Landroid/graphics/drawable/Drawable; .annotation build Landroidx/annotation/NonNull; .end annotation .end param monitor-enter p0 :try_start_0 invoke-virtual {p4}, Landroid/graphics/drawable/Drawable;->getConstantState()Landroid/graphics/drawable/Drawable$ConstantState; move-result-object p4 if-eqz p4, :cond_1 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDrawableCaches:Ljava/util/WeakHashMap; invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/collection/LongSparseArray; if-nez v0, :cond_0 new-instance v0, Landroidx/collection/LongSparseArray; invoke-direct {v0}, Landroidx/collection/LongSparseArray;->()V iget-object v1, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDrawableCaches:Ljava/util/WeakHashMap; invoke-virtual {v1, p1, v0}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :cond_0 new-instance p1, Ljava/lang/ref/WeakReference; invoke-direct {p1, p4}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V invoke-virtual {v0, p2, p3, p1}, Landroidx/collection/LongSparseArray;->put(JLjava/lang/Object;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p1, 0x1 :goto_0 monitor-exit p0 return p1 :cond_1 const/4 p1, 0x0 goto :goto_0 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method private addTintListToCache(Landroid/content/Context;ILandroid/content/res/ColorStateList;)V .locals 2 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param .param p3 # Landroid/content/res/ColorStateList; .annotation build Landroidx/annotation/NonNull; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; if-nez v0, :cond_0 new-instance v0, Ljava/util/WeakHashMap; invoke-direct {v0}, Ljava/util/WeakHashMap;->()V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; :cond_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/collection/SparseArrayCompat; if-nez v0, :cond_1 new-instance v0, Landroidx/collection/SparseArrayCompat; invoke-direct {v0}, Landroidx/collection/SparseArrayCompat;->()V iget-object v1, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; invoke-virtual {v1, p1, v0}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :cond_1 invoke-virtual {v0, p2, p3}, Landroidx/collection/SparseArrayCompat;->append(ILjava/lang/Object;)V return-void .end method .method private static arrayContains([II)Z .locals 4 array-length v0, p0 const/4 v1, 0x0 const/4 v2, 0x0 :goto_0 if-ge v2, v0, :cond_1 aget v3, p0, v2 if-ne v3, p1, :cond_0 const/4 p0, 0x1 return p0 :cond_0 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_1 return v1 .end method .method private checkVectorDrawableSetup(Landroid/content/Context;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param iget-boolean v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mHasCheckedVectorDrawableSetup:Z if-eqz v0, :cond_0 return-void :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mHasCheckedVectorDrawableSetup:Z sget v0, Landroidx/appcompat/R$drawable;->abc_vector_test:I invoke-virtual {p0, p1, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object p1 if-eqz p1, :cond_1 invoke-static {p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->isVectorDrawable(Landroid/graphics/drawable/Drawable;)Z move-result p1 if-eqz p1, :cond_1 return-void :cond_1 const/4 p1, 0x0 iput-boolean p1, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mHasCheckedVectorDrawableSetup:Z new-instance p1, Ljava/lang/IllegalStateException; const-string v0, "This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat." invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method .method private createBorderlessButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param const/4 v0, 0x0 invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createButtonColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object p1 return-object p1 .end method .method private createButtonColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; .locals 5 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/ColorInt; .end annotation .end param const/4 v0, 0x4 new-array v1, v0, [[I new-array v0, v0, [I sget v2, Landroidx/appcompat/R$attr;->colorControlHighlight:I invoke-static {p1, v2}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v2 sget v3, Landroidx/appcompat/R$attr;->colorButtonNormal:I invoke-static {p1, v3}, Landroidx/appcompat/widget/ThemeUtils;->getDisabledThemeAttrColor(Landroid/content/Context;I)I move-result p1 sget-object v3, Landroidx/appcompat/widget/ThemeUtils;->DISABLED_STATE_SET:[I const/4 v4, 0x0 aput-object v3, v1, v4 aput p1, v0, v4 sget-object p1, Landroidx/appcompat/widget/ThemeUtils;->PRESSED_STATE_SET:[I const/4 v3, 0x1 aput-object p1, v1, v3 invoke-static {v2, p2}, Landroidx/core/graphics/ColorUtils;->compositeColors(II)I move-result p1 aput p1, v0, v3 sget-object p1, Landroidx/appcompat/widget/ThemeUtils;->FOCUSED_STATE_SET:[I const/4 v3, 0x2 aput-object p1, v1, v3 invoke-static {v2, p2}, Landroidx/core/graphics/ColorUtils;->compositeColors(II)I move-result p1 aput p1, v0, v3 sget-object p1, Landroidx/appcompat/widget/ThemeUtils;->EMPTY_STATE_SET:[I const/4 v2, 0x3 aput-object p1, v1, v2 aput p2, v0, v2 new-instance p1, Landroid/content/res/ColorStateList; invoke-direct {p1, v1, v0}, Landroid/content/res/ColorStateList;->([[I[I)V return-object p1 .end method .method private static createCacheKey(Landroid/util/TypedValue;)J .locals 4 iget v0, p0, Landroid/util/TypedValue;->assetCookie:I int-to-long v0, v0 const/16 v2, 0x20 shl-long/2addr v0, v2 iget p0, p0, Landroid/util/TypedValue;->data:I int-to-long v2, p0 or-long/2addr v0, v2 return-wide v0 .end method .method private createColoredButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param sget v0, Landroidx/appcompat/R$attr;->colorAccent:I invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v0 invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createButtonColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object p1 return-object p1 .end method .method private createDefaultButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param sget v0, Landroidx/appcompat/R$attr;->colorButtonNormal:I invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v0 invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createButtonColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object p1 return-object p1 .end method .method private createDrawableIfNeeded(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; .locals 7 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; if-nez v0, :cond_0 new-instance v0, Landroid/util/TypedValue; invoke-direct {v0}, Landroid/util/TypedValue;->()V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; :cond_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v1 const/4 v2, 0x1 invoke-virtual {v1, p2, v0, v2}, Landroid/content/res/Resources;->getValue(ILandroid/util/TypedValue;Z)V invoke-static {v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createCacheKey(Landroid/util/TypedValue;)J move-result-wide v3 invoke-direct {p0, p1, v3, v4}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getCachedDrawable(Landroid/content/Context;J)Landroid/graphics/drawable/Drawable; move-result-object v1 if-eqz v1, :cond_1 return-object v1 :cond_1 sget v5, Landroidx/appcompat/R$drawable;->abc_cab_background_top_material:I if-ne p2, v5, :cond_2 new-instance v1, Landroid/graphics/drawable/LayerDrawable; const/4 p2, 0x2 new-array p2, p2, [Landroid/graphics/drawable/Drawable; const/4 v5, 0x0 sget v6, Landroidx/appcompat/R$drawable;->abc_cab_background_internal_bg:I invoke-virtual {p0, p1, v6}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v6 aput-object v6, p2, v5 sget v5, Landroidx/appcompat/R$drawable;->abc_cab_background_top_mtrl_alpha:I invoke-virtual {p0, p1, v5}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v5 aput-object v5, p2, v2 invoke-direct {v1, p2}, Landroid/graphics/drawable/LayerDrawable;->([Landroid/graphics/drawable/Drawable;)V :cond_2 if-eqz v1, :cond_3 iget p2, v0, Landroid/util/TypedValue;->changingConfigurations:I invoke-virtual {v1, p2}, Landroid/graphics/drawable/Drawable;->setChangingConfigurations(I)V invoke-direct {p0, p1, v3, v4, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addDrawableToCache(Landroid/content/Context;JLandroid/graphics/drawable/Drawable;)Z :cond_3 return-object v1 .end method .method private createSwitchThumbColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; .locals 7 const/4 v0, 0x3 new-array v1, v0, [[I new-array v0, v0, [I sget v2, Landroidx/appcompat/R$attr;->colorSwitchThumbNormal:I invoke-static {p1, v2}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object v2 const/4 v3, 0x2 const/4 v4, 0x1 const/4 v5, 0x0 if-eqz v2, :cond_0 invoke-virtual {v2}, Landroid/content/res/ColorStateList;->isStateful()Z move-result v6 if-eqz v6, :cond_0 sget-object v6, Landroidx/appcompat/widget/ThemeUtils;->DISABLED_STATE_SET:[I aput-object v6, v1, v5 aget-object v6, v1, v5 invoke-virtual {v2, v6, v5}, Landroid/content/res/ColorStateList;->getColorForState([II)I move-result v6 aput v6, v0, v5 sget-object v5, Landroidx/appcompat/widget/ThemeUtils;->CHECKED_STATE_SET:[I aput-object v5, v1, v4 sget v5, Landroidx/appcompat/R$attr;->colorControlActivated:I invoke-static {p1, v5}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result p1 aput p1, v0, v4 sget-object p1, Landroidx/appcompat/widget/ThemeUtils;->EMPTY_STATE_SET:[I aput-object p1, v1, v3 invoke-virtual {v2}, Landroid/content/res/ColorStateList;->getDefaultColor()I move-result p1 aput p1, v0, v3 goto :goto_0 :cond_0 sget-object v2, Landroidx/appcompat/widget/ThemeUtils;->DISABLED_STATE_SET:[I aput-object v2, v1, v5 sget v2, Landroidx/appcompat/R$attr;->colorSwitchThumbNormal:I invoke-static {p1, v2}, Landroidx/appcompat/widget/ThemeUtils;->getDisabledThemeAttrColor(Landroid/content/Context;I)I move-result v2 aput v2, v0, v5 sget-object v2, Landroidx/appcompat/widget/ThemeUtils;->CHECKED_STATE_SET:[I aput-object v2, v1, v4 sget v2, Landroidx/appcompat/R$attr;->colorControlActivated:I invoke-static {p1, v2}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v2 aput v2, v0, v4 sget-object v2, Landroidx/appcompat/widget/ThemeUtils;->EMPTY_STATE_SET:[I aput-object v2, v1, v3 sget v2, Landroidx/appcompat/R$attr;->colorSwitchThumbNormal:I invoke-static {p1, v2}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result p1 aput p1, v0, v3 :goto_0 new-instance p1, Landroid/content/res/ColorStateList; invoke-direct {p1, v1, v0}, Landroid/content/res/ColorStateList;->([[I[I)V return-object p1 .end method .method private static createTintFilter(Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;[I)Landroid/graphics/PorterDuffColorFilter; .locals 1 if-eqz p0, :cond_1 if-nez p1, :cond_0 goto :goto_0 :cond_0 const/4 v0, 0x0 invoke-virtual {p0, p2, v0}, Landroid/content/res/ColorStateList;->getColorForState([II)I move-result p0 invoke-static {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getPorterDuffColorFilter(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter; move-result-object p0 return-object p0 :cond_1 :goto_0 const/4 p0, 0x0 return-object p0 .end method .method public static declared-synchronized get()Landroidx/appcompat/widget/AppCompatDrawableManager; .locals 2 const-class v0, Landroidx/appcompat/widget/AppCompatDrawableManager; monitor-enter v0 :try_start_0 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->INSTANCE:Landroidx/appcompat/widget/AppCompatDrawableManager; if-nez v1, :cond_0 new-instance v1, Landroidx/appcompat/widget/AppCompatDrawableManager; invoke-direct {v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->()V sput-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->INSTANCE:Landroidx/appcompat/widget/AppCompatDrawableManager; invoke-static {v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->installDefaultInflateDelegates(Landroidx/appcompat/widget/AppCompatDrawableManager;)V :cond_0 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->INSTANCE:Landroidx/appcompat/widget/AppCompatDrawableManager; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit v0 return-object v1 :catchall_0 move-exception v1 monitor-exit v0 throw v1 .end method .method private declared-synchronized getCachedDrawable(Landroid/content/Context;J)Landroid/graphics/drawable/Drawable; .locals 3 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param monitor-enter p0 :try_start_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDrawableCaches:Ljava/util/WeakHashMap; invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/collection/LongSparseArray; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 v1, 0x0 if-nez v0, :cond_0 monitor-exit p0 return-object v1 :cond_0 :try_start_1 invoke-virtual {v0, p2, p3}, Landroidx/collection/LongSparseArray;->get(J)Ljava/lang/Object; move-result-object v2 check-cast v2, Ljava/lang/ref/WeakReference; if-eqz v2, :cond_2 invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroid/graphics/drawable/Drawable$ConstantState; if-eqz v2, :cond_1 invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object p1 invoke-virtual {v2, p1}, Landroid/graphics/drawable/Drawable$ConstantState;->newDrawable(Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable; move-result-object p1 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 monitor-exit p0 return-object p1 :cond_1 :try_start_2 invoke-virtual {v0, p2, p3}, Landroidx/collection/LongSparseArray;->delete(J)V :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 :cond_2 monitor-exit p0 return-object v1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public static declared-synchronized getPorterDuffColorFilter(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter; .locals 3 const-class v0, Landroidx/appcompat/widget/AppCompatDrawableManager; monitor-enter v0 :try_start_0 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLOR_FILTER_CACHE:Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache; invoke-virtual {v1, p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache;->get(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter; move-result-object v1 if-nez v1, :cond_0 new-instance v1, Landroid/graphics/PorterDuffColorFilter; invoke-direct {v1, p0, p1}, Landroid/graphics/PorterDuffColorFilter;->(ILandroid/graphics/PorterDuff$Mode;)V sget-object v2, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLOR_FILTER_CACHE:Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache; invoke-virtual {v2, p0, p1, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager$ColorFilterLruCache;->put(ILandroid/graphics/PorterDuff$Mode;Landroid/graphics/PorterDuffColorFilter;)Landroid/graphics/PorterDuffColorFilter; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_0 monitor-exit v0 return-object v1 :catchall_0 move-exception p0 monitor-exit v0 throw p0 .end method .method private getTintListFromCache(Landroid/content/Context;I)Landroid/content/res/ColorStateList; .locals 2 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; const/4 v1, 0x0 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTintLists:Ljava/util/WeakHashMap; invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroidx/collection/SparseArrayCompat; if-eqz p1, :cond_0 invoke-virtual {p1, p2}, Landroidx/collection/SparseArrayCompat;->get(I)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroid/content/res/ColorStateList; return-object p1 :cond_0 return-object v1 .end method .method static getTintMode(I)Landroid/graphics/PorterDuff$Mode; .locals 1 sget v0, Landroidx/appcompat/R$drawable;->abc_switch_thumb_material:I if-ne p0, v0, :cond_0 sget-object p0, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode; goto :goto_0 :cond_0 const/4 p0, 0x0 :goto_0 return-object p0 .end method .method private static installDefaultInflateDelegates(Landroidx/appcompat/widget/AppCompatDrawableManager;)V .locals 2 .param p0 # Landroidx/appcompat/widget/AppCompatDrawableManager; .annotation build Landroidx/annotation/NonNull; .end annotation .end param sget v0, Landroid/os/Build$VERSION;->SDK_INT:I const/16 v1, 0x18 if-ge v0, v1, :cond_0 const-string v0, "vector" new-instance v1, Landroidx/appcompat/widget/AppCompatDrawableManager$VdcInflateDelegate; invoke-direct {v1}, Landroidx/appcompat/widget/AppCompatDrawableManager$VdcInflateDelegate;->()V invoke-direct {p0, v0, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addDelegate(Ljava/lang/String;Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;)V const-string v0, "animated-vector" new-instance v1, Landroidx/appcompat/widget/AppCompatDrawableManager$AvdcInflateDelegate; invoke-direct {v1}, Landroidx/appcompat/widget/AppCompatDrawableManager$AvdcInflateDelegate;->()V invoke-direct {p0, v0, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addDelegate(Ljava/lang/String;Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;)V const-string v0, "animated-selector" new-instance v1, Landroidx/appcompat/widget/AppCompatDrawableManager$AsldcInflateDelegate; invoke-direct {v1}, Landroidx/appcompat/widget/AppCompatDrawableManager$AsldcInflateDelegate;->()V invoke-direct {p0, v0, v1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addDelegate(Ljava/lang/String;Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;)V :cond_0 return-void .end method .method private static isVectorDrawable(Landroid/graphics/drawable/Drawable;)Z .locals 1 .param p0 # Landroid/graphics/drawable/Drawable; .annotation build Landroidx/annotation/NonNull; .end annotation .end param instance-of v0, p0, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat; if-nez v0, :cond_1 const-string v0, "android.graphics.drawable.VectorDrawable" invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object p0 invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object p0 invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result p0 if-eqz p0, :cond_0 goto :goto_0 :cond_0 const/4 p0, 0x0 return p0 :cond_1 :goto_0 const/4 p0, 0x1 return p0 .end method .method private loadDrawableFromDelegates(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; .locals 9 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; const/4 v1, 0x0 if-eqz v0, :cond_b iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {v0}, Landroidx/collection/ArrayMap;->isEmpty()Z move-result v0 if-nez v0, :cond_b iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; if-eqz v0, :cond_1 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; invoke-virtual {v0, p2}, Landroidx/collection/SparseArrayCompat;->get(I)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; const-string v2, "appcompat_skip_skip" invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-nez v2, :cond_0 if-eqz v0, :cond_2 iget-object v2, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {v2, v0}, Landroidx/collection/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 if-nez v0, :cond_2 :cond_0 return-object v1 :cond_1 new-instance v0, Landroidx/collection/SparseArrayCompat; invoke-direct {v0}, Landroidx/collection/SparseArrayCompat;->()V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; :cond_2 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; if-nez v0, :cond_3 new-instance v0, Landroid/util/TypedValue; invoke-direct {v0}, Landroid/util/TypedValue;->()V iput-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; :cond_3 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mTypedValue:Landroid/util/TypedValue; invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v1 const/4 v2, 0x1 invoke-virtual {v1, p2, v0, v2}, Landroid/content/res/Resources;->getValue(ILandroid/util/TypedValue;Z)V invoke-static {v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createCacheKey(Landroid/util/TypedValue;)J move-result-wide v3 invoke-direct {p0, p1, v3, v4}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getCachedDrawable(Landroid/content/Context;J)Landroid/graphics/drawable/Drawable; move-result-object v5 if-eqz v5, :cond_4 return-object v5 :cond_4 iget-object v6, v0, Landroid/util/TypedValue;->string:Ljava/lang/CharSequence; if-eqz v6, :cond_9 iget-object v6, v0, Landroid/util/TypedValue;->string:Ljava/lang/CharSequence; invoke-interface {v6}, Ljava/lang/CharSequence;->toString()Ljava/lang/String; move-result-object v6 const-string v7, ".xml" invoke-virtual {v6, v7}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z move-result v6 if-eqz v6, :cond_9 :try_start_0 invoke-virtual {v1, p2}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser; move-result-object v1 invoke-static {v1}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet; move-result-object v6 :cond_5 invoke-interface {v1}, Lorg/xmlpull/v1/XmlPullParser;->next()I move-result v7 const/4 v8, 0x2 if-eq v7, v8, :cond_6 if-ne v7, v2, :cond_5 :cond_6 if-ne v7, v8, :cond_8 invoke-interface {v1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String; move-result-object v2 iget-object v7, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; invoke-virtual {v7, p2, v2}, Landroidx/collection/SparseArrayCompat;->append(ILjava/lang/Object;)V iget-object v7, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {v7, v2}, Landroidx/collection/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate; if-eqz v2, :cond_7 invoke-virtual {p1}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme; move-result-object v7 invoke-interface {v2, p1, v1, v6, v7}, Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;->createFromXmlInner(Landroid/content/Context;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; move-result-object v1 move-object v5, v1 :cond_7 if-eqz v5, :cond_9 iget v0, v0, Landroid/util/TypedValue;->changingConfigurations:I invoke-virtual {v5, v0}, Landroid/graphics/drawable/Drawable;->setChangingConfigurations(I)V invoke-direct {p0, p1, v3, v4, v5}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addDrawableToCache(Landroid/content/Context;JLandroid/graphics/drawable/Drawable;)Z goto :goto_0 :cond_8 new-instance p1, Lorg/xmlpull/v1/XmlPullParserException; const-string v0, "No start tag found" invoke-direct {p1, v0}, Lorg/xmlpull/v1/XmlPullParserException;->(Ljava/lang/String;)V throw p1 :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 move-exception p1 const-string v0, "AppCompatDrawableManag" const-string v1, "Exception while inflating drawable" invoke-static {v0, v1, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I :cond_9 :goto_0 if-nez v5, :cond_a iget-object p1, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mKnownDrawableIdTags:Landroidx/collection/SparseArrayCompat; const-string v0, "appcompat_skip_skip" invoke-virtual {p1, p2, v0}, Landroidx/collection/SparseArrayCompat;->append(ILjava/lang/Object;)V :cond_a return-object v5 :cond_b return-object v1 .end method .method private removeDelegate(Ljava/lang/String;Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate;)V .locals 1 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroidx/appcompat/widget/AppCompatDrawableManager$InflateDelegate; .annotation build Landroidx/annotation/NonNull; .end annotation .end param iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {v0, p1}, Landroidx/collection/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 if-ne v0, p2, :cond_0 iget-object p2, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDelegates:Landroidx/collection/ArrayMap; invoke-virtual {p2, p1}, Landroidx/collection/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; :cond_0 return-void .end method .method private static setPorterDuffColorFilter(Landroid/graphics/drawable/Drawable;ILandroid/graphics/PorterDuff$Mode;)V .locals 1 invoke-static {p0}, Landroidx/appcompat/widget/DrawableUtils;->canSafelyMutateDrawable(Landroid/graphics/drawable/Drawable;)Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable; move-result-object p0 :cond_0 if-nez p2, :cond_1 sget-object p2, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; :cond_1 invoke-static {p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getPorterDuffColorFilter(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter; move-result-object p1 invoke-virtual {p0, p1}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V return-void .end method .method private tintDrawable(Landroid/content/Context;IZLandroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable; .locals 4 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param .param p4 # Landroid/graphics/drawable/Drawable; .annotation build Landroidx/annotation/NonNull; .end annotation .end param invoke-virtual {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getTintList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object v0 if-eqz v0, :cond_1 invoke-static {p4}, Landroidx/appcompat/widget/DrawableUtils;->canSafelyMutateDrawable(Landroid/graphics/drawable/Drawable;)Z move-result p1 if-eqz p1, :cond_0 invoke-virtual {p4}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable; move-result-object p4 :cond_0 invoke-static {p4}, Landroidx/core/graphics/drawable/DrawableCompat;->wrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable; move-result-object p4 invoke-static {p4, v0}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintList(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V invoke-static {p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getTintMode(I)Landroid/graphics/PorterDuff$Mode; move-result-object p1 if-eqz p1, :cond_5 invoke-static {p4, p1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTintMode(Landroid/graphics/drawable/Drawable;Landroid/graphics/PorterDuff$Mode;)V goto :goto_2 :cond_1 sget v0, Landroidx/appcompat/R$drawable;->abc_seekbar_track_material:I const v1, 0x102000d const v2, 0x102000f const/high16 v3, 0x1020000 if-ne p2, v0, :cond_2 move-object p2, p4 check-cast p2, Landroid/graphics/drawable/LayerDrawable; invoke-virtual {p2, v3}, Landroid/graphics/drawable/LayerDrawable;->findDrawableByLayerId(I)Landroid/graphics/drawable/Drawable; move-result-object p3 sget v0, Landroidx/appcompat/R$attr;->colorControlNormal:I invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v0 sget-object v3, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; invoke-static {p3, v0, v3}, Landroidx/appcompat/widget/AppCompatDrawableManager;->setPorterDuffColorFilter(Landroid/graphics/drawable/Drawable;ILandroid/graphics/PorterDuff$Mode;)V invoke-virtual {p2, v2}, Landroid/graphics/drawable/LayerDrawable;->findDrawableByLayerId(I)Landroid/graphics/drawable/Drawable; move-result-object p3 sget v0, Landroidx/appcompat/R$attr;->colorControlNormal:I :goto_0 invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result v0 sget-object v2, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; invoke-static {p3, v0, v2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->setPorterDuffColorFilter(Landroid/graphics/drawable/Drawable;ILandroid/graphics/PorterDuff$Mode;)V invoke-virtual {p2, v1}, Landroid/graphics/drawable/LayerDrawable;->findDrawableByLayerId(I)Landroid/graphics/drawable/Drawable; move-result-object p2 sget p3, Landroidx/appcompat/R$attr;->colorControlActivated:I invoke-static {p1, p3}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result p1 sget-object p3, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; invoke-static {p2, p1, p3}, Landroidx/appcompat/widget/AppCompatDrawableManager;->setPorterDuffColorFilter(Landroid/graphics/drawable/Drawable;ILandroid/graphics/PorterDuff$Mode;)V goto :goto_2 :cond_2 sget v0, Landroidx/appcompat/R$drawable;->abc_ratingbar_material:I if-eq p2, v0, :cond_4 sget v0, Landroidx/appcompat/R$drawable;->abc_ratingbar_indicator_material:I if-eq p2, v0, :cond_4 sget v0, Landroidx/appcompat/R$drawable;->abc_ratingbar_small_material:I if-ne p2, v0, :cond_3 goto :goto_1 :cond_3 invoke-static {p1, p2, p4}, Landroidx/appcompat/widget/AppCompatDrawableManager;->tintDrawableUsingColorFilter(Landroid/content/Context;ILandroid/graphics/drawable/Drawable;)Z move-result p1 if-nez p1, :cond_5 if-eqz p3, :cond_5 const/4 p4, 0x0 goto :goto_2 :cond_4 :goto_1 move-object p2, p4 check-cast p2, Landroid/graphics/drawable/LayerDrawable; invoke-virtual {p2, v3}, Landroid/graphics/drawable/LayerDrawable;->findDrawableByLayerId(I)Landroid/graphics/drawable/Drawable; move-result-object p3 sget v0, Landroidx/appcompat/R$attr;->colorControlNormal:I invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getDisabledThemeAttrColor(Landroid/content/Context;I)I move-result v0 sget-object v3, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; invoke-static {p3, v0, v3}, Landroidx/appcompat/widget/AppCompatDrawableManager;->setPorterDuffColorFilter(Landroid/graphics/drawable/Drawable;ILandroid/graphics/PorterDuff$Mode;)V invoke-virtual {p2, v2}, Landroid/graphics/drawable/LayerDrawable;->findDrawableByLayerId(I)Landroid/graphics/drawable/Drawable; move-result-object p3 sget v0, Landroidx/appcompat/R$attr;->colorControlActivated:I goto :goto_0 :cond_5 :goto_2 return-object p4 .end method .method static tintDrawable(Landroid/graphics/drawable/Drawable;Landroidx/appcompat/widget/TintInfo;[I)V .locals 2 invoke-static {p0}, Landroidx/appcompat/widget/DrawableUtils;->canSafelyMutateDrawable(Landroid/graphics/drawable/Drawable;)Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable; move-result-object v0 if-eq v0, p0, :cond_0 const-string p0, "AppCompatDrawableManag" const-string p1, "Mutated drawable is not the same instance as the input." invoke-static {p0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I return-void :cond_0 iget-boolean v0, p1, Landroidx/appcompat/widget/TintInfo;->mHasTintList:Z if-nez v0, :cond_2 iget-boolean v0, p1, Landroidx/appcompat/widget/TintInfo;->mHasTintMode:Z if-eqz v0, :cond_1 goto :goto_0 :cond_1 invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->clearColorFilter()V goto :goto_3 :cond_2 :goto_0 iget-boolean v0, p1, Landroidx/appcompat/widget/TintInfo;->mHasTintList:Z if-eqz v0, :cond_3 iget-object v0, p1, Landroidx/appcompat/widget/TintInfo;->mTintList:Landroid/content/res/ColorStateList; goto :goto_1 :cond_3 const/4 v0, 0x0 :goto_1 iget-boolean v1, p1, Landroidx/appcompat/widget/TintInfo;->mHasTintMode:Z if-eqz v1, :cond_4 iget-object p1, p1, Landroidx/appcompat/widget/TintInfo;->mTintMode:Landroid/graphics/PorterDuff$Mode; goto :goto_2 :cond_4 sget-object p1, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; :goto_2 invoke-static {v0, p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createTintFilter(Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;[I)Landroid/graphics/PorterDuffColorFilter; move-result-object p1 invoke-virtual {p0, p1}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V :goto_3 sget p1, Landroid/os/Build$VERSION;->SDK_INT:I const/16 p2, 0x17 if-gt p1, p2, :cond_5 invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->invalidateSelf()V :cond_5 return-void .end method .method static tintDrawableUsingColorFilter(Landroid/content/Context;ILandroid/graphics/drawable/Drawable;)Z .locals 6 .param p0 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p1 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param .param p2 # Landroid/graphics/drawable/Drawable; .annotation build Landroidx/annotation/NonNull; .end annotation .end param sget-object v0, Landroidx/appcompat/widget/AppCompatDrawableManager;->DEFAULT_MODE:Landroid/graphics/PorterDuff$Mode; sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_TINT_COLOR_CONTROL_NORMAL:[I invoke-static {v1, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 const v2, 0x1010031 const/4 v3, -0x1 const/4 v4, 0x0 const/4 v5, 0x1 if-eqz v1, :cond_0 sget v2, Landroidx/appcompat/R$attr;->colorControlNormal:I :goto_0 const/4 p1, 0x1 const/4 v1, -0x1 goto :goto_1 :cond_0 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_COLOR_CONTROL_ACTIVATED:[I invoke-static {v1, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 if-eqz v1, :cond_1 sget v2, Landroidx/appcompat/R$attr;->colorControlActivated:I goto :goto_0 :cond_1 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->COLORFILTER_COLOR_BACKGROUND_MULTIPLY:[I invoke-static {v1, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 if-eqz v1, :cond_2 sget-object v0, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode; goto :goto_0 :cond_2 sget v1, Landroidx/appcompat/R$drawable;->abc_list_divider_mtrl_alpha:I if-ne p1, v1, :cond_3 const v2, 0x1010030 const p1, 0x42233333 # 40.8f invoke-static {p1}, Ljava/lang/Math;->round(F)I move-result p1 move v1, p1 const/4 p1, 0x1 goto :goto_1 :cond_3 sget v1, Landroidx/appcompat/R$drawable;->abc_dialog_material_background:I if-ne p1, v1, :cond_4 goto :goto_0 :cond_4 const/4 p1, 0x0 const/4 v1, -0x1 const/4 v2, 0x0 :goto_1 if-eqz p1, :cond_7 invoke-static {p2}, Landroidx/appcompat/widget/DrawableUtils;->canSafelyMutateDrawable(Landroid/graphics/drawable/Drawable;)Z move-result p1 if-eqz p1, :cond_5 invoke-virtual {p2}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable; move-result-object p2 :cond_5 invoke-static {p0, v2}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColor(Landroid/content/Context;I)I move-result p0 invoke-static {p0, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getPorterDuffColorFilter(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter; move-result-object p0 invoke-virtual {p2, p0}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V if-eq v1, v3, :cond_6 invoke-virtual {p2, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V :cond_6 return v5 :cond_7 return v4 .end method # virtual methods .method public final declared-synchronized getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param monitor-enter p0 const/4 v0, 0x0 :try_start_0 invoke-virtual {p0, p1, p2, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;IZ)Landroid/graphics/drawable/Drawable; move-result-object p1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-object p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method final declared-synchronized getDrawable(Landroid/content/Context;IZ)Landroid/graphics/drawable/Drawable; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param monitor-enter p0 :try_start_0 invoke-direct {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->checkVectorDrawableSetup(Landroid/content/Context;)V invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->loadDrawableFromDelegates(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v0 if-nez v0, :cond_0 invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createDrawableIfNeeded(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v0 :cond_0 if-nez v0, :cond_1 invoke-static {p1, p2}, Landroidx/core/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v0 :cond_1 if-eqz v0, :cond_2 invoke-direct {p0, p1, p2, p3, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->tintDrawable(Landroid/content/Context;IZLandroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable; move-result-object v0 :cond_2 if-eqz v0, :cond_3 invoke-static {v0}, Landroidx/appcompat/widget/DrawableUtils;->fixDrawable(Landroid/graphics/drawable/Drawable;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_3 monitor-exit p0 return-object v0 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method final declared-synchronized getTintList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; .locals 2 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param monitor-enter p0 :try_start_0 invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->getTintListFromCache(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object v0 if-nez v0, :cond_c sget v1, Landroidx/appcompat/R$drawable;->abc_edit_text_material:I if-ne p2, v1, :cond_0 sget v0, Landroidx/appcompat/R$color;->abc_tint_edittext:I :goto_0 invoke-static {p1, v0}, Landroidx/appcompat/content/res/AppCompatResources;->getColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object v0 goto/16 :goto_2 :cond_0 sget v1, Landroidx/appcompat/R$drawable;->abc_switch_track_mtrl_alpha:I if-ne p2, v1, :cond_1 sget v0, Landroidx/appcompat/R$color;->abc_tint_switch_track:I goto :goto_0 :cond_1 sget v1, Landroidx/appcompat/R$drawable;->abc_switch_thumb_material:I if-ne p2, v1, :cond_2 invoke-direct {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createSwitchThumbColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; move-result-object v0 goto :goto_2 :cond_2 sget v1, Landroidx/appcompat/R$drawable;->abc_btn_default_mtrl_shape:I if-ne p2, v1, :cond_3 invoke-direct {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createDefaultButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; move-result-object v0 goto :goto_2 :cond_3 sget v1, Landroidx/appcompat/R$drawable;->abc_btn_borderless_material:I if-ne p2, v1, :cond_4 invoke-direct {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createBorderlessButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; move-result-object v0 goto :goto_2 :cond_4 sget v1, Landroidx/appcompat/R$drawable;->abc_btn_colored_material:I if-ne p2, v1, :cond_5 invoke-direct {p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->createColoredButtonColorStateList(Landroid/content/Context;)Landroid/content/res/ColorStateList; move-result-object v0 goto :goto_2 :cond_5 sget v1, Landroidx/appcompat/R$drawable;->abc_spinner_mtrl_am_alpha:I if-eq p2, v1, :cond_a sget v1, Landroidx/appcompat/R$drawable;->abc_spinner_textfield_background_material:I if-ne p2, v1, :cond_6 goto :goto_1 :cond_6 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_COLOR_CONTROL_NORMAL:[I invoke-static {v1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 if-eqz v1, :cond_7 sget v0, Landroidx/appcompat/R$attr;->colorControlNormal:I invoke-static {p1, v0}, Landroidx/appcompat/widget/ThemeUtils;->getThemeAttrColorStateList(Landroid/content/Context;I)Landroid/content/res/ColorStateList; move-result-object v0 goto :goto_2 :cond_7 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_COLOR_CONTROL_STATE_LIST:[I invoke-static {v1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 if-eqz v1, :cond_8 sget v0, Landroidx/appcompat/R$color;->abc_tint_default:I goto :goto_0 :cond_8 sget-object v1, Landroidx/appcompat/widget/AppCompatDrawableManager;->TINT_CHECKABLE_BUTTON_LIST:[I invoke-static {v1, p2}, Landroidx/appcompat/widget/AppCompatDrawableManager;->arrayContains([II)Z move-result v1 if-eqz v1, :cond_9 sget v0, Landroidx/appcompat/R$color;->abc_tint_btn_checkable:I goto :goto_0 :cond_9 sget v1, Landroidx/appcompat/R$drawable;->abc_seekbar_thumb_material:I if-ne p2, v1, :cond_b sget v0, Landroidx/appcompat/R$color;->abc_tint_seek_thumb:I goto :goto_0 :cond_a :goto_1 sget v0, Landroidx/appcompat/R$color;->abc_tint_spinner:I goto :goto_0 :cond_b :goto_2 if-eqz v0, :cond_c invoke-direct {p0, p1, p2, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->addTintListToCache(Landroid/content/Context;ILandroid/content/res/ColorStateList;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_c monitor-exit p0 return-object v0 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final declared-synchronized onConfigurationChanged(Landroid/content/Context;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param monitor-enter p0 :try_start_0 iget-object v0, p0, Landroidx/appcompat/widget/AppCompatDrawableManager;->mDrawableCaches:Ljava/util/WeakHashMap; invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroidx/collection/LongSparseArray; if-eqz p1, :cond_0 invoke-virtual {p1}, Landroidx/collection/LongSparseArray;->clear()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_0 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method final declared-synchronized onDrawableLoadedFromResources(Landroid/content/Context;Landroidx/appcompat/widget/VectorEnabledTintResources;I)Landroid/graphics/drawable/Drawable; .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroidx/appcompat/widget/VectorEnabledTintResources; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param monitor-enter p0 :try_start_0 invoke-direct {p0, p1, p3}, Landroidx/appcompat/widget/AppCompatDrawableManager;->loadDrawableFromDelegates(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v0 if-nez v0, :cond_0 invoke-virtual {p2, p3}, Landroidx/appcompat/widget/VectorEnabledTintResources;->superGetDrawable(I)Landroid/graphics/drawable/Drawable; move-result-object v0 :cond_0 if-eqz v0, :cond_1 const/4 p2, 0x0 invoke-direct {p0, p1, p3, p2, v0}, Landroidx/appcompat/widget/AppCompatDrawableManager;->tintDrawable(Landroid/content/Context;IZLandroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable; move-result-object p1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-object p1 :cond_1 const/4 p1, 0x0 monitor-exit p0 return-object p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method