ChatActivityEnterView$9.smali

.class Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;
.super Lim/tpelyyftgw/ui/components/EditTextCaption;
.source "ChatActivityEnterView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lim/tpelyyftgw/ui/components/ChatActivityEnterView;-><init>(Landroid/app/Activity;Lim/tpelyyftgw/ui/components/SizeNotifierFrameLayout;Lim/tpelyyftgw/ui/ChatActivity;Z)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method constructor <init>(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;Landroid/content/Context;)V
    .registers 3
    .param p1, "this$0"    # Lim/tpelyyftgw/ui/components/ChatActivityEnterView;
    .param p2, "context"    # Landroid/content/Context;

    .line 921
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-direct {p0, p2}, Lim/tpelyyftgw/ui/components/EditTextCaption;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method private send(Landroidx/core/view/inputmethod/InputContentInfoCompat;ZI)V
    .registers 21
    .param p1, "inputContentInfo"    # Landroidx/core/view/inputmethod/InputContentInfoCompat;
    .param p2, "notify"    # Z
    .param p3, "scheduleDate"    # I

    .line 924
    move-object/from16 v0, p0

    invoke-virtual/range {p1 .. p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getDescription()Landroid/content/ClipDescription;

    move-result-object v1

    .line 925
    .local v1, "description":Landroid/content/ClipDescription;
    const-string v2, "image/gif"

    invoke-virtual {v1, v2}, Landroid/content/ClipDescription;->hasMimeType(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_33

    .line 926
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$4600(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/AccountInstance;

    move-result-object v3

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual/range {p1 .. p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getContentUri()Landroid/net/Uri;

    move-result-object v6

    const/4 v7, 0x0

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$2700(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)J

    move-result-wide v9

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$2800(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v11

    const/4 v13, 0x0

    const/4 v15, 0x0

    const-string v8, "image/gif"

    move-object/from16 v12, p1

    move/from16 v14, p2

    invoke-static/range {v3 .. v15}, Lim/tpelyyftgw/messenger/SendMessagesHelper;->prepareSendingDocument(Lim/tpelyyftgw/messenger/AccountInstance;Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;JLim/tpelyyftgw/messenger/MessageObject;Landroidx/core/view/inputmethod/InputContentInfoCompat;Lim/tpelyyftgw/messenger/MessageObject;ZI)V

    goto :goto_58

    .line 928
    :cond_33
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$4600(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/AccountInstance;

    move-result-object v3

    const/4 v4, 0x0

    invoke-virtual/range {p1 .. p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getContentUri()Landroid/net/Uri;

    move-result-object v5

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$2700(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)J

    move-result-wide v6

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$2800(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v8

    const/4 v9, 0x0

    const/4 v10, 0x0

    const/4 v11, 0x0

    const/4 v13, 0x0

    const/4 v14, 0x0

    const/16 v16, 0x0

    move-object/from16 v12, p1

    move/from16 v15, p2

    invoke-static/range {v3 .. v16}, Lim/tpelyyftgw/messenger/SendMessagesHelper;->prepareSendingPhoto(Lim/tpelyyftgw/messenger/AccountInstance;Ljava/lang/String;Landroid/net/Uri;JLim/tpelyyftgw/messenger/MessageObject;Ljava/lang/CharSequence;Ljava/util/ArrayList;Ljava/util/ArrayList;Landroidx/core/view/inputmethod/InputContentInfoCompat;ILim/tpelyyftgw/messenger/MessageObject;ZI)V

    .line 930
    :goto_58
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1500(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;

    move-result-object v2

    if-eqz v2, :cond_6e

    .line 931
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1500(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;

    move-result-object v2

    const/4 v3, 0x0

    const/4 v4, 0x1

    move/from16 v5, p3

    invoke-interface {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;->onMessageSend(Ljava/lang/CharSequence;ZI)V

    goto :goto_70

    .line 930
    :cond_6e
    move/from16 v5, p3

    .line 933
    :goto_70
    return-void
.end method


# virtual methods
.method public synthetic lambda$null$0$ChatActivityEnterView$9(Landroidx/core/view/inputmethod/InputContentInfoCompat;ZI)V
    .registers 4
    .param p1, "inputContentInfo"    # Landroidx/core/view/inputmethod/InputContentInfoCompat;
    .param p2, "notify"    # Z
    .param p3, "scheduleDate"    # I

    .line 951
    invoke-direct {p0, p1, p2, p3}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->send(Landroidx/core/view/inputmethod/InputContentInfoCompat;ZI)V

    return-void
.end method

.method public synthetic lambda$onCreateInputConnection$1$ChatActivityEnterView$9(Landroidx/core/view/inputmethod/InputContentInfoCompat;ILandroid/os/Bundle;)Z
    .registers 8
    .param p1, "inputContentInfo"    # Landroidx/core/view/inputmethod/InputContentInfoCompat;
    .param p2, "flags"    # I
    .param p3, "opts"    # Landroid/os/Bundle;

    .line 942
    invoke-static {}, Landroidx/core/os/BuildCompat;->isAtLeastNMR1()Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_11

    and-int/lit8 v0, p2, 0x1

    if-eqz v0, :cond_11

    .line 944
    :try_start_b
    invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->requestPermission()V
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_e} :catch_f

    .line 947
    goto :goto_11

    .line 945
    :catch_f
    move-exception v0

    .line 946
    .local v0, "e":Ljava/lang/Exception;
    return v1

    .line 950
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_11
    :goto_11
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->isInScheduleMode()Z

    move-result v0

    const/4 v2, 0x1

    if-eqz v0, :cond_37

    .line 951
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1600(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Landroid/app/Activity;

    move-result-object v0

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$2400(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/ChatActivity;

    move-result-object v1

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/ChatActivity;->getCurrentUser()Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v1

    invoke-static {v1}, Lim/tpelyyftgw/messenger/UserObject;->isUserSelf(Lim/tpelyyftgw/tgnet/TLRPC$User;)Z

    move-result v1

    new-instance v3, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$9$FXqEDdlBLLg0N16IGZwPDWo4Fmc;

    invoke-direct {v3, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$9$FXqEDdlBLLg0N16IGZwPDWo4Fmc;-><init>(Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;Landroidx/core/view/inputmethod/InputContentInfoCompat;)V

    invoke-static {v0, v1, v3}, Lim/tpelyyftgw/ui/components/AlertsCreator;->createScheduleDatePickerDialog(Landroid/content/Context;ZLim/tpelyyftgw/ui/components/AlertsCreator$ScheduleDatePickerDelegate;)Lim/tpelyyftgw/ui/actionbar/BottomSheet$Builder;

    goto :goto_3a

    .line 953
    :cond_37
    invoke-direct {p0, p1, v2, v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->send(Landroidx/core/view/inputmethod/InputContentInfoCompat;ZI)V

    .line 955
    :goto_3a
    return v2
.end method

.method public onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
    .registers 7
    .param p1, "editorInfo"    # Landroid/view/inputmethod/EditorInfo;

    .line 937
    invoke-super {p0, p1}, Lim/tpelyyftgw/ui/components/EditTextCaption;->onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 939
    .local v0, "ic":Landroid/view/inputmethod/InputConnection;
    :try_start_4
    const-string v1, "image/gif"

    const-string v2, "image/*"

    const-string v3, "image/jpg"

    const-string v4, "image/png"

    filled-new-array {v1, v2, v3, v4}, [Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v1}, Landroidx/core/view/inputmethod/EditorInfoCompat;->setContentMimeTypes(Landroid/view/inputmethod/EditorInfo;[Ljava/lang/String;)V

    .line 941
    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$9$aQuA4PtG6bEanAHeJ9oeKuGb34E;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$9$aQuA4PtG6bEanAHeJ9oeKuGb34E;-><init>(Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;)V

    .line 957
    .local v1, "callback":Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
    invoke-static {v0, p1, v1}, Landroidx/core/view/inputmethod/InputConnectionCompat;->createWrapper(Landroid/view/inputmethod/InputConnection;Landroid/view/inputmethod/EditorInfo;Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;)Landroid/view/inputmethod/InputConnection;

    move-result-object v2
    :try_end_1c
    .catchall {:try_start_4 .. :try_end_1c} :catchall_1d

    return-object v2

    .line 958
    .end local v1    # "callback":Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
    :catchall_1d
    move-exception v1

    .line 959
    .local v1, "e":Ljava/lang/Throwable;
    invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 961
    .end local v1    # "e":Ljava/lang/Throwable;
    return-object v0
.end method

.method protected onSelectionChanged(II)V
    .registers 4
    .param p1, "selStart"    # I
    .param p2, "selEnd"    # I

    .line 984
    invoke-super {p0, p1, p2}, Lim/tpelyyftgw/ui/components/EditTextCaption;->onSelectionChanged(II)V

    .line 985
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1500(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;

    move-result-object v0

    if-eqz v0, :cond_14

    .line 986
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1500(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;

    move-result-object v0

    invoke-interface {v0, p1, p2}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$ChatActivityEnterViewDelegate;->onTextSelectionChanged(II)V

    .line 988
    :cond_14
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 5
    .param p1, "event"    # Landroid/view/MotionEvent;

    .line 966
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->isPopupShowing()Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_36

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    if-nez v0, :cond_36

    .line 967
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1100(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)I

    move-result v0

    if-eqz v0, :cond_25

    .line 968
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0, v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$1102(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;I)I

    .line 969
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$700(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/EmojiView;

    move-result-object v0

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EmojiView;->closeSearch(Z)V

    .line 971
    :cond_25
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    sget-boolean v2, Lim/tpelyyftgw/messenger/AndroidUtilities;->usingHardwareInput:Z

    if-eqz v2, :cond_2d

    const/4 v2, 0x0

    goto :goto_2e

    :cond_2d
    const/4 v2, 0x2

    :goto_2e
    invoke-static {v0, v2, v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$4700(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;II)V

    .line 972
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$9;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$4800(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)V

    .line 975
    :cond_36
    :try_start_36
    invoke-super {p0, p1}, Lim/tpelyyftgw/ui/components/EditTextCaption;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0
    :try_end_3a
    .catch Ljava/lang/Exception; {:try_start_36 .. :try_end_3a} :catch_3b

    return v0

    .line 976
    :catch_3b
    move-exception v0

    .line 977
    .local v0, "e":Ljava/lang/Exception;
    invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 979
    .end local v0    # "e":Ljava/lang/Exception;
    return v1
.end method