- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
1894 lines
54 KiB
Smali
1894 lines
54 KiB
Smali
.class public Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource;
|
|
|
|
|
|
# static fields
|
|
.field private static final CONTENT_RANGE_HEADER:Ljava/util/regex/Pattern;
|
|
|
|
.field public static final DEFAULT_CONNECT_TIMEOUT_MILLIS:I = 0x1f40
|
|
|
|
.field public static final DEFAULT_READ_TIMEOUT_MILLIS:I = 0x1f40
|
|
|
|
.field private static final MAX_BYTES_TO_DRAIN:J = 0x800L
|
|
|
|
.field private static final MAX_REDIRECTS:I = 0x14
|
|
|
|
.field private static final TAG:Ljava/lang/String; = "DefaultHttpDataSource"
|
|
|
|
.field private static final skipBufferReference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"[B>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field private final allowCrossProtocolRedirects:Z
|
|
|
|
.field private bytesRead:J
|
|
|
|
.field private bytesSkipped:J
|
|
|
|
.field private bytesToRead:J
|
|
|
|
.field private bytesToSkip:J
|
|
|
|
.field private final connectTimeoutMillis:I
|
|
|
|
.field private connection:Ljava/net/HttpURLConnection;
|
|
|
|
.field private final contentTypePredicate:Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private dataSpec:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;
|
|
|
|
.field private final defaultRequestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.field private inputStream:Ljava/io/InputStream;
|
|
|
|
.field private final listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener<",
|
|
"-",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private opened:Z
|
|
|
|
.field private final readTimeoutMillis:I
|
|
|
|
.field private final requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.field private final userAgent:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "^bytes (\\d+)-(\\d+)/(\\d+)$"
|
|
|
|
.line 39
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->CONTENT_RANGE_HEADER:Ljava/util/regex/Pattern;
|
|
|
|
.line 40
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
sput-object v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->skipBufferReference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 64
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;-><init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener<",
|
|
"-",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/16 v4, 0x1f40
|
|
|
|
const/16 v5, 0x1f40
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
.line 70
|
|
invoke-direct/range {v0 .. v5}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;-><init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;II)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;II)V
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener<",
|
|
"-",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;",
|
|
">;II)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move v4, p4
|
|
|
|
move v5, p5
|
|
|
|
.line 78
|
|
invoke-direct/range {v0 .. v7}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;-><init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;IIZLcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;IIZLcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener<",
|
|
"-",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;",
|
|
">;IIZ",
|
|
"Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 86
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 87
|
|
invoke-static {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Assertions;->checkNotEmpty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->userAgent:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->contentTypePredicate:Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;
|
|
|
|
iput-object p3, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
.line 90
|
|
new-instance p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
invoke-direct {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
iput p4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connectTimeoutMillis:I
|
|
|
|
iput p5, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->readTimeoutMillis:I
|
|
|
|
iput-boolean p6, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->allowCrossProtocolRedirects:Z
|
|
|
|
iput-object p7, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->defaultRequestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private closeConnectionQuietly()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 501
|
|
:try_start_0
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "DefaultHttpDataSource"
|
|
|
|
const-string v2, "Unexpected error while disconnecting"
|
|
|
|
.line 503
|
|
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private static getContentLength(Ljava/net/HttpURLConnection;)J
|
|
.locals 10
|
|
|
|
const-string v0, "Content-Length"
|
|
|
|
.line 366
|
|
invoke-virtual {p0, v0}, Ljava/net/URLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 367
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "]"
|
|
|
|
const-string v3, "DefaultHttpDataSource"
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 369
|
|
:try_start_0
|
|
invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v4
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 371
|
|
:catch_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "Unexpected Content-Length ["
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v3, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
const-wide/16 v4, -0x1
|
|
|
|
:goto_0
|
|
const-string v1, "Content-Range"
|
|
|
|
.line 374
|
|
invoke-virtual {p0, v1}, Ljava/net/URLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 375
|
|
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
sget-object v1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->CONTENT_RANGE_HEADER:Ljava/util/regex/Pattern;
|
|
|
|
.line 376
|
|
invoke-virtual {v1, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object v1
|
|
|
|
.line 377
|
|
invoke-virtual {v1}, Ljava/util/regex/Matcher;->find()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
const/4 v6, 0x2
|
|
|
|
.line 380
|
|
:try_start_1
|
|
invoke-virtual {v1, v6}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v6
|
|
|
|
const/4 v8, 0x1
|
|
|
|
invoke-virtual {v1, v8}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v8
|
|
|
|
sub-long/2addr v6, v8
|
|
|
|
const-wide/16 v8, 0x1
|
|
|
|
add-long/2addr v6, v8
|
|
|
|
const-wide/16 v8, 0x0
|
|
|
|
cmp-long v1, v4, v8
|
|
|
|
if-gez v1, :cond_1
|
|
|
|
move-wide v4, v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
cmp-long v1, v4, v6
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 390
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, "Inconsistent headers ["
|
|
|
|
invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "] ["
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 392
|
|
invoke-static {v4, v5, v6, v7}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide v4
|
|
:try_end_1
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
goto :goto_1
|
|
|
|
.line 395
|
|
:catch_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Unexpected Content-Range ["
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-wide v4
|
|
.end method
|
|
|
|
.method private static handleRedirect(Ljava/net/URL;Ljava/lang/String;)Ljava/net/URL;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 347
|
|
new-instance v0, Ljava/net/URL;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/net/URL;-><init>(Ljava/net/URL;Ljava/lang/String;)V
|
|
|
|
.line 349
|
|
invoke-virtual {v0}, Ljava/net/URL;->getProtocol()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "https"
|
|
|
|
.line 350
|
|
invoke-virtual {p1, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const-string p1, "http"
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 351
|
|
:cond_0
|
|
new-instance p1, Ljava/net/ProtocolException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Unsupported protocol redirect: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object v0
|
|
|
|
.line 344
|
|
:cond_2
|
|
new-instance p0, Ljava/net/ProtocolException;
|
|
|
|
const-string p1, "Null location redirect"
|
|
|
|
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method private makeConnection(Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)Ljava/net/HttpURLConnection;
|
|
.locals 19
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
.line 257
|
|
new-instance v1, Ljava/net/URL;
|
|
|
|
iget-object v2, v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->uri:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v2}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 258
|
|
iget-object v2, v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->postBody:[B
|
|
|
|
.line 259
|
|
iget-wide v12, v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->position:J
|
|
|
|
.line 260
|
|
iget-wide v14, v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->length:J
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 261
|
|
invoke-virtual {v0, v3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->isFlagSet(I)Z
|
|
|
|
move-result v16
|
|
|
|
move-object/from16 v11, p0
|
|
|
|
iget-boolean v0, v11, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->allowCrossProtocolRedirects:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-wide v3, v12
|
|
|
|
move-wide v5, v14
|
|
|
|
move/from16 v7, v16
|
|
|
|
.line 266
|
|
invoke-direct/range {v0 .. v8}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->makeConnection(Ljava/net/URL;[BJJZZ)Ljava/net/HttpURLConnection;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
add-int/lit8 v10, v0, 0x1
|
|
|
|
const/16 v3, 0x14
|
|
|
|
if-gt v0, v3, :cond_3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move-object/from16 v3, p0
|
|
|
|
move-object v4, v1
|
|
|
|
move-object v5, v2
|
|
|
|
move-wide v6, v12
|
|
|
|
move-wide v8, v14
|
|
|
|
move-wide/from16 v17, v12
|
|
|
|
move v12, v10
|
|
|
|
move/from16 v10, v16
|
|
|
|
move v11, v0
|
|
|
|
.line 272
|
|
invoke-direct/range {v3 .. v11}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->makeConnection(Ljava/net/URL;[BJJZZ)Ljava/net/HttpURLConnection;
|
|
|
|
move-result-object v0
|
|
|
|
.line 274
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x12c
|
|
|
|
if-eq v3, v4, :cond_2
|
|
|
|
const/16 v4, 0x12d
|
|
|
|
if-eq v3, v4, :cond_2
|
|
|
|
const/16 v4, 0x12e
|
|
|
|
if-eq v3, v4, :cond_2
|
|
|
|
const/16 v4, 0x12f
|
|
|
|
if-eq v3, v4, :cond_2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/16 v2, 0x133
|
|
|
|
if-eq v3, v2, :cond_2
|
|
|
|
const/16 v2, 0x134
|
|
|
|
if-ne v3, v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
return-object v0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const-string v2, "Location"
|
|
|
|
.line 285
|
|
invoke-virtual {v0, v2}, Ljava/net/URLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 286
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
|
|
.line 287
|
|
invoke-static {v1, v2}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->handleRedirect(Ljava/net/URL;Ljava/lang/String;)Ljava/net/URL;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
move-object/from16 v11, p0
|
|
|
|
move v0, v12
|
|
|
|
move-wide/from16 v12, v17
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
move v12, v10
|
|
|
|
.line 294
|
|
new-instance v0, Ljava/net/NoRouteToHostException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Too many redirects: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/net/NoRouteToHostException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private makeConnection(Ljava/net/URL;[BJJZZ)Ljava/net/HttpURLConnection;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 300
|
|
invoke-virtual {p1}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/google/firebase/perf/network/FirebasePerfUrlConnection;->instrument(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/net/URLConnection;
|
|
|
|
check-cast p1, Ljava/net/HttpURLConnection;
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connectTimeoutMillis:I
|
|
|
|
.line 301
|
|
invoke-virtual {p1, v0}, Ljava/net/URLConnection;->setConnectTimeout(I)V
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->readTimeoutMillis:I
|
|
|
|
.line 302
|
|
invoke-virtual {p1, v0}, Ljava/net/URLConnection;->setReadTimeout(I)V
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->defaultRequestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 304
|
|
invoke-virtual {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;->getSnapshot()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
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
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
.line 305
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
invoke-virtual {p1, v2, v1}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.line 308
|
|
invoke-virtual {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;->getSnapshot()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
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
|
|
|
|
:goto_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
.line 309
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
invoke-virtual {p1, v2, v1}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p3, v0
|
|
|
|
const-wide/16 v1, -0x1
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
cmp-long v0, p5, v1
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 312
|
|
:cond_2
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "bytes="
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3, p4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "-"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
cmp-long v1, p5, v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
.line 314
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
add-long/2addr p3, p5
|
|
|
|
const-wide/16 p5, 0x1
|
|
|
|
sub-long/2addr p3, p5
|
|
|
|
invoke-virtual {v1, p3, p4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_3
|
|
const-string p3, "Range"
|
|
|
|
.line 316
|
|
invoke-virtual {p1, p3, v0}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_4
|
|
const-string p3, "User-Agent"
|
|
|
|
iget-object p4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->userAgent:Ljava/lang/String;
|
|
|
|
.line 318
|
|
invoke-virtual {p1, p3, p4}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-nez p7, :cond_5
|
|
|
|
const-string p3, "Accept-Encoding"
|
|
|
|
const-string p4, "identity"
|
|
|
|
.line 320
|
|
invoke-virtual {p1, p3, p4}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 322
|
|
:cond_5
|
|
invoke-virtual {p1, p8}, Ljava/net/HttpURLConnection;->setInstanceFollowRedirects(Z)V
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
const/4 p3, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
const/4 p3, 0x0
|
|
|
|
.line 323
|
|
:goto_2
|
|
invoke-virtual {p1, p3}, Ljava/net/URLConnection;->setDoOutput(Z)V
|
|
|
|
if-eqz p2, :cond_8
|
|
|
|
const-string p3, "POST"
|
|
|
|
.line 325
|
|
invoke-virtual {p1, p3}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
|
|
|
|
.line 326
|
|
array-length p3, p2
|
|
|
|
if-nez p3, :cond_7
|
|
|
|
goto :goto_3
|
|
|
|
.line 329
|
|
:cond_7
|
|
array-length p3, p2
|
|
|
|
invoke-virtual {p1, p3}, Ljava/net/HttpURLConnection;->setFixedLengthStreamingMode(I)V
|
|
|
|
.line 330
|
|
invoke-virtual {p1}, Ljava/net/URLConnection;->connect()V
|
|
|
|
.line 331
|
|
invoke-virtual {p1}, Ljava/net/URLConnection;->getOutputStream()Ljava/io/OutputStream;
|
|
|
|
move-result-object p3
|
|
|
|
.line 332
|
|
invoke-virtual {p3, p2}, Ljava/io/OutputStream;->write([B)V
|
|
|
|
.line 333
|
|
invoke-virtual {p3}, Ljava/io/OutputStream;->close()V
|
|
|
|
goto :goto_4
|
|
|
|
.line 336
|
|
:cond_8
|
|
:goto_3
|
|
invoke-virtual {p1}, Ljava/net/URLConnection;->connect()V
|
|
|
|
:goto_4
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private static maybeTerminateInputStream(Ljava/net/HttpURLConnection;J)V
|
|
.locals 2
|
|
|
|
.line 464
|
|
sget v0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Util;->SDK_INT:I
|
|
|
|
const/16 v1, 0x13
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0x14
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 469
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-virtual {p0}, Ljava/net/URLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object p0
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
cmp-long v0, p1, v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 472
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->read()I
|
|
|
|
move-result p1
|
|
|
|
const/4 p2, -0x1
|
|
|
|
if-ne p1, p2, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-wide/16 v0, 0x800
|
|
|
|
cmp-long p1, p1, v0
|
|
|
|
if-gtz p1, :cond_2
|
|
|
|
return-void
|
|
|
|
.line 480
|
|
:cond_2
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "com.android.okhttp.internal.http.HttpTransport$ChunkedInputStream"
|
|
|
|
.line 481
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
const-string p2, "com.android.okhttp.internal.http.HttpTransport$FixedLengthInputStream"
|
|
|
|
.line 483
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 484
|
|
:cond_3
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "unexpectedEndOfInput"
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v1, v0, [Ljava/lang/Class;
|
|
|
|
.line 485
|
|
invoke-virtual {p1, p2, v1}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
.line 486
|
|
invoke-virtual {p1, p2}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
|
|
|
|
new-array p2, v0, [Ljava/lang/Object;
|
|
|
|
.line 487
|
|
invoke-virtual {p1, p0, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method private readInternal([BII)I
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
const/4 v5, -0x1
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
iget-wide v6, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
sub-long/2addr v0, v6
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
cmp-long v4, v0, v6
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
return v5
|
|
|
|
:cond_1
|
|
int-to-long v6, p3
|
|
|
|
.line 443
|
|
invoke-static {v6, v7, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
long-to-int p3, v0
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
.line 446
|
|
invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
move-result p1
|
|
|
|
if-ne p1, v5, :cond_4
|
|
|
|
iget-wide p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
cmp-long p1, p1, v2
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
return v5
|
|
|
|
.line 450
|
|
:cond_3
|
|
new-instance p1, Ljava/io/EOFException;
|
|
|
|
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_4
|
|
iget-wide p2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
int-to-long v0, p1
|
|
|
|
add-long/2addr p2, v0
|
|
|
|
iput-wide p2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
iget-object p2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
.line 457
|
|
invoke-interface {p2, p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;->onBytesTransferred(Ljava/lang/Object;I)V
|
|
|
|
:cond_5
|
|
return p1
|
|
.end method
|
|
|
|
.method private skipInternal()V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToSkip:J
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->skipBufferReference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 409
|
|
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [B
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const/16 v0, 0x1000
|
|
|
|
new-array v0, v0, [B
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-wide v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
iget-wide v3, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToSkip:J
|
|
|
|
cmp-long v5, v1, v3
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
sub-long/2addr v3, v1
|
|
|
|
.line 415
|
|
array-length v1, v0
|
|
|
|
int-to-long v1, v1
|
|
|
|
invoke-static {v3, v4, v1, v2}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-int v1, v1
|
|
|
|
iget-object v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 416
|
|
invoke-virtual {v2, v0, v3, v1}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
move-result v1
|
|
|
|
.line 417
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Thread;->isInterrupted()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-eq v1, v2, :cond_2
|
|
|
|
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
int-to-long v4, v1
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
iput-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
iget-object v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 425
|
|
invoke-interface {v2, p0, v1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;->onBytesTransferred(Ljava/lang/Object;I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 421
|
|
:cond_2
|
|
new-instance v0, Ljava/io/EOFException;
|
|
|
|
invoke-direct {v0}, Ljava/io/EOFException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
.line 418
|
|
:cond_3
|
|
new-instance v0, Ljava/io/InterruptedIOException;
|
|
|
|
invoke-direct {v0}, Ljava/io/InterruptedIOException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
sget-object v1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->skipBufferReference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.line 430
|
|
invoke-virtual {v1, v0}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final bytesRead()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final bytesRemaining()J
|
|
.locals 4
|
|
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long v2, v0, v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-wide v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
:goto_0
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final bytesSkipped()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public clearAllRequestProperties()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.line 122
|
|
invoke-virtual {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public clearRequestProperty(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 116
|
|
invoke-static {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Assertions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.line 117
|
|
invoke-virtual {v0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;->remove(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:try_start_0
|
|
iget-object v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 216
|
|
invoke-virtual {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRemaining()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v2, v3, v4}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->maybeTerminateInputStream(Ljava/net/HttpURLConnection;J)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:try_start_1
|
|
iget-object v2, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
.line 218
|
|
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v2
|
|
|
|
.line 220
|
|
:try_start_2
|
|
new-instance v3, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
|
|
iget-object v4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->dataSpec:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;
|
|
|
|
const/4 v5, 0x3
|
|
|
|
invoke-direct {v3, v2, v4, v5}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;-><init>(Ljava/io/IOException;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;I)V
|
|
|
|
throw v3
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
iput-object v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
.line 225
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
iget-boolean v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->opened:Z
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iput-boolean v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->opened:Z
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 229
|
|
invoke-interface {v0, p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;->onTransferEnd(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:goto_1
|
|
iput-object v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
|
|
.line 225
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
iget-boolean v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->opened:Z
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iput-boolean v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->opened:Z
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 229
|
|
invoke-interface {v0, p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;->onTransferEnd(Ljava/lang/Object;)V
|
|
|
|
.line 232
|
|
:cond_2
|
|
throw v2
|
|
.end method
|
|
|
|
.method public final getConnection()Ljava/net/HttpURLConnection;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getResponseHeaders()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 104
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getHeaderFields()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getUri()Landroid/net/Uri;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 99
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getURL()Ljava/net/URL;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public open(Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)J
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Unable to connect to "
|
|
|
|
iput-object p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->dataSpec:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
iput-wide v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesRead:J
|
|
|
|
iput-wide v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesSkipped:J
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 131
|
|
:try_start_0
|
|
invoke-direct {p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->makeConnection(Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)Ljava/net/HttpURLConnection;
|
|
|
|
move-result-object v4
|
|
|
|
iput-object v4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
|
|
|
.line 139
|
|
:try_start_1
|
|
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getResponseCode()I
|
|
|
|
move-result v0
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
const/16 v4, 0xc8
|
|
|
|
if-lt v0, v4, :cond_8
|
|
|
|
const/16 v5, 0x12b
|
|
|
|
if-le v0, v5, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
iget-object v5, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 159
|
|
invoke-virtual {v5}, Ljava/net/URLConnection;->getContentType()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v6, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->contentTypePredicate:Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
.line 160
|
|
invoke-interface {v6, v5}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Predicate;->evaluate(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 161
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
.line 162
|
|
new-instance v0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$InvalidContentTypeException;
|
|
|
|
invoke-direct {v0, v5, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$InvalidContentTypeException;-><init>(Ljava/lang/String;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
if-ne v0, v4, :cond_3
|
|
|
|
.line 168
|
|
iget-wide v4, p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->position:J
|
|
|
|
cmp-long v0, v4, v1
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
move-wide v1, v4
|
|
|
|
:cond_3
|
|
iput-wide v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToSkip:J
|
|
|
|
.line 171
|
|
invoke-virtual {p1, v3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->isFlagSet(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
.line 172
|
|
iget-wide v0, p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->length:J
|
|
|
|
const-wide/16 v4, -0x1
|
|
|
|
cmp-long v2, v0, v4
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
iput-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 175
|
|
invoke-static {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->getContentLength(Ljava/net/HttpURLConnection;)J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long v2, v0, v4
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-wide v4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToSkip:J
|
|
|
|
sub-long v4, v0, v4
|
|
|
|
:cond_5
|
|
iput-wide v4, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
goto :goto_1
|
|
|
|
.line 184
|
|
:cond_6
|
|
iget-wide v0, p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->length:J
|
|
|
|
iput-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
:goto_1
|
|
:try_start_2
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 188
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->inputStream:Ljava/io/InputStream;
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
iput-boolean v3, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->opened:Z
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->listener:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 196
|
|
invoke-interface {v0, p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/TransferListener;->onTransferStart(Ljava/lang/Object;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)V
|
|
|
|
:cond_7
|
|
iget-wide v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->bytesToRead:J
|
|
|
|
return-wide v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 190
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
.line 191
|
|
new-instance v1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
|
|
invoke-direct {v1, v0, p1, v3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;-><init>(Ljava/io/IOException;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;I)V
|
|
|
|
throw v1
|
|
|
|
:cond_8
|
|
:goto_2
|
|
iget-object v1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->connection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 148
|
|
invoke-virtual {v1}, Ljava/net/URLConnection;->getHeaderFields()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
.line 149
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
.line 150
|
|
new-instance v2, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$InvalidResponseCodeException;
|
|
|
|
invoke-direct {v2, v0, v1, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$InvalidResponseCodeException;-><init>(ILjava/util/Map;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;)V
|
|
|
|
const/16 p1, 0x1a0
|
|
|
|
if-ne v0, p1, :cond_9
|
|
|
|
.line 153
|
|
new-instance p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSourceException;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p1, v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSourceException;-><init>(I)V
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
.line 155
|
|
:cond_9
|
|
throw v2
|
|
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
.line 141
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->closeConnectionQuietly()V
|
|
|
|
.line 142
|
|
new-instance v2, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->uri:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0, v1, p1, v3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;-><init>(Ljava/lang/String;Ljava/io/IOException;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;I)V
|
|
|
|
throw v2
|
|
|
|
:catch_2
|
|
move-exception v1
|
|
|
|
.line 133
|
|
new-instance v2, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p1, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;->uri:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0, v1, p1, v3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;-><init>(Ljava/lang/String;Ljava/io/IOException;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;I)V
|
|
|
|
throw v2
|
|
.end method
|
|
|
|
.method public read([BII)I
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 205
|
|
:try_start_0
|
|
invoke-direct {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->skipInternal()V
|
|
|
|
.line 206
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->readInternal([BII)I
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 208
|
|
new-instance p2, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;
|
|
|
|
iget-object p3, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->dataSpec:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;
|
|
|
|
const/4 v0, 0x2
|
|
|
|
invoke-direct {p2, p1, p3, v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$HttpDataSourceException;-><init>(Ljava/io/IOException;Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DataSpec;I)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 109
|
|
invoke-static {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Assertions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 110
|
|
invoke-static {p2}, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Assertions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/DefaultHttpDataSource;->requestProperties:Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;
|
|
|
|
.line 111
|
|
invoke-virtual {v0, p1, p2}, Lcom/mbridge/msdk/playercommon/exoplayer2/upstream/HttpDataSource$RequestProperties;->set(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|