DefaultLoadErrorHandlingPolicy.smali

.class public Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;
.super Ljava/lang/Object;
.source "DefaultLoadErrorHandlingPolicy.java"

# interfaces
.implements Lcom/google/android/exoplayer2/upstream/LoadErrorHandlingPolicy;


# static fields
.field private static final DEFAULT_BEHAVIOR_MIN_LOADABLE_RETRY_COUNT:I

.field public static final DEFAULT_MIN_LOADABLE_RETRY_COUNT:I

.field public static final DEFAULT_MIN_LOADABLE_RETRY_COUNT_PROGRESSIVE_LIVE:I

.field public static final DEFAULT_TRACK_BLACKLIST_MS:J = 0xea60L


# instance fields
.field private final minimumLoadableRetryCount:I


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

    const v0, -0x1570

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

    move-result v0

    sput v0, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;->DEFAULT_BEHAVIOR_MIN_LOADABLE_RETRY_COUNT:I

    const v0, 0x156c

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

    move-result v0

    sput v0, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;->DEFAULT_MIN_LOADABLE_RETRY_COUNT:I

    const v0, 0x1569

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

    move-result v0

    sput v0, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;->DEFAULT_MIN_LOADABLE_RETRY_COUNT_PROGRESSIVE_LIVE:I

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    .line 50
    const/4 v0, -0x1

    invoke-direct {p0, v0}, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;-><init>(I)V

    .line 51
    return-void
.end method

.method public constructor <init>(I)V
    .registers 2
    .param p1, "minimumLoadableRetryCount"    # I

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

    .line 59
    iput p1, p0, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;->minimumLoadableRetryCount:I

    .line 60
    return-void
.end method


# virtual methods
.method public getBlacklistDurationMsFor(IJLjava/io/IOException;I)J
    .registers 10
    .param p1, "dataType"    # I
    .param p2, "loadDurationMs"    # J
    .param p4, "exception"    # Ljava/io/IOException;
    .param p5, "errorCount"    # I

    .line 69
    instance-of v0, p4, Lcom/google/android/exoplayer2/upstream/HttpDataSource$InvalidResponseCodeException;

    const-wide v1, -0x7fffffffffffffffL    # -4.9E-324

    if-eqz v0, :cond_1a

    .line 70
    move-object v0, p4

    check-cast v0, Lcom/google/android/exoplayer2/upstream/HttpDataSource$InvalidResponseCodeException;

    iget v0, v0, Lcom/google/android/exoplayer2/upstream/HttpDataSource$InvalidResponseCodeException;->responseCode:I

    .line 71
    .local v0, "responseCode":I
    const/16 v3, 0x194

    if-eq v0, v3, :cond_16

    const/16 v3, 0x19a

    if-ne v0, v3, :cond_19

    :cond_16
    const-wide/32 v1, 0xea60

    :cond_19
    return-wide v1

    .line 76
    .end local v0    # "responseCode":I
    :cond_1a
    return-wide v1
.end method

.method public getMinimumLoadableRetryCount(I)I
    .registers 4
    .param p1, "dataType"    # I

    .line 98
    iget v0, p0, Lcom/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy;->minimumLoadableRetryCount:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_c

    .line 99
    const/4 v0, 0x7

    if-ne p1, v0, :cond_a

    const/4 v0, 0x6

    goto :goto_b

    :cond_a
    const/4 v0, 0x3

    :goto_b
    return v0

    .line 103
    :cond_c
    return v0
.end method

.method public getRetryDelayMsFor(IJLjava/io/IOException;I)J
    .registers 8
    .param p1, "dataType"    # I
    .param p2, "loadDurationMs"    # J
    .param p4, "exception"    # Ljava/io/IOException;
    .param p5, "errorCount"    # I

    .line 87
    instance-of v0, p4, Lcom/google/android/exoplayer2/ParserException;

    if-nez v0, :cond_15

    instance-of v0, p4, Ljava/io/FileNotFoundException;

    if-eqz v0, :cond_9

    goto :goto_15

    :cond_9
    add-int/lit8 v0, p5, -0x1

    mul-int/lit16 v0, v0, 0x3e8

    const/16 v1, 0x1388

    .line 89
    invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I

    move-result v0

    int-to-long v0, v0

    goto :goto_1a

    .line 87
    :cond_15
    :goto_15
    const-wide v0, -0x7fffffffffffffffL    # -4.9E-324

    :goto_1a
    return-wide v0
.end method