VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a.smali

.class final Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1;->onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.end annotation

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


# instance fields
.field final synthetic a:Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1;

.field final synthetic b:J

.field final synthetic c:Landroid/content/Context;


# direct methods
.method constructor <init>(Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1;JLandroid/content/Context;)V
    .registers 5

    iput-object p1, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->a:Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1;

    iput-wide p2, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->b:J

    iput-object p4, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->c:Landroid/content/Context;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 11

    .line 96
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a()Ljava/util/concurrent/ConcurrentHashMap;

    move-result-object v0

    check-cast v0, Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_e
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_119

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map$Entry;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/masala/share/proto/VideoPost;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Number;

    invoke-virtual {v1}, Ljava/lang/Number;->longValue()J

    move-result-wide v3

    .line 97
    iget-wide v5, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->b:J

    cmp-long v1, v3, v5

    if-nez v1, :cond_e

    .line 100
    iget-wide v0, v2, Lcom/masala/share/proto/VideoPost;->a:J

    const-wide/16 v3, 0x0

    cmp-long v5, v0, v3

    if-lez v5, :cond_ea

    const/4 v0, 0x0

    .line 101
    iget-wide v5, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->b:J

    iget-object v1, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->c:Landroid/content/Context;

    invoke-static {v0, v5, v6, v1}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a(Landroid/app/DownloadManager;JLandroid/content/Context;)Lcom/imo/android/imoim/feeds/ui/detail/utils/g;

    move-result-object v0

    .line 102
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->b()Ljava/util/concurrent/ConcurrentHashMap;

    move-result-object v1

    iget-wide v5, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->b:J

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-virtual {v1, v5}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Long;

    if-eqz v1, :cond_61

    .line 103
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    const-string v5, "it"

    invoke-static {v1, v5}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    sub-long/2addr v3, v5

    .line 105
    :cond_61
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v5, "postid: "

    invoke-direct {v1, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v5, v2, Lcom/masala/share/proto/VideoPost;->a:J

    invoke-virtual {v1, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v5, " DownLoadManager onReceive downloadVideo success result = "

    invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    const-string v5, "VideoDownLoadUtils"

    invoke-static {v5, v1}, Lsg/bigo/log/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1142
    iget v1, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->a:I

    const-string v5, "download_times"

    const/16 v6, 0x10

    const/16 v7, 0x8

    if-eq v1, v7, :cond_ad

    if-eq v1, v6, :cond_8b

    goto :goto_d4

    :cond_8b
    const/16 v1, 0x7b

    .line 117
    const-class v8, Lcom/masala/share/stat/x;

    .line 116
    invoke-static {v1, v8}, Lcom/masala/share/stat/x;->getInstance(ILjava/lang/Class;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/masala/share/stat/x;

    .line 118
    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v5, v3}, Lcom/masala/share/stat/x;->with(Ljava/lang/String;Ljava/lang/Object;)Lcom/masala/share/stat/LikeBaseReporter;

    move-result-object v1

    check-cast v1, Lcom/masala/share/stat/x;

    .line 2142
    iget-object v3, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->b:Ljava/lang/Integer;

    const-string v4, "error_code"

    .line 119
    invoke-virtual {v1, v4, v3}, Lcom/masala/share/stat/x;->with(Ljava/lang/String;Ljava/lang/Object;)Lcom/masala/share/stat/LikeBaseReporter;

    move-result-object v1

    check-cast v1, Lcom/masala/share/stat/x;

    .line 120
    invoke-virtual {v1}, Lcom/masala/share/stat/x;->report()V

    goto :goto_d4

    .line 108
    :cond_ad
    iget-wide v8, v2, Lcom/masala/share/proto/VideoPost;->a:J

    invoke-static {v8, v9}, Lcom/imo/android/imoim/feeds/ui/detail/b/a/a;->a(J)V

    .line 109
    iget-wide v8, v2, Lcom/masala/share/proto/VideoPost;->a:J

    iget-object v1, v2, Lcom/masala/share/proto/VideoPost;->b:Lcom/masala/share/uid/Uid;

    invoke-virtual {v1}, Lcom/masala/share/uid/Uid;->b()I

    move-result v1

    invoke-static {v8, v9, v1}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a(JI)V

    const/16 v1, 0x7a

    .line 111
    const-class v8, Lcom/masala/share/stat/x;

    .line 110
    invoke-static {v1, v8}, Lcom/masala/share/stat/x;->getInstance(ILjava/lang/Class;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/masala/share/stat/x;

    .line 112
    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v5, v3}, Lcom/masala/share/stat/x;->with(Ljava/lang/String;Ljava/lang/Object;)Lcom/masala/share/stat/LikeBaseReporter;

    move-result-object v1

    check-cast v1, Lcom/masala/share/stat/x;

    .line 113
    invoke-virtual {v1}, Lcom/masala/share/stat/x;->report()V

    .line 3142
    :goto_d4
    iget v1, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->a:I

    if-eq v1, v7, :cond_dc

    .line 4142
    iget v1, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->a:I

    if-ne v1, v6, :cond_ea

    .line 5142
    :cond_dc
    iget v1, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->c:I

    if-lez v1, :cond_ea

    .line 6142
    iget v0, v0, Lcom/imo/android/imoim/feeds/ui/detail/utils/g;->c:I

    int-to-long v0, v0

    const-string v3, "download"

    const-string v4, "video"

    .line 125
    invoke-static {v3, v4, v0, v1}, Lcom/imo/android/imoim/network/stat/TrafficReport;->reportFeedTraffic(Ljava/lang/String;Ljava/lang/String;J)V

    .line 130
    :cond_ea
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a()Ljava/util/concurrent/ConcurrentHashMap;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 131
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->b()Ljava/util/concurrent/ConcurrentHashMap;

    move-result-object v0

    iget-wide v1, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->b:J

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 132
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a()Ljava/util/concurrent/ConcurrentHashMap;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/ConcurrentHashMap;->size()I

    move-result v0

    if-gtz v0, :cond_119

    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->c()Z

    move-result v0

    if-eqz v0, :cond_119

    .line 133
    iget-object v0, p0, Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1$a;->a:Lcom/imo/android/imoim/feeds/ui/detail/utils/VideoDownLoadUtilsKt$downLoadManagerReceiver$1;

    check-cast v0, Landroid/content/BroadcastReceiver;

    invoke-static {v0}, Lsg/bigo/common/e;->a(Landroid/content/BroadcastReceiver;)V

    const/4 v0, 0x0

    .line 134
    invoke-static {v0}, Lcom/imo/android/imoim/feeds/ui/detail/utils/s;->a(Z)V

    :cond_119
    return-void
.end method