SendLocationCell.smali

.class public Lim/tpelyyftgw/ui/cells/SendLocationCell;
.super Landroid/widget/FrameLayout;
.source "SendLocationCell.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;
    }
.end annotation


# instance fields
.field private accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

.field private currentAccount:I

.field private dialogId:J

.field private imageView:Landroid/widget/ImageView;

.field private invalidateRunnable:Ljava/lang/Runnable;

.field private onLiveStopListener:Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;

.field private rect:Landroid/graphics/RectF;

.field private titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;


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

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Z)V
    .registers 16
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "live"    # Z

    .line 44
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 26
    sget v0, Lim/tpelyyftgw/messenger/UserConfig;->selectedAccount:I

    iput v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->currentAccount:I

    .line 33
    new-instance v0, Lim/tpelyyftgw/ui/cells/SendLocationCell$1;

    invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell$1;-><init>(Lim/tpelyyftgw/ui/cells/SendLocationCell;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    .line 46
    new-instance v0, Landroid/widget/ImageView;

    invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    .line 48
    if-eqz p2, :cond_1a

    const-string v1, "location_sendLiveLocationBackgroundlocation_sendLiveLocationIcon"

    goto :goto_1c

    :cond_1a
    const-string v1, "location_sendLocationBackgroundlocation_sendLocationIcon"

    :goto_1c
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    .line 49
    const/high16 v0, 0x42200000    # 40.0f

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    const-string v2, "location_sendLiveLocationBackground"

    const-string v3, "location_sendLocationBackground"

    if-eqz p2, :cond_2d

    move-object v4, v2

    goto :goto_2e

    :cond_2d
    move-object v4, v3

    :goto_2e
    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    if-eqz p2, :cond_35

    goto :goto_36

    :cond_35
    move-object v2, v3

    :goto_36
    invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v2

    invoke-static {v1, v4, v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSimpleSelectorCircleDrawable(III)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 50
    .local v1, "circle":Landroid/graphics/drawable/Drawable;
    if-eqz p2, :cond_87

    .line 51
    new-instance v2, Landroid/graphics/RectF;

    invoke-direct {v2}, Landroid/graphics/RectF;-><init>()V

    iput-object v2, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    .line 52
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f081486

    invoke-static {v3}, Lnp/NPFog;->d(I)I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 53
    .local v2, "drawable":Landroid/graphics/drawable/Drawable;
    new-instance v3, Landroid/graphics/PorterDuffColorFilter;

    const-string v4, "location_sendLiveLocationIcon"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v3, v4, v5}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 54
    new-instance v3, Lim/tpelyyftgw/ui/components/CombinedDrawable;

    invoke-direct {v3, v1, v2}, Lim/tpelyyftgw/ui/components/CombinedDrawable;-><init>(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 55
    .local v3, "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v0

    invoke-virtual {v3, v4, v0}, Lim/tpelyyftgw/ui/components/CombinedDrawable;->setCustomSize(II)V

    .line 56
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 57
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    const-wide/16 v4, 0x3e8

    invoke-static {v0, v4, v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;J)V

    .line 58
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->setWillNotDraw(Z)V

    .line 59
    .end local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    .end local v3    # "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    goto :goto_c8

    .line 60
    :cond_87
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f0817bc

    invoke-static {v3}, Lnp/NPFog;->d(I)I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 61
    .restart local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    new-instance v3, Landroid/graphics/PorterDuffColorFilter;

    const-string v4, "location_sendLocationIcon"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v3, v4, v5}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 62
    new-instance v3, Lim/tpelyyftgw/ui/components/CombinedDrawable;

    invoke-direct {v3, v1, v2}, Lim/tpelyyftgw/ui/components/CombinedDrawable;-><init>(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 63
    .restart local v3    # "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v0

    invoke-virtual {v3, v4, v0}, Lim/tpelyyftgw/ui/components/CombinedDrawable;->setCustomSize(II)V

    .line 64
    const/high16 v0, 0x41c00000    # 24.0f

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v0

    invoke-virtual {v3, v4, v0}, Lim/tpelyyftgw/ui/components/CombinedDrawable;->setIconSize(II)V

    .line 65
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 67
    .end local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    .end local v3    # "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    :goto_c8
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    const/high16 v2, 0x42200000    # 40.0f

    const/high16 v3, 0x42200000    # 40.0f

    sget-boolean v4, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/4 v9, 0x5

    const/4 v10, 0x3

    if-eqz v4, :cond_d6

    const/4 v4, 0x5

    goto :goto_d7

    :cond_d6
    const/4 v4, 0x3

    :goto_d7
    or-int/lit8 v4, v4, 0x30

    sget-boolean v5, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/4 v6, 0x0

    const/high16 v7, 0x41880000    # 17.0f

    if-eqz v5, :cond_e2

    const/4 v5, 0x0

    goto :goto_e4

    :cond_e2
    const/high16 v5, 0x41880000    # 17.0f

    :goto_e4
    const/high16 v8, 0x41500000    # 13.0f

    sget-boolean v11, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v11, :cond_eb

    goto :goto_ec

    :cond_eb
    const/4 v7, 0x0

    :goto_ec
    const/4 v11, 0x0

    move v6, v8

    move v8, v11

    invoke-static/range {v2 .. v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {p0, v0, v2}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 69
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    .line 70
    const/16 v2, 0x10

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V

    .line 71
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string/jumbo v2, "windowBackgroundWhiteRedText2"

    const-string/jumbo v3, "windowBackgroundWhiteBlueText7"

    if-eqz p2, :cond_10e

    move-object v4, v2

    goto :goto_10f

    :cond_10e
    move-object v4, v3

    :goto_10f
    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTag(Ljava/lang/Object;)V

    .line 72
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz p2, :cond_117

    goto :goto_118

    :cond_117
    move-object v2, v3

    :goto_118
    invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V

    .line 73
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    sget-boolean v2, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v2, :cond_127

    const/4 v2, 0x5

    goto :goto_128

    :cond_127
    const/4 v2, 0x3

    :goto_128
    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V

    .line 74
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string v2, "fonts/rmedium.ttf"

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->getTypeface(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v2

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 75
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v2, -0x40800000    # -1.0f

    const/high16 v3, 0x41a00000    # 20.0f

    sget-boolean v4, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v4, :cond_142

    const/4 v4, 0x5

    goto :goto_143

    :cond_142
    const/4 v4, 0x3

    :goto_143
    or-int/lit8 v4, v4, 0x30

    sget-boolean v5, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v11, 0x41800000    # 16.0f

    const/high16 v12, 0x42920000    # 73.0f

    if-eqz v5, :cond_150

    const/high16 v5, 0x41800000    # 16.0f

    goto :goto_152

    :cond_150
    const/high16 v5, 0x42920000    # 73.0f

    :goto_152
    const/high16 v6, 0x41400000    # 12.0f

    sget-boolean v7, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v7, :cond_15b

    const/high16 v7, 0x42920000    # 73.0f

    goto :goto_15d

    :cond_15b
    const/high16 v7, 0x41800000    # 16.0f

    :goto_15d
    const/4 v8, 0x0

    invoke-static/range {v2 .. v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {p0, v0, v2}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 77
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    .line 78
    const/16 v2, 0xe

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V

    .line 79
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string/jumbo v2, "windowBackgroundWhiteGrayText3"

    invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V

    .line 80
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    sget-boolean v2, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v2, :cond_185

    const/4 v2, 0x5

    goto :goto_186

    :cond_185
    const/4 v2, 0x3

    :goto_186
    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V

    .line 81
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v2, -0x40800000    # -1.0f

    const/high16 v3, 0x41a00000    # 20.0f

    sget-boolean v4, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v4, :cond_194

    goto :goto_195

    :cond_194
    const/4 v9, 0x3

    :goto_195
    or-int/lit8 v4, v9, 0x30

    sget-boolean v5, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v5, :cond_19e

    const/high16 v5, 0x41800000    # 16.0f

    goto :goto_1a0

    :cond_19e
    const/high16 v5, 0x42920000    # 73.0f

    :goto_1a0
    const/high16 v6, 0x42140000    # 37.0f

    sget-boolean v7, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v7, :cond_1a9

    const/high16 v7, 0x42920000    # 73.0f

    goto :goto_1ab

    :cond_1a9
    const/high16 v7, 0x41800000    # 16.0f

    :goto_1ab
    const/4 v8, 0x0

    invoke-static/range {v2 .. v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {p0, v0, v2}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 82
    return-void
.end method

.method static synthetic access$000(Lim/tpelyyftgw/ui/cells/SendLocationCell;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/SendLocationCell;

    .line 24
    invoke-direct {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->checkText()V

    return-void
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/cells/SendLocationCell;)Landroid/graphics/RectF;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/SendLocationCell;

    .line 24
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    return-object v0
.end method

.method static synthetic access$200(Lim/tpelyyftgw/ui/cells/SendLocationCell;)Ljava/lang/Runnable;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/SendLocationCell;

    .line 24
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    return-object v0
.end method

.method private checkText()V
    .registers 5

    .line 127
    iget v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/LocationController;->getInstance(I)Lim/tpelyyftgw/messenger/LocationController;

    move-result-object v0

    iget-wide v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->dialogId:J

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/messenger/LocationController;->getSharingLocationInfo(J)Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    move-result-object v0

    .line 128
    .local v0, "info":Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;
    if-eqz v0, :cond_35

    .line 129
    const v1, 0x7f0f1007

    const-string v2, "StopLiveLocation"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    iget-object v2, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->messageObject:Lim/tpelyyftgw/messenger/MessageObject;

    iget-object v2, v2, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->edit_date:I

    if-eqz v2, :cond_26

    iget-object v2, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->messageObject:Lim/tpelyyftgw/messenger/MessageObject;

    iget-object v2, v2, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->edit_date:I

    goto :goto_2c

    :cond_26
    iget-object v2, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->messageObject:Lim/tpelyyftgw/messenger/MessageObject;

    iget-object v2, v2, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->date:I

    :goto_2c
    int-to-long v2, v2

    invoke-static {v2, v3}, Lim/tpelyyftgw/messenger/LocaleController;->formatLocationUpdateDate(J)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->setText(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_56

    .line 131
    :cond_35
    const v1, 0x7f0f0f25

    const-string v2, "SendLiveLocation"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    const v2, 0x7f0f0f29

    const-string v3, "SendLiveLocationInfo"

    invoke-static {v3, v2}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->setText(Ljava/lang/String;Ljava/lang/String;)V

    .line 132
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->cancelRunOnUIThread(Ljava/lang/Runnable;)V

    .line 133
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->onLiveStopListener:Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;

    if-eqz v1, :cond_56

    .line 134
    invoke-interface {v1}, Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;->onStop()V

    .line 137
    :cond_56
    :goto_56
    return-void
.end method

.method private getImageView()Landroid/widget/ImageView;
    .registers 2

    .line 85
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    return-object v0
.end method


# virtual methods
.method protected onAttachedToWindow()V
    .registers 4

    .line 110
    invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V

    .line 111
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    if-eqz v0, :cond_e

    .line 112
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    const-wide/16 v1, 0x3e8

    invoke-static {v0, v1, v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;J)V

    .line 114
    :cond_e
    return-void
.end method

.method protected onDetachedFromWindow()V
    .registers 2

    .line 104
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 105
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->cancelRunOnUIThread(Ljava/lang/Runnable;)V

    .line 106
    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .registers 13
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 141
    iget v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/LocationController;->getInstance(I)Lim/tpelyyftgw/messenger/LocationController;

    move-result-object v0

    iget-wide v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->dialogId:J

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/messenger/LocationController;->getSharingLocationInfo(J)Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    move-result-object v0

    .line 142
    .local v0, "currentInfo":Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;
    if-nez v0, :cond_f

    .line 143
    return-void

    .line 145
    :cond_f
    iget v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->currentAccount:I

    invoke-static {v1}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->getInstance(I)Lim/tpelyyftgw/tgnet/ConnectionsManager;

    move-result-object v1

    invoke-virtual {v1}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->getCurrentTime()I

    move-result v1

    .line 146
    .local v1, "currentTime":I
    iget v2, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->stopTime:I

    if-ge v2, v1, :cond_1e

    .line 147
    return-void

    .line 150
    :cond_1e
    iget v2, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->stopTime:I

    sub-int/2addr v2, v1

    invoke-static {v2}, Ljava/lang/Math;->abs(I)I

    move-result v2

    int-to-float v2, v2

    iget v3, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->period:I

    int-to-float v3, v3

    div-float/2addr v2, v3

    .line 151
    .local v2, "progress":F
    sget-boolean v3, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v4, 0x42400000    # 48.0f

    const/high16 v5, 0x41500000    # 13.0f

    const/high16 v6, 0x41900000    # 18.0f

    const/high16 v7, 0x422c0000    # 43.0f

    if-eqz v3, :cond_50

    .line 152
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    int-to-float v5, v5

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    int-to-float v6, v6

    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    int-to-float v7, v7

    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    int-to-float v4, v4

    invoke-virtual {v3, v5, v6, v7, v4}, Landroid/graphics/RectF;->set(FFFF)V

    goto :goto_73

    .line 154
    :cond_50
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->getMeasuredWidth()I

    move-result v8

    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    sub-int/2addr v8, v7

    int-to-float v7, v8

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    int-to-float v6, v6

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->getMeasuredWidth()I

    move-result v8

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    sub-int/2addr v8, v5

    int-to-float v5, v8

    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    int-to-float v4, v4

    invoke-virtual {v3, v7, v6, v5, v4}, Landroid/graphics/RectF;->set(FFFF)V

    .line 157
    :goto_73
    const-string v3, "location_liveLocationProgress"

    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v3

    .line 158
    .local v3, "color":I
    sget-object v4, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_radialProgress2Paint:Landroid/graphics/Paint;

    invoke-virtual {v4, v3}, Landroid/graphics/Paint;->setColor(I)V

    .line 159
    sget-object v4, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {v4, v3}, Landroid/text/TextPaint;->setColor(I)V

    .line 161
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    const/high16 v7, -0x3d4c0000    # -90.0f

    const/high16 v4, -0x3c4c0000    # -360.0f

    mul-float v8, v2, v4

    const/4 v9, 0x0

    sget-object v10, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_radialProgress2Paint:Landroid/graphics/Paint;

    move-object v5, p1

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 163
    iget v4, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->stopTime:I

    sub-int/2addr v4, v1

    invoke-static {v4}, Ljava/lang/Math;->abs(I)I

    move-result v4

    invoke-static {v4}, Lim/tpelyyftgw/messenger/LocaleController;->formatLocationLeftTime(I)Ljava/lang/String;

    move-result-object v4

    .line 165
    .local v4, "text":Ljava/lang/String;
    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {v5, v4}, Landroid/text/TextPaint;->measureText(Ljava/lang/String;)F

    move-result v5

    .line 167
    .local v5, "size":F
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->rect:Landroid/graphics/RectF;

    invoke-virtual {v6}, Landroid/graphics/RectF;->centerX()F

    move-result v6

    const/high16 v7, 0x40000000    # 2.0f

    div-float v7, v5, v7

    sub-float/2addr v6, v7

    const/high16 v7, 0x42140000    # 37.0f

    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    int-to-float v7, v7

    sget-object v8, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {p1, v4, v6, v7, v8}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 168
    return-void
.end method

.method protected onMeasure(II)V
    .registers 6
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .line 99
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    const/high16 v1, 0x40000000    # 2.0f

    invoke-static {v0, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    const/high16 v2, 0x42840000    # 66.0f

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    invoke-static {v2, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    invoke-super {p0, v0, v1}, Landroid/widget/FrameLayout;->onMeasure(II)V

    .line 100
    return-void
.end method

.method public setDialogId(J)V
    .registers 3
    .param p1, "did"    # J

    .line 122
    iput-wide p1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->dialogId:J

    .line 123
    invoke-direct {p0}, Lim/tpelyyftgw/ui/cells/SendLocationCell;->checkText()V

    .line 124
    return-void
.end method

.method public setHasLocation(Z)V
    .registers 7
    .param p1, "value"    # Z

    .line 89
    iget v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/LocationController;->getInstance(I)Lim/tpelyyftgw/messenger/LocationController;

    move-result-object v0

    iget-wide v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->dialogId:J

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/messenger/LocationController;->getSharingLocationInfo(J)Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    move-result-object v0

    .line 90
    .local v0, "info":Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;
    if-nez v0, :cond_34

    .line 91
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v2, 0x3f800000    # 1.0f

    const/high16 v3, 0x3f000000    # 0.5f

    if-eqz p1, :cond_19

    const/high16 v4, 0x3f800000    # 1.0f

    goto :goto_1b

    :cond_19
    const/high16 v4, 0x3f000000    # 0.5f

    :goto_1b
    invoke-virtual {v1, v4}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setAlpha(F)V

    .line 92
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz p1, :cond_25

    const/high16 v4, 0x3f800000    # 1.0f

    goto :goto_27

    :cond_25
    const/high16 v4, 0x3f000000    # 0.5f

    :goto_27
    invoke-virtual {v1, v4}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setAlpha(F)V

    .line 93
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->imageView:Landroid/widget/ImageView;

    if-eqz p1, :cond_2f

    goto :goto_31

    :cond_2f
    const/high16 v2, 0x3f000000    # 0.5f

    :goto_31
    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(F)V

    .line 95
    :cond_34
    return-void
.end method

.method public setOnLiveStopListener(Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;)V
    .registers 2
    .param p1, "listener"    # Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;

    .line 175
    iput-object p1, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->onLiveStopListener:Lim/tpelyyftgw/ui/cells/SendLocationCell$OnLiveStopListener;

    .line 176
    return-void
.end method

.method public setText(Ljava/lang/String;Ljava/lang/String;)V
    .registers 4
    .param p1, "title"    # Ljava/lang/String;
    .param p2, "text"    # Ljava/lang/String;

    .line 117
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->titleTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 118
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SendLocationCell;->accurateTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v0, p2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 119
    return-void
.end method