487 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			487 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/android/material/datepicker/SingleDateSelector;
 | |
| .super Ljava/lang/Object;
 | |
| .source "SingleDateSelector.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lcom/google/android/material/datepicker/DateSelector;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Landroidx/annotation/RestrictTo;
 | |
|     value = {
 | |
|         .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "Ljava/lang/Object;",
 | |
|         "Lcom/google/android/material/datepicker/DateSelector<",
 | |
|         "Ljava/lang/Long;",
 | |
|         ">;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field public static final CREATOR:Landroid/os/Parcelable$Creator;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Landroid/os/Parcelable$Creator<",
 | |
|             "Lcom/google/android/material/datepicker/SingleDateSelector;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private selectedItem:Ljava/lang/Long;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static constructor <clinit>()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Lcom/google/android/material/datepicker/SingleDateSelector$2;
 | |
| 
 | |
|     invoke-direct {v0}, Lcom/google/android/material/datepicker/SingleDateSelector$2;-><init>()V
 | |
| 
 | |
|     sput-object v0, Lcom/google/android/material/datepicker/SingleDateSelector;->CREATOR:Landroid/os/Parcelable$Creator;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>()V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$000(Lcom/google/android/material/datepicker/SingleDateSelector;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/android/material/datepicker/SingleDateSelector;->clearSelection()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$102(Lcom/google/android/material/datepicker/SingleDateSelector;Ljava/lang/Long;)Ljava/lang/Long;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method private clearSelection()V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object v0, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public describeContents()I
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public getDefaultThemeResId(Landroid/content/Context;)I
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     sget v0, Lcom/google/android/material/R$attr;->materialCalendarTheme:I
 | |
| 
 | |
|     const-class v1, Lcom/google/android/material/datepicker/MaterialDatePicker;
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {v1}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p1, v0, v1}, Lcom/google/android/material/resources/MaterialAttributes;->resolveOrThrow(Landroid/content/Context;ILjava/lang/String;)I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| .method public getDefaultTitleResId()I
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     sget v0, Lcom/google/android/material/R$string;->mtrl_picker_date_header_title:I
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public getSelectedDays()Ljava/util/Collection;
 | |
|     .locals 2
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "()",
 | |
|             "Ljava/util/Collection<",
 | |
|             "Ljava/lang/Long;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/util/ArrayList;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     if-eqz v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
 | |
| 
 | |
|     :cond_0
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getSelectedRanges()Ljava/util/Collection;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "()",
 | |
|             "Ljava/util/Collection<",
 | |
|             "Lr1/i<",
 | |
|             "Ljava/lang/Long;",
 | |
|             "Ljava/lang/Long;",
 | |
|             ">;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/util/ArrayList;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getSelection()Ljava/lang/Long;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public bridge synthetic getSelection()Ljava/lang/Object;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lcom/google/android/material/datepicker/SingleDateSelector;->getSelection()Ljava/lang/Long;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getSelectionDisplayString(Landroid/content/Context;)Ljava/lang/String;
 | |
|     .locals 4
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     sget v0, Lcom/google/android/material/R$string;->mtrl_picker_date_header_unselected:I
 | |
| 
 | |
|     invoke-virtual {p1, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
 | |
| 
 | |
|     move-result-wide v0
 | |
| 
 | |
|     invoke-static {v0, v1}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(J)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 5
 | |
|     sget v1, Lcom/google/android/material/R$string;->mtrl_picker_date_header_selected:I
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     new-array v2, v2, [Ljava/lang/Object;
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     aput-object v0, v2, v3
 | |
| 
 | |
|     invoke-virtual {p1, v1, v2}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public isSelectionComplete()Z
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public onCreateTextInputView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;Lcom/google/android/material/datepicker/CalendarConstraints;Lcom/google/android/material/datepicker/OnSelectionChangedListener;)Landroid/view/View;
 | |
|     .locals 7
 | |
|     .param p1    # Landroid/view/LayoutInflater;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/view/ViewGroup;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p3    # Landroid/os/Bundle;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p5    # Lcom/google/android/material/datepicker/OnSelectionChangedListener;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Landroid/view/LayoutInflater;",
 | |
|             "Landroid/view/ViewGroup;",
 | |
|             "Landroid/os/Bundle;",
 | |
|             "Lcom/google/android/material/datepicker/CalendarConstraints;",
 | |
|             "Lcom/google/android/material/datepicker/OnSelectionChangedListener<",
 | |
|             "Ljava/lang/Long;",
 | |
|             ">;)",
 | |
|             "Landroid/view/View;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     sget p3, Lcom/google/android/material/R$layout;->mtrl_picker_text_input_date:I
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 2
 | |
|     sget p2, Lcom/google/android/material/R$id;->mtrl_picker_text_input_date:I
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     move-object v4, p2
 | |
| 
 | |
|     check-cast v4, Lcom/google/android/material/textfield/TextInputLayout;
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {v4}, Lcom/google/android/material/textfield/TextInputLayout;->getEditText()Landroid/widget/EditText;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {}, Lcom/google/android/material/internal/ManufacturerUtils;->isDateInputKeyboardMissingSeparatorCharacters()Z
 | |
| 
 | |
|     move-result p3
 | |
| 
 | |
|     if-eqz p3, :cond_0
 | |
| 
 | |
|     const/16 p3, 0x11
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p2, p3}, Landroid/widget/EditText;->setInputType(I)V
 | |
| 
 | |
|     .line 6
 | |
|     :cond_0
 | |
|     invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getTextInputFormat()Ljava/text/SimpleDateFormat;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p1}, Landroid/view/View;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     invoke-static {p3, v3}, Lcom/google/android/material/datepicker/UtcDates;->getTextInputHint(Landroid/content/res/Resources;Ljava/text/SimpleDateFormat;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     .line 8
 | |
|     invoke-virtual {v4, v2}, Lcom/google/android/material/textfield/TextInputLayout;->setPlaceholderText(Ljava/lang/CharSequence;)V
 | |
| 
 | |
|     .line 9
 | |
|     iget-object p3, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     if-eqz p3, :cond_1
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {v3, p3}, Ljava/text/SimpleDateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     invoke-virtual {p2, p3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
 | |
| 
 | |
|     .line 11
 | |
|     :cond_1
 | |
|     new-instance p3, Lcom/google/android/material/datepicker/SingleDateSelector$1;
 | |
| 
 | |
|     move-object v0, p3
 | |
| 
 | |
|     move-object v1, p0
 | |
| 
 | |
|     move-object v5, p4
 | |
| 
 | |
|     move-object v6, p5
 | |
| 
 | |
|     invoke-direct/range {v0 .. v6}, Lcom/google/android/material/datepicker/SingleDateSelector$1;-><init>(Lcom/google/android/material/datepicker/SingleDateSelector;Ljava/lang/String;Ljava/text/DateFormat;Lcom/google/android/material/textfield/TextInputLayout;Lcom/google/android/material/datepicker/CalendarConstraints;Lcom/google/android/material/datepicker/OnSelectionChangedListener;)V
 | |
| 
 | |
|     invoke-virtual {p2, p3}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
 | |
| 
 | |
|     .line 12
 | |
|     invoke-static {p2}, Lcom/google/android/material/internal/ViewUtils;->requestFocusAndShowKeyboard(Landroid/view/View;)V
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public select(J)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setSelection(Ljava/lang/Long;)V
 | |
|     .locals 2
 | |
|     .param p1    # Ljava/lang/Long;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     if-nez p1, :cond_0
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
 | |
| 
 | |
|     move-result-wide v0
 | |
| 
 | |
|     invoke-static {v0, v1}, Lcom/google/android/material/datepicker/UtcDates;->canonicalYearMonthDay(J)J
 | |
| 
 | |
|     move-result-wide v0
 | |
| 
 | |
|     invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     :goto_0
 | |
|     iput-object p1, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public bridge synthetic setSelection(Ljava/lang/Object;)V
 | |
|     .locals 0
 | |
|     .param p1    # Ljava/lang/Object;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     check-cast p1, Ljava/lang/Long;
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Lcom/google/android/material/datepicker/SingleDateSelector;->setSelection(Ljava/lang/Long;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public writeToParcel(Landroid/os/Parcel;I)V
 | |
|     .locals 0
 | |
|     .param p1    # Landroid/os/Parcel;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p2, p0, Lcom/google/android/material/datepicker/SingleDateSelector;->selectedItem:Ljava/lang/Long;
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeValue(Ljava/lang/Object;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 |