535 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			535 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/android/material/internal/ViewUtils;
 | |
| .super Ljava/lang/Object;
 | |
| .source "ViewUtils.java"
 | |
| 
 | |
| 
 | |
| # 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 = {
 | |
|         Lcom/google/android/material/internal/ViewUtils$RelativePadding;,
 | |
|         Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method private constructor <init>()V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static addOnGlobalLayoutListener(Landroid/view/View;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
|     .locals 0
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static doOnApplyWindowInsets(Landroid/view/View;Landroid/util/AttributeSet;II)V
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0, p1, p2, p3, v0}, Lcom/google/android/material/internal/ViewUtils;->doOnApplyWindowInsets(Landroid/view/View;Landroid/util/AttributeSet;IILcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static doOnApplyWindowInsets(Landroid/view/View;Landroid/util/AttributeSet;IILcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;)V
 | |
|     .locals 2
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p4    # Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     sget-object v1, Lcom/google/android/material/R$styleable;->Insets:[I
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {v0, p1, v1, p2, p3}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 4
 | |
|     sget p2, Lcom/google/android/material/R$styleable;->Insets_paddingBottomSystemWindowInsets:I
 | |
| 
 | |
|     const/4 p3, 0x0
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     .line 6
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->Insets_paddingLeftSystemWindowInsets:I
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p1, v0, p3}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 8
 | |
|     sget v1, Lcom/google/android/material/R$styleable;->Insets_paddingRightSystemWindowInsets:I
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p1, v1, p3}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     .line 11
 | |
|     new-instance p1, Lcom/google/android/material/internal/ViewUtils$2;
 | |
| 
 | |
|     invoke-direct {p1, p2, v0, p3, p4}, Lcom/google/android/material/internal/ViewUtils$2;-><init>(ZZZLcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;)V
 | |
| 
 | |
|     invoke-static {p0, p1}, Lcom/google/android/material/internal/ViewUtils;->doOnApplyWindowInsets(Landroid/view/View;Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static doOnApplyWindowInsets(Landroid/view/View;Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;)V
 | |
|     .locals 5
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 12
 | |
|     new-instance v0, Lcom/google/android/material/internal/ViewUtils$RelativePadding;
 | |
| 
 | |
|     .line 13
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->k0(Landroid/view/View;)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     .line 14
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getPaddingTop()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     .line 15
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->j0(Landroid/view/View;)I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     .line 16
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getPaddingBottom()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-direct {v0, v1, v2, v3, v4}, Lcom/google/android/material/internal/ViewUtils$RelativePadding;-><init>(IIII)V
 | |
| 
 | |
|     .line 17
 | |
|     new-instance v1, Lcom/google/android/material/internal/ViewUtils$3;
 | |
| 
 | |
|     invoke-direct {v1, p1, v0}, Lcom/google/android/material/internal/ViewUtils$3;-><init>(Lcom/google/android/material/internal/ViewUtils$OnApplyWindowInsetsListener;Lcom/google/android/material/internal/ViewUtils$RelativePadding;)V
 | |
| 
 | |
|     invoke-static {p0, v1}, Landroidx/core/view/ViewCompat;->a2(Landroid/view/View;Ls1/e0;)V
 | |
| 
 | |
|     .line 18
 | |
|     invoke-static {p0}, Lcom/google/android/material/internal/ViewUtils;->requestApplyInsetsWhenAttached(Landroid/view/View;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static dpToPx(Landroid/content/Context;I)F
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # I
 | |
|         .annotation build Landroidx/annotation/Dimension;
 | |
|             unit = 0x0
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     int-to-float p1, p1
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     invoke-static {v0, p1, p0}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static getContentView(Landroid/view/View;)Landroid/view/ViewGroup;
 | |
|     .locals 3
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     if-nez p0, :cond_0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     .line 1
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getRootView()Landroid/view/View;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const v2, 0x1020002
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     check-cast v2, Landroid/view/ViewGroup;
 | |
| 
 | |
|     if-eqz v2, :cond_1
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     :cond_1
 | |
|     if-eq v1, p0, :cond_2
 | |
| 
 | |
|     .line 3
 | |
|     instance-of p0, v1, Landroid/view/ViewGroup;
 | |
| 
 | |
|     if-eqz p0, :cond_2
 | |
| 
 | |
|     .line 4
 | |
|     check-cast v1, Landroid/view/ViewGroup;
 | |
| 
 | |
|     return-object v1
 | |
| 
 | |
|     :cond_2
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public static getContentViewOverlay(Landroid/view/View;)Lcom/google/android/material/internal/ViewOverlayImpl;
 | |
|     .locals 0
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/android/material/internal/ViewUtils;->getContentView(Landroid/view/View;)Landroid/view/ViewGroup;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/android/material/internal/ViewUtils;->getOverlay(Landroid/view/View;)Lcom/google/android/material/internal/ViewOverlayImpl;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getOverlay(Landroid/view/View;)Lcom/google/android/material/internal/ViewOverlayImpl;
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     if-nez p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 1
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/android/material/internal/ViewOverlayApi18;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/android/material/internal/ViewOverlayApi18;-><init>(Landroid/view/View;)V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public static getParentAbsoluteElevation(Landroid/view/View;)F
 | |
|     .locals 2
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     instance-of v1, p0, Landroid/view/View;
 | |
| 
 | |
|     if-eqz v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     move-object v1, p0
 | |
| 
 | |
|     check-cast v1, Landroid/view/View;
 | |
| 
 | |
|     invoke-static {v1}, Landroidx/core/view/ViewCompat;->R(Landroid/view/View;)F
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     add-float/2addr v0, v1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-interface {p0}, Landroid/view/ViewParent;->getParent()Landroid/view/ViewParent;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public static isLayoutRtl(Landroid/view/View;)Z
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->Z(Landroid/view/View;)I
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     if-ne p0, v0, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public static parseTintMode(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuff$Mode;
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x3
 | |
| 
 | |
|     if-eq p0, v0, :cond_2
 | |
| 
 | |
|     const/4 v0, 0x5
 | |
| 
 | |
|     if-eq p0, v0, :cond_1
 | |
| 
 | |
|     const/16 v0, 0x9
 | |
| 
 | |
|     if-eq p0, v0, :cond_0
 | |
| 
 | |
|     packed-switch p0, :pswitch_data_0
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 1
 | |
|     :pswitch_0
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->ADD:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 2
 | |
|     :pswitch_1
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->SCREEN:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 3
 | |
|     :pswitch_2
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_2
 | |
|     sget-object p0, Landroid/graphics/PorterDuff$Mode;->SRC_OVER:Landroid/graphics/PorterDuff$Mode;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :pswitch_data_0
 | |
|     .packed-switch 0xe
 | |
|         :pswitch_2
 | |
|         :pswitch_1
 | |
|         :pswitch_0
 | |
|     .end packed-switch
 | |
| .end method
 | |
| 
 | |
| .method public static removeOnGlobalLayoutListener(Landroid/view/View;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
|     .locals 0
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0, p1}, Lcom/google/android/material/internal/ViewUtils;->removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
|     .locals 0
 | |
|     .param p0    # Landroid/view/ViewTreeObserver;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, p1}, Landroid/view/ViewTreeObserver;->removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static requestApplyInsetsWhenAttached(Landroid/view/View;)V
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->O0(Landroid/view/View;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->v1(Landroid/view/View;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     new-instance v0, Lcom/google/android/material/internal/ViewUtils$4;
 | |
| 
 | |
|     invoke-direct {v0}, Lcom/google/android/material/internal/ViewUtils$4;-><init>()V
 | |
| 
 | |
|     invoke-virtual {p0, v0}, Landroid/view/View;->addOnAttachStateChangeListener(Landroid/view/View$OnAttachStateChangeListener;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static requestFocusAndShowKeyboard(Landroid/view/View;)V
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/view/View;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/view/View;->requestFocus()Z
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lcom/google/android/material/internal/ViewUtils$1;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/android/material/internal/ViewUtils$1;-><init>(Landroid/view/View;)V
 | |
| 
 | |
|     invoke-virtual {p0, v0}, Landroid/view/View;->post(Ljava/lang/Runnable;)Z
 | |
| 
 | |
|     return-void
 | |
| .end method
 |