777 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			777 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class Lcom/google/android/material/timepicker/ClockFaceView;
 | |
| .super Lcom/google/android/material/timepicker/RadialViewGroup;
 | |
| .source "ClockFaceView.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lcom/google/android/material/timepicker/ClockHandView$OnRotateListener;
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final EPSILON:F = 0.001f
 | |
| 
 | |
| .field private static final INITIAL_CAPACITY:I = 0xc
 | |
| 
 | |
| .field private static final VALUE_PLACEHOLDER:Ljava/lang/String; = ""
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final clockHandPadding:I
 | |
| 
 | |
| .field private final clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
| .field private currentHandRotation:F
 | |
| 
 | |
| .field private final gradientColors:[I
 | |
| 
 | |
| .field private final gradientPositions:[F
 | |
| 
 | |
| .field private final scratch:Landroid/graphics/RectF;
 | |
| 
 | |
| .field private final textColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
| .field private final textViewPool:Landroid/util/SparseArray;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Landroid/util/SparseArray<",
 | |
|             "Landroid/widget/TextView;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private final textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
| .field private final valueAccessibilityDelegate:Landroidx/core/view/a;
 | |
| 
 | |
| .field private values:[Ljava/lang/String;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Landroid/content/Context;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1, v0}, Lcom/google/android/material/timepicker/ClockFaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 2
 | |
|     sget v0, Lcom/google/android/material/R$attr;->materialClockStyle:I
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/timepicker/ClockFaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
|     .locals 6
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroid/annotation/SuppressLint;
 | |
|         value = {
 | |
|             "ClickableViewAccessibility"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0, p1, p2, p3}, Lcom/google/android/material/timepicker/RadialViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
| 
 | |
|     .line 4
 | |
|     new-instance v0, Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
|     .line 5
 | |
|     new-instance v0, Landroid/graphics/RectF;
 | |
| 
 | |
|     invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->scratch:Landroid/graphics/RectF;
 | |
| 
 | |
|     .line 6
 | |
|     new-instance v0, Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     const/4 v0, 0x3
 | |
| 
 | |
|     new-array v1, v0, [F
 | |
| 
 | |
|     .line 7
 | |
|     fill-array-data v1, :array_0
 | |
| 
 | |
|     iput-object v1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->gradientPositions:[F
 | |
| 
 | |
|     .line 8
 | |
|     sget-object v1, Lcom/google/android/material/R$styleable;->ClockFaceView:[I
 | |
| 
 | |
|     sget v2, Lcom/google/android/material/R$style;->Widget_MaterialComponents_TimePicker_Clock:I
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p1, p2, v1, p3, v2}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     .line 11
 | |
|     sget v1, Lcom/google/android/material/R$styleable;->ClockFaceView_clockNumberTextColor:I
 | |
| 
 | |
|     .line 12
 | |
|     invoke-static {p1, p2, v1}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     iput-object v1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 13
 | |
|     invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     sget v3, Lcom/google/android/material/R$layout;->material_clockface_view:I
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     invoke-virtual {v2, v3, p0, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
 | |
| 
 | |
|     .line 14
 | |
|     sget v2, Lcom/google/android/material/R$id;->material_clock_hand:I
 | |
| 
 | |
|     invoke-virtual {p0, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     check-cast v2, Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     iput-object v2, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     .line 15
 | |
|     sget v3, Lcom/google/android/material/R$dimen;->material_clock_hand_padding:I
 | |
| 
 | |
|     invoke-virtual {p3, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     iput p3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandPadding:I
 | |
| 
 | |
|     new-array p3, v4, [I
 | |
| 
 | |
|     const v3, 0x10100a1
 | |
| 
 | |
|     const/4 v5, 0x0
 | |
| 
 | |
|     aput v3, p3, v5
 | |
| 
 | |
|     .line 16
 | |
|     invoke-virtual {v1}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     .line 17
 | |
|     invoke-virtual {v1, p3, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     new-array v0, v0, [I
 | |
| 
 | |
|     aput p3, v0, v5
 | |
| 
 | |
|     aput p3, v0, v4
 | |
| 
 | |
|     .line 18
 | |
|     invoke-virtual {v1}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     aput p3, v0, v1
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->gradientColors:[I
 | |
| 
 | |
|     .line 19
 | |
|     invoke-virtual {v2, p0}, Lcom/google/android/material/timepicker/ClockHandView;->addOnRotateListener(Lcom/google/android/material/timepicker/ClockHandView$OnRotateListener;)V
 | |
| 
 | |
|     .line 20
 | |
|     sget p3, Lcom/google/android/material/R$color;->material_timepicker_clockface:I
 | |
| 
 | |
|     .line 21
 | |
|     invoke-static {p1, p3}, Lg/a;->c(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     .line 22
 | |
|     invoke-virtual {p3}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     .line 23
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->ClockFaceView_clockFaceBackgroundColor:I
 | |
| 
 | |
|     .line 24
 | |
|     invoke-static {p1, p2, v0}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     if-nez p1, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 25
 | |
|     :cond_0
 | |
|     invoke-virtual {p1}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     .line 26
 | |
|     :goto_0
 | |
|     invoke-virtual {p0, p3}, Lcom/google/android/material/timepicker/RadialViewGroup;->setBackgroundColor(I)V
 | |
| 
 | |
|     .line 27
 | |
|     invoke-virtual {p0}, Landroid/view/ViewGroup;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     new-instance p3, Lcom/google/android/material/timepicker/ClockFaceView$1;
 | |
| 
 | |
|     invoke-direct {p3, p0}, Lcom/google/android/material/timepicker/ClockFaceView$1;-><init>(Lcom/google/android/material/timepicker/ClockFaceView;)V
 | |
| 
 | |
|     .line 28
 | |
|     invoke-virtual {p1, p3}, Landroid/view/ViewTreeObserver;->addOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V
 | |
| 
 | |
|     .line 29
 | |
|     invoke-virtual {p0, v4}, Landroid/view/ViewGroup;->setFocusable(Z)V
 | |
| 
 | |
|     .line 30
 | |
|     invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     .line 31
 | |
|     new-instance p1, Lcom/google/android/material/timepicker/ClockFaceView$2;
 | |
| 
 | |
|     invoke-direct {p1, p0}, Lcom/google/android/material/timepicker/ClockFaceView$2;-><init>(Lcom/google/android/material/timepicker/ClockFaceView;)V
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->valueAccessibilityDelegate:Landroidx/core/view/a;
 | |
| 
 | |
|     const/16 p1, 0xc
 | |
| 
 | |
|     new-array p1, p1, [Ljava/lang/String;
 | |
| 
 | |
|     const-string p2, ""
 | |
| 
 | |
|     .line 32
 | |
|     invoke-static {p1, p2}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 33
 | |
|     invoke-virtual {p0, p1, v5}, Lcom/google/android/material/timepicker/ClockFaceView;->setValues([Ljava/lang/String;I)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :array_0
 | |
|     .array-data 4
 | |
|         0x0
 | |
|         0x3f666666    # 0.9f
 | |
|         0x3f800000    # 1.0f
 | |
|     .end array-data
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$000(Lcom/google/android/material/timepicker/ClockFaceView;)Lcom/google/android/material/timepicker/ClockHandView;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$100(Lcom/google/android/material/timepicker/ClockFaceView;)I
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iget p0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandPadding:I
 | |
| 
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$200(Lcom/google/android/material/timepicker/ClockFaceView;)Landroid/util/SparseArray;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method private findIntersectingTextView()V
 | |
|     .locals 6
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     invoke-virtual {v0}, Lcom/google/android/material/timepicker/ClockHandView;->getCurrentSelectorBox()Landroid/graphics/RectF;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     iget-object v2, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v2}, Landroid/util/SparseArray;->size()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-ge v1, v2, :cond_1
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v2, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v2, v1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     check-cast v2, Landroid/widget/TextView;
 | |
| 
 | |
|     if-nez v2, :cond_0
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     iget-object v3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {v2, v3}, Landroid/widget/TextView;->getDrawingRect(Landroid/graphics/Rect;)V
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {v2}, Landroid/widget/TextView;->getPaddingLeft()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-virtual {v2}, Landroid/widget/TextView;->getPaddingTop()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     invoke-virtual {v3, v4, v5}, Landroid/graphics/Rect;->offset(II)V
 | |
| 
 | |
|     .line 6
 | |
|     iget-object v3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {p0, v2, v3}, Landroid/view/ViewGroup;->offsetDescendantRectToMyCoords(Landroid/view/View;Landroid/graphics/Rect;)V
 | |
| 
 | |
|     .line 7
 | |
|     iget-object v3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->scratch:Landroid/graphics/RectF;
 | |
| 
 | |
|     iget-object v4, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewRect:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {v3, v4}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V
 | |
| 
 | |
|     .line 8
 | |
|     iget-object v3, p0, Lcom/google/android/material/timepicker/ClockFaceView;->scratch:Landroid/graphics/RectF;
 | |
| 
 | |
|     invoke-direct {p0, v0, v3}, Lcom/google/android/material/timepicker/ClockFaceView;->getGradientForTextView(Landroid/graphics/RectF;Landroid/graphics/RectF;)Landroid/graphics/RadialGradient;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {v2}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     invoke-virtual {v4, v3}, Landroid/text/TextPaint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {v2}, Landroid/widget/TextView;->invalidate()V
 | |
| 
 | |
|     :goto_1
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private getGradientForTextView(Landroid/graphics/RectF;Landroid/graphics/RectF;)Landroid/graphics/RadialGradient;
 | |
|     .locals 7
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1, p2}, Landroid/graphics/RectF;->intersects(Landroid/graphics/RectF;Landroid/graphics/RectF;)Z
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     if-nez p2, :cond_0
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     new-instance p2, Landroid/graphics/RadialGradient;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p1}, Landroid/graphics/RectF;->centerX()F
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->scratch:Landroid/graphics/RectF;
 | |
| 
 | |
|     iget v1, v1, Landroid/graphics/RectF;->left:F
 | |
| 
 | |
|     sub-float v1, v0, v1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p1}, Landroid/graphics/RectF;->centerY()F
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/android/material/timepicker/ClockFaceView;->scratch:Landroid/graphics/RectF;
 | |
| 
 | |
|     iget v2, v2, Landroid/graphics/RectF;->top:F
 | |
| 
 | |
|     sub-float v2, v0, v2
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1}, Landroid/graphics/RectF;->width()F
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     const/high16 v0, 0x3f000000    # 0.5f
 | |
| 
 | |
|     mul-float v3, p1, v0
 | |
| 
 | |
|     iget-object v4, p0, Lcom/google/android/material/timepicker/ClockFaceView;->gradientColors:[I
 | |
| 
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->gradientPositions:[F
 | |
| 
 | |
|     sget-object v6, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;
 | |
| 
 | |
|     move-object v0, p2
 | |
| 
 | |
|     invoke-direct/range {v0 .. v6}, Landroid/graphics/RadialGradient;-><init>(FFF[I[FLandroid/graphics/Shader$TileMode;)V
 | |
| 
 | |
|     return-object p2
 | |
| .end method
 | |
| 
 | |
| .method private updateTextViews(I)V
 | |
|     .locals 8
 | |
|     .param p1    # I
 | |
|         .annotation build Landroidx/annotation/StringRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v1}, Landroid/util/SparseArray;->size()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     .line 3
 | |
|     :goto_0
 | |
|     iget-object v4, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     array-length v4, v4
 | |
| 
 | |
|     invoke-static {v4, v1}, Ljava/lang/Math;->max(II)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     if-ge v3, v4, :cond_3
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v4, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v4, v3}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     check-cast v4, Landroid/widget/TextView;
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     array-length v5, v5
 | |
| 
 | |
|     if-lt v3, v5, :cond_0
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p0, v4}, Landroidx/constraintlayout/widget/ConstraintLayout;->removeView(Landroid/view/View;)V
 | |
| 
 | |
|     .line 7
 | |
|     iget-object v4, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v4, v3}, Landroid/util/SparseArray;->remove(I)V
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_0
 | |
|     if-nez v4, :cond_1
 | |
| 
 | |
|     .line 8
 | |
|     sget v4, Lcom/google/android/material/R$layout;->material_clockface_textview:I
 | |
| 
 | |
|     invoke-virtual {v0, v4, p0, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     check-cast v4, Landroid/widget/TextView;
 | |
| 
 | |
|     .line 9
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textViewPool:Landroid/util/SparseArray;
 | |
| 
 | |
|     invoke-virtual {v5, v3, v4}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p0, v4}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
 | |
| 
 | |
|     .line 11
 | |
|     :cond_1
 | |
|     invoke-virtual {v4, v2}, Landroid/widget/TextView;->setVisibility(I)V
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     aget-object v5, v5, v3
 | |
| 
 | |
|     invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
 | |
| 
 | |
|     .line 13
 | |
|     sget v5, Lcom/google/android/material/R$id;->material_value_index:I
 | |
| 
 | |
|     invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
 | |
| 
 | |
|     move-result-object v6
 | |
| 
 | |
|     invoke-virtual {v4, v5, v6}, Landroid/widget/TextView;->setTag(ILjava/lang/Object;)V
 | |
| 
 | |
|     .line 14
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->valueAccessibilityDelegate:Landroidx/core/view/a;
 | |
| 
 | |
|     invoke-static {v4, v5}, Landroidx/core/view/ViewCompat;->B1(Landroid/view/View;Landroidx/core/view/a;)V
 | |
| 
 | |
|     .line 15
 | |
|     iget-object v5, p0, Lcom/google/android/material/timepicker/ClockFaceView;->textColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     invoke-virtual {v4, v5}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
 | |
| 
 | |
|     if-eqz p1, :cond_2
 | |
| 
 | |
|     .line 16
 | |
|     invoke-virtual {p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object v5
 | |
| 
 | |
|     const/4 v6, 0x1
 | |
| 
 | |
|     new-array v6, v6, [Ljava/lang/Object;
 | |
| 
 | |
|     .line 17
 | |
|     iget-object v7, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     aget-object v7, v7, v3
 | |
| 
 | |
|     aput-object v7, v6, v2
 | |
| 
 | |
|     invoke-virtual {v5, p1, v6}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v5
 | |
| 
 | |
|     invoke-virtual {v4, v5}, Landroid/widget/TextView;->setContentDescription(Ljava/lang/CharSequence;)V
 | |
| 
 | |
|     :cond_2
 | |
|     :goto_1
 | |
|     add-int/lit8 v3, v3, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_3
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
 | |
|     .locals 3
 | |
|     .param p1    # Landroid/view/accessibility/AccessibilityNodeInfo;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super {p0, p1}, Landroid/view/ViewGroup;->onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1}, Lt1/c;->V1(Landroid/view/accessibility/AccessibilityNodeInfo;)Lt1/c;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     array-length v0, v0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {v1, v0, v2, v1}, Lt1/c$b;->f(IIZI)Lt1/c$b;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1, v0}, Lt1/c;->W0(Ljava/lang/Object;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onLayout(ZIIII)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super/range {p0 .. p5}, Landroidx/constraintlayout/widget/ConstraintLayout;->onLayout(ZIIII)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0}, Lcom/google/android/material/timepicker/ClockFaceView;->findIntersectingTextView()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onRotate(FZ)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget p2, p0, Lcom/google/android/material/timepicker/ClockFaceView;->currentHandRotation:F
 | |
| 
 | |
|     sub-float/2addr p2, p1
 | |
| 
 | |
|     invoke-static {p2}, Ljava/lang/Math;->abs(F)F
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     const v0, 0x3a83126f    # 0.001f
 | |
| 
 | |
|     cmpl-float p2, p2, v0
 | |
| 
 | |
|     if-lez p2, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iput p1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->currentHandRotation:F
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0}, Lcom/google/android/material/timepicker/ClockFaceView;->findIntersectingTextView()V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setHandRotation(F)V
 | |
|     .locals 1
 | |
|     .param p1    # F
 | |
|         .annotation build Landroidx/annotation/FloatRange;
 | |
|             from = 0.0
 | |
|             to = 360.0
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lcom/google/android/material/timepicker/ClockHandView;->setHandRotation(F)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0}, Lcom/google/android/material/timepicker/ClockFaceView;->findIntersectingTextView()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setRadius(I)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lcom/google/android/material/timepicker/RadialViewGroup;->getRadius()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eq p1, v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-super {p0, p1}, Lcom/google/android/material/timepicker/RadialViewGroup;->setRadius(I)V
 | |
| 
 | |
|     .line 3
 | |
|     iget-object p1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->clockHandView:Lcom/google/android/material/timepicker/ClockHandView;
 | |
| 
 | |
|     invoke-virtual {p0}, Lcom/google/android/material/timepicker/RadialViewGroup;->getRadius()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-virtual {p1, v0}, Lcom/google/android/material/timepicker/ClockHandView;->setCircleRadius(I)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setValues([Ljava/lang/String;I)V
 | |
|     .locals 0
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StringRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lcom/google/android/material/timepicker/ClockFaceView;->values:[Ljava/lang/String;
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0, p2}, Lcom/google/android/material/timepicker/ClockFaceView;->updateTextViews(I)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 |