CronetUrlRequestContext.smali
.class public Laegon/chrome/net/impl/CronetUrlRequestContext;
.super Laegon/chrome/net/impl/CronetEngineBase;
# annotations
.annotation build Laegon/chrome/base/VisibleForTesting;
.end annotation
.annotation runtime Laegon/chrome/base/annotations/JNINamespace;
value = "cronet"
.end annotation
.annotation build Laegon/chrome/base/annotations/UsedByReflection;
value = "CronetEngine.java"
.end annotation
# static fields
.field private static final LOG_DEBUG:I = -0x1
.field private static final LOG_NONE:I = 0x3
.field static final LOG_TAG:Ljava/lang/String;
.field private static final LOG_VERBOSE:I = -0x2
.field private static final sInUseStoragePaths:Ljava/util/HashSet;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashSet",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "sInUseStoragePaths"
.end annotation
.end field
# instance fields
.field private final mActiveRequestCount:Ljava/util/concurrent/atomic/AtomicInteger;
.field private mDownstreamThroughputKbps:I
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private mEffectiveConnectionType:I
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private final mFinishedListenerLock:Ljava/lang/Object;
.field private final mFinishedListenerMap:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map",
"<",
"Laegon/chrome/net/RequestFinishedInfo$Listener;",
"Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;",
">;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mFinishedListenerLock"
.end annotation
.end field
.field private mHttpRttMs:I
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private final mInUseStoragePath:Ljava/lang/String;
.field private final mInitCompleted:Landroid/os/ConditionVariable;
.field private mIsLogging:Z
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mLock"
.end annotation
.end field
.field private final mLock:Ljava/lang/Object;
.field private final mNetworkQualityEstimatorEnabled:Z
.field private final mNetworkQualityLock:Ljava/lang/Object;
.field private mNetworkThread:Ljava/lang/Thread;
.field private final mRttListenerList:Laegon/chrome/base/ObserverList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Laegon/chrome/base/ObserverList",
"<",
"Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;",
">;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private volatile mStopNetLogCompleted:Landroid/os/ConditionVariable;
.field private final mThroughputListenerList:Laegon/chrome/base/ObserverList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Laegon/chrome/base/ObserverList",
"<",
"Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;",
">;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private mTransportRttMs:I
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mNetworkQualityLock"
.end annotation
.end field
.field private mUrlRequestContextAdapter:J
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mLock"
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
const-class v0, Laegon/chrome/net/impl/CronetUrlRequestContext;
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v0
sput-object v0, Laegon/chrome/net/impl/CronetUrlRequestContext;->LOG_TAG:Ljava/lang/String;
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
sput-object v0, Laegon/chrome/net/impl/CronetUrlRequestContext;->sInUseStoragePaths:Ljava/util/HashSet;
return-void
.end method
.method public constructor <init>(Laegon/chrome/net/impl/CronetEngineBuilderImpl;)V
.registers 8
.annotation build Laegon/chrome/base/annotations/UsedByReflection;
value = "CronetEngine.java"
.end annotation
const/4 v2, 0x0
const/4 v1, -0x1
invoke-direct {p0}, Laegon/chrome/net/impl/CronetEngineBase;-><init>()V
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
new-instance v0, Landroid/os/ConditionVariable;
invoke-direct {v0, v2}, Landroid/os/ConditionVariable;-><init>(Z)V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInitCompleted:Landroid/os/ConditionVariable;
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
invoke-direct {v0, v2}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mActiveRequestCount:Ljava/util/concurrent/atomic/AtomicInteger;
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerLock:Ljava/lang/Object;
iput v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mEffectiveConnectionType:I
iput v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mHttpRttMs:I
iput v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mTransportRttMs:I
iput v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mDownstreamThroughputKbps:I
new-instance v0, Laegon/chrome/base/ObserverList;
invoke-direct {v0}, Laegon/chrome/base/ObserverList;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
new-instance v0, Laegon/chrome/base/ObserverList;
invoke-direct {v0}, Laegon/chrome/base/ObserverList;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
invoke-virtual {p1}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->networkQualityEstimatorEnabled()Z
move-result v0
iput-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
invoke-virtual {p1}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0, p1}, Laegon/chrome/net/impl/CronetLibraryLoader;->ensureInitialized(Landroid/content/Context;Laegon/chrome/net/impl/CronetEngineBuilderImpl;)V
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->getLoggingLevel()I
move-result v0
invoke-static {v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeSetMinLogLevel(I)I
invoke-virtual {p1}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->httpCacheMode()I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_a5
invoke-virtual {p1}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->storagePath()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInUseStoragePath:Ljava/lang/String;
sget-object v1, Laegon/chrome/net/impl/CronetUrlRequestContext;->sInUseStoragePaths:Ljava/util/HashSet;
monitor-enter v1
:try_start_69
sget-object v0, Laegon/chrome/net/impl/CronetUrlRequestContext;->sInUseStoragePaths:Ljava/util/HashSet;
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInUseStoragePath:Ljava/lang/String;
invoke-virtual {v0, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_7e
new-instance v0, Ljava/lang/IllegalStateException;
const-string v2, "Disk cache storage path already in use"
invoke-direct {v0, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_7b
move-exception v0
monitor-exit v1
:try_end_7d
.catchall {:try_start_69 .. :try_end_7d} :catchall_7b
throw v0
:cond_7e
:try_start_7e
monitor-exit v1
:try_end_7f
.catchall {:try_start_7e .. :try_end_7f} :catchall_7b
:goto_7f
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_82
invoke-static {p1}, Laegon/chrome/net/impl/CronetUrlRequestContext$$Lambda$1;->lambdaFactory$(Laegon/chrome/net/impl/CronetEngineBuilderImpl;)Laegon/chrome/net/impl/SafeNativeFunctionCaller$Supplier;
move-result-object v0
invoke-static {v0}, Laegon/chrome/net/impl/SafeNativeFunctionCaller;->EnsureResult(Laegon/chrome/net/impl/SafeNativeFunctionCaller$Supplier;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v2
iput-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const-wide/16 v4, 0x0
cmp-long v0, v2, v4
if-nez v0, :cond_a9
new-instance v0, Ljava/lang/NullPointerException;
const-string v2, "Context Adapter creation failed."
invoke-direct {v0, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_a2
move-exception v0
monitor-exit v1
:try_end_a4
.catchall {:try_start_82 .. :try_end_a4} :catchall_a2
throw v0
:cond_a5
const/4 v0, 0x0
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInUseStoragePath:Ljava/lang/String;
goto :goto_7f
:cond_a9
:try_start_a9
monitor-exit v1
:try_end_aa
.catchall {:try_start_a9 .. :try_end_aa} :catchall_a2
new-instance v0, Laegon/chrome/net/impl/CronetUrlRequestContext$1;
invoke-direct {v0, p0}, Laegon/chrome/net/impl/CronetUrlRequestContext$1;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;)V
invoke-static {v0}, Laegon/chrome/net/impl/CronetLibraryLoader;->postToInitThread(Ljava/lang/Runnable;)V
return-void
.end method
.method static synthetic access$000(Laegon/chrome/net/impl/CronetUrlRequestContext;)Ljava/lang/Object;
.registers 2
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
return-object v0
.end method
.method static synthetic access$100(Laegon/chrome/net/impl/CronetUrlRequestContext;)J
.registers 3
iget-wide v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
return-wide v0
.end method
.method static synthetic access$200(Laegon/chrome/net/impl/CronetUrlRequestContext;J)V
.registers 4
invoke-direct {p0, p1, p2}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeInitRequestContextOnInitThread(J)V
return-void
.end method
.method private checkHaveAdapter()V
.registers 3
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mLock"
.end annotation
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->haveRequestContextAdapter()Z
move-result v0
if-nez v0, :cond_e
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Engine is shut down."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_e
return-void
.end method
.method private static convertConnectionTypeToApiValue(I)I
.registers 4
packed-switch p0, :pswitch_data_28
new-instance v0, Ljava/lang/RuntimeException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Internal Error: Illegal EffectiveConnectionType value "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v0
:pswitch_1c
const/4 v0, 0x1
:goto_1d
return v0
:pswitch_1e
const/4 v0, 0x2
goto :goto_1d
:pswitch_20
const/4 v0, 0x3
goto :goto_1d
:pswitch_22
const/4 v0, 0x4
goto :goto_1d
:pswitch_24
const/4 v0, 0x5
goto :goto_1d
:pswitch_26
const/4 v0, 0x0
goto :goto_1d
:pswitch_data_28
.packed-switch 0x0
:pswitch_26
:pswitch_1c
:pswitch_1e
:pswitch_20
:pswitch_22
:pswitch_24
.end packed-switch
.end method
.method public static createNativeUrlRequestContextConfig(Laegon/chrome/net/impl/CronetEngineBuilderImpl;)J
.registers 19
.annotation build Laegon/chrome/base/VisibleForTesting;
.end annotation
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->getUserAgent()Ljava/lang/String;
move-result-object v2
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->storagePath()Ljava/lang/String;
move-result-object v3
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->quicEnabled()Z
move-result v4
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->getDefaultQuicUserAgentId()Ljava/lang/String;
move-result-object v5
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->http2Enabled()Z
move-result v6
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->brotliEnabled()Z
move-result v7
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->cacheDisabled()Z
move-result v8
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->httpCacheMode()I
move-result v9
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->httpCacheMaxSize()J
move-result-wide v10
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->experimentalOptions()Ljava/lang/String;
move-result-object v12
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->mockCertVerifier()J
move-result-wide v13
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->networkQualityEstimatorEnabled()Z
move-result v15
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->publicKeyPinningBypassForLocalTrustAnchorsEnabled()Z
move-result v16
const/16 v17, 0xa
move-object/from16 v0, p0
move/from16 v1, v17
invoke-virtual {v0, v1}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->threadPriority(I)I
move-result v17
invoke-static/range {v2 .. v17}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeCreateRequestContextConfig(Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZZZIJLjava/lang/String;JZZI)J
move-result-wide v2
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->quicHints()Ljava/util/List;
move-result-object v4
invoke-interface {v4}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v5
:goto_4a
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_60
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Laegon/chrome/net/impl/CronetEngineBuilderImpl$QuicHint;
iget-object v6, v4, Laegon/chrome/net/impl/CronetEngineBuilderImpl$QuicHint;->mHost:Ljava/lang/String;
iget v7, v4, Laegon/chrome/net/impl/CronetEngineBuilderImpl$QuicHint;->mPort:I
iget v4, v4, Laegon/chrome/net/impl/CronetEngineBuilderImpl$QuicHint;->mAlternatePort:I
invoke-static {v2, v3, v6, v7, v4}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeAddQuicHint(JLjava/lang/String;II)V
goto :goto_4a
:cond_60
invoke-virtual/range {p0 .. p0}, Laegon/chrome/net/impl/CronetEngineBuilderImpl;->publicKeyPins()Ljava/util/List;
move-result-object v4
invoke-interface {v4}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v9
:goto_68
invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_85
invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
move-object v7, v4
check-cast v7, Laegon/chrome/net/impl/CronetEngineBuilderImpl$Pkp;
iget-object v4, v7, Laegon/chrome/net/impl/CronetEngineBuilderImpl$Pkp;->mHost:Ljava/lang/String;
iget-object v5, v7, Laegon/chrome/net/impl/CronetEngineBuilderImpl$Pkp;->mHashes:[[B
iget-boolean v6, v7, Laegon/chrome/net/impl/CronetEngineBuilderImpl$Pkp;->mIncludeSubdomains:Z
iget-object v7, v7, Laegon/chrome/net/impl/CronetEngineBuilderImpl$Pkp;->mExpirationDate:Ljava/util/Date;
invoke-virtual {v7}, Ljava/util/Date;->getTime()J
move-result-wide v7
invoke-static/range {v2 .. v8}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeAddPkp(JLjava/lang/String;[[BZJ)V
goto :goto_68
:cond_85
return-wide v2
.end method
.method private getLoggingLevel()I
.registers 4
const/4 v0, 0x3
sget-object v1, Laegon/chrome/net/impl/CronetUrlRequestContext;->LOG_TAG:Ljava/lang/String;
const/4 v2, 0x2
invoke-static {v1, v2}, Laegon/chrome/base/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v1
if-eqz v1, :cond_c
const/4 v0, -0x2
:cond_b
:goto_b
return v0
:cond_c
sget-object v1, Laegon/chrome/net/impl/CronetUrlRequestContext;->LOG_TAG:Ljava/lang/String;
invoke-static {v1, v0}, Laegon/chrome/base/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v1
if-eqz v1, :cond_b
const/4 v0, -0x1
goto :goto_b
.end method
.method private haveRequestContextAdapter()Z
.registers 5
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "mLock"
.end annotation
iget-wide v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_a
const/4 v0, 0x1
:goto_9
return v0
:cond_a
const/4 v0, 0x0
goto :goto_9
.end method
.method private initNetworkThread()V
.registers 3
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkThread:Ljava/lang/Thread;
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInitCompleted:Landroid/os/ConditionVariable;
invoke-virtual {v0}, Landroid/os/ConditionVariable;->open()V
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
const-string v1, "ChromiumNet"
invoke-virtual {v0, v1}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
return-void
.end method
.method static synthetic lambda$new$0(Laegon/chrome/net/impl/CronetEngineBuilderImpl;)Ljava/lang/Long;
.registers 3
invoke-static {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->createNativeUrlRequestContextConfig(Laegon/chrome/net/impl/CronetEngineBuilderImpl;)J
move-result-wide v0
invoke-static {v0, v1}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeCreateRequestContextAdapter(J)J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
return-object v0
.end method
.method private static native nativeAddPkp(JLjava/lang/String;[[BZJ)V
.end method
.method private static native nativeAddQuicHint(JLjava/lang/String;II)V
.end method
.method private native nativeConfigureNetworkQualityEstimatorForTesting(JZZZ)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private static native nativeCreateRequestContextAdapter(J)J
.end method
.method private static native nativeCreateRequestContextConfig(Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZZZIJLjava/lang/String;JZZI)J
.end method
.method private native nativeDestroy(J)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private static native nativeGetHistogramDeltas()[B
.end method
.method private native nativeInitRequestContextOnInitThread(J)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private native nativeProvideRTTObservations(JZ)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private native nativeProvideThroughputObservations(JZ)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private static native nativeSetMinLogLevel(I)I
.end method
.method private native nativeStartNetLogToDisk(JLjava/lang/String;ZI)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private native nativeStartNetLogToFile(JLjava/lang/String;Z)Z
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private native nativeStopNetLog(J)V
.annotation runtime Laegon/chrome/base/annotations/NativeClassQualifiedName;
value = "CronetURLRequestContextAdapter"
.end annotation
.end method
.method private onEffectiveConnectionTypeChanged(I)V
.registers 4
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iput p1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mEffectiveConnectionType:I
monitor-exit v1
return-void
:catchall_7
move-exception v0
monitor-exit v1
:try_end_9
.catchall {:try_start_3 .. :try_end_9} :catchall_7
throw v0
.end method
.method private onRTTOrThroughputEstimatesComputed(III)V
.registers 6
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iput p1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mHttpRttMs:I
iput p2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mTransportRttMs:I
iput p3, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mDownstreamThroughputKbps:I
monitor-exit v1
return-void
:catchall_b
move-exception v0
monitor-exit v1
:try_end_d
.catchall {:try_start_3 .. :try_end_d} :catchall_b
throw v0
.end method
.method private onRttObservation(IJI)V
.registers 15
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
iget-object v7, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v7
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->iterator()Ljava/util/Iterator;
move-result-object v8
:goto_9
invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_29
invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;
new-instance v0, Laegon/chrome/net/impl/CronetUrlRequestContext$2;
move-object v1, p0
move v3, p1
move-wide v4, p2
move v6, p4
invoke-direct/range {v0 .. v6}, Laegon/chrome/net/impl/CronetUrlRequestContext$2;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;IJI)V
invoke-virtual {v2}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;->getExecutor()Ljava/util/concurrent/Executor;
move-result-object v1
invoke-static {v1, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->postObservationTaskToExecutor(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
goto :goto_9
:catchall_26
move-exception v0
monitor-exit v7
:try_end_28
.catchall {:try_start_3 .. :try_end_28} :catchall_26
throw v0
:cond_29
:try_start_29
monitor-exit v7
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_26
return-void
.end method
.method private onThroughputObservation(IJI)V
.registers 15
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
iget-object v7, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v7
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->iterator()Ljava/util/Iterator;
move-result-object v8
:goto_9
invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_29
invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;
new-instance v0, Laegon/chrome/net/impl/CronetUrlRequestContext$3;
move-object v1, p0
move v3, p1
move-wide v4, p2
move v6, p4
invoke-direct/range {v0 .. v6}, Laegon/chrome/net/impl/CronetUrlRequestContext$3;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;IJI)V
invoke-virtual {v2}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;->getExecutor()Ljava/util/concurrent/Executor;
move-result-object v1
invoke-static {v1, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->postObservationTaskToExecutor(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
goto :goto_9
:catchall_26
move-exception v0
monitor-exit v7
:try_end_28
.catchall {:try_start_3 .. :try_end_28} :catchall_26
throw v0
:cond_29
:try_start_29
monitor-exit v7
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_26
return-void
.end method
.method private static postObservationTaskToExecutor(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
.registers 7
:try_start_0
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_3
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_3} :catch_4
:goto_3
return-void
:catch_4
move-exception v0
sget-object v1, Laegon/chrome/net/impl/CronetUrlRequestContext;->LOG_TAG:Ljava/lang/String;
const-string v2, "Exception posting task to executor"
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
aput-object v0, v3, v4
invoke-static {v1, v2, v3}, Laegon/chrome/base/Log;->e(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_3
.end method
# virtual methods
.method public addRequestFinishedListener(Laegon/chrome/net/RequestFinishedInfo$Listener;)V
.registers 5
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
new-instance v2, Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;
invoke-direct {v2, p1}, Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;-><init>(Laegon/chrome/net/RequestFinishedInfo$Listener;)V
invoke-interface {v0, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
monitor-exit v1
return-void
:catchall_f
move-exception v0
monitor-exit v1
:try_end_11
.catchall {:try_start_3 .. :try_end_11} :catchall_f
throw v0
.end method
.method public addRttListener(Laegon/chrome/net/NetworkQualityRttListener;)V
.registers 8
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_f
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->isEmpty()Z
move-result v0
if-eqz v0, :cond_24
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v2
:try_end_1a
.catchall {:try_start_f .. :try_end_1a} :catchall_33
:try_start_1a
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v4, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const/4 v0, 0x1
invoke-direct {p0, v4, v5, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeProvideRTTObservations(JZ)V
monitor-exit v2
:try_end_24
.catchall {:try_start_1a .. :try_end_24} :catchall_30
:cond_24
:try_start_24
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
new-instance v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;
invoke-direct {v2, p1}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;-><init>(Laegon/chrome/net/NetworkQualityRttListener;)V
invoke-virtual {v0, v2}, Laegon/chrome/base/ObserverList;->addObserver(Ljava/lang/Object;)Z
monitor-exit v1
:try_end_2f
.catchall {:try_start_24 .. :try_end_2f} :catchall_33
return-void
:catchall_30
move-exception v0
:try_start_31
monitor-exit v2
:try_end_32
.catchall {:try_start_31 .. :try_end_32} :catchall_30
:try_start_32
throw v0
:catchall_33
move-exception v0
monitor-exit v1
:try_end_35
.catchall {:try_start_32 .. :try_end_35} :catchall_33
throw v0
.end method
.method public addThroughputListener(Laegon/chrome/net/NetworkQualityThroughputListener;)V
.registers 8
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_f
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->isEmpty()Z
move-result v0
if-eqz v0, :cond_24
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v2
:try_end_1a
.catchall {:try_start_f .. :try_end_1a} :catchall_33
:try_start_1a
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v4, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const/4 v0, 0x1
invoke-direct {p0, v4, v5, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeProvideThroughputObservations(JZ)V
monitor-exit v2
:try_end_24
.catchall {:try_start_1a .. :try_end_24} :catchall_30
:cond_24
:try_start_24
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
new-instance v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;
invoke-direct {v2, p1}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;-><init>(Laegon/chrome/net/NetworkQualityThroughputListener;)V
invoke-virtual {v0, v2}, Laegon/chrome/base/ObserverList;->addObserver(Ljava/lang/Object;)Z
monitor-exit v1
:try_end_2f
.catchall {:try_start_24 .. :try_end_2f} :catchall_33
return-void
:catchall_30
move-exception v0
:try_start_31
monitor-exit v2
:try_end_32
.catchall {:try_start_31 .. :try_end_32} :catchall_30
:try_start_32
throw v0
:catchall_33
move-exception v0
monitor-exit v1
:try_end_35
.catchall {:try_start_32 .. :try_end_35} :catchall_33
throw v0
.end method
.method public configureNetworkQualityEstimatorForTesting(ZZZ)V
.registers 12
.annotation build Laegon/chrome/base/VisibleForTesting;
.end annotation
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v7, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v7
:try_start_f
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
move-object v1, p0
move v4, p1
move v5, p2
move v6, p3
invoke-direct/range {v1 .. v6}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeConfigureNetworkQualityEstimatorForTesting(JZZZ)V
monitor-exit v7
return-void
:catchall_1d
move-exception v0
monitor-exit v7
:try_end_1f
.catchall {:try_start_f .. :try_end_1f} :catchall_1d
throw v0
.end method
.method protected createBidirectionalStream(Ljava/lang/String;Laegon/chrome/net/BidirectionalStream$Callback;Ljava/util/concurrent/Executor;Ljava/lang/String;Ljava/util/List;IZLjava/util/Collection;ZIZI)Laegon/chrome/net/ExperimentalBidirectionalStream;
.registers 28
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Laegon/chrome/net/BidirectionalStream$Callback;",
"Ljava/util/concurrent/Executor;",
"Ljava/lang/String;",
"Ljava/util/List",
"<",
"Ljava/util/Map$Entry",
"<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;>;IZ",
"Ljava/util/Collection",
"<",
"Ljava/lang/Object;",
">;ZIZI)",
"Laegon/chrome/net/ExperimentalBidirectionalStream;"
}
.end annotation
iget-object v14, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v14
:try_start_3
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
new-instance v0, Laegon/chrome/net/impl/CronetBidirectionalStream;
move-object v1, p0
move-object/from16 v2, p1
move/from16 v3, p6
move-object/from16 v4, p2
move-object/from16 v5, p3
move-object/from16 v6, p4
move-object/from16 v7, p5
move/from16 v8, p7
move-object/from16 v9, p8
move/from16 v10, p9
move/from16 v11, p10
move/from16 v12, p11
move/from16 v13, p12
invoke-direct/range {v0 .. v13}, Laegon/chrome/net/impl/CronetBidirectionalStream;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;Ljava/lang/String;ILaegon/chrome/net/BidirectionalStream$Callback;Ljava/util/concurrent/Executor;Ljava/lang/String;Ljava/util/List;ZLjava/util/Collection;ZIZI)V
monitor-exit v14
return-object v0
:catchall_26
move-exception v0
monitor-exit v14
:try_end_28
.catchall {:try_start_3 .. :try_end_28} :catchall_26
throw v0
.end method
.method public createRequest(Ljava/lang/String;Laegon/chrome/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;ILjava/util/Collection;ZZZZIZILaegon/chrome/net/RequestFinishedInfo$Listener;)Laegon/chrome/net/impl/UrlRequestBase;
.registers 31
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Laegon/chrome/net/UrlRequest$Callback;",
"Ljava/util/concurrent/Executor;",
"I",
"Ljava/util/Collection",
"<",
"Ljava/lang/Object;",
">;ZZZZIZI",
"Laegon/chrome/net/RequestFinishedInfo$Listener;",
")",
"Laegon/chrome/net/impl/UrlRequestBase;"
}
.end annotation
move-object/from16 v0, p0
iget-object v0, v0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
move-object/from16 v16, v0
monitor-enter v16
:try_start_7
invoke-direct/range {p0 .. p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
new-instance v1, Laegon/chrome/net/impl/CronetUrlRequest;
move-object/from16 v2, p0
move-object/from16 v3, p1
move/from16 v4, p4
move-object/from16 v5, p2
move-object/from16 v6, p3
move-object/from16 v7, p5
move/from16 v8, p6
move/from16 v9, p7
move/from16 v10, p8
move/from16 v11, p9
move/from16 v12, p10
move/from16 v13, p11
move/from16 v14, p12
move-object/from16 v15, p13
invoke-direct/range {v1 .. v15}, Laegon/chrome/net/impl/CronetUrlRequest;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;Ljava/lang/String;ILaegon/chrome/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;Ljava/util/Collection;ZZZZIZILaegon/chrome/net/RequestFinishedInfo$Listener;)V
monitor-exit v16
return-object v1
:catchall_2d
move-exception v1
monitor-exit v16
:try_end_2f
.catchall {:try_start_7 .. :try_end_2f} :catchall_2d
throw v1
.end method
.method public createURLStreamHandlerFactory()Ljava/net/URLStreamHandlerFactory;
.registers 2
new-instance v0, Laegon/chrome/net/urlconnection/CronetURLStreamHandlerFactory;
invoke-direct {v0, p0}, Laegon/chrome/net/urlconnection/CronetURLStreamHandlerFactory;-><init>(Laegon/chrome/net/ExperimentalCronetEngine;)V
return-object v0
.end method
.method public getDownstreamThroughputKbps()I
.registers 4
const/4 v0, -0x1
iget-boolean v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v1, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_10
iget v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mDownstreamThroughputKbps:I
if-eq v2, v0, :cond_16
iget v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mDownstreamThroughputKbps:I
:cond_16
monitor-exit v1
return v0
:catchall_18
move-exception v0
monitor-exit v1
:try_end_1a
.catchall {:try_start_10 .. :try_end_1a} :catchall_18
throw v0
.end method
.method public getEffectiveConnectionType()I
.registers 3
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_f
iget v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mEffectiveConnectionType:I
invoke-static {v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->convertConnectionTypeToApiValue(I)I
move-result v0
monitor-exit v1
return v0
:catchall_17
move-exception v0
monitor-exit v1
:try_end_19
.catchall {:try_start_f .. :try_end_19} :catchall_17
throw v0
.end method
.method public getGlobalMetricsDeltas()[B
.registers 2
invoke-static {}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeGetHistogramDeltas()[B
move-result-object v0
return-object v0
.end method
.method public getHttpRttMs()I
.registers 4
const/4 v0, -0x1
iget-boolean v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v1, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_10
iget v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mHttpRttMs:I
if-eq v2, v0, :cond_16
iget v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mHttpRttMs:I
:cond_16
monitor-exit v1
return v0
:catchall_18
move-exception v0
monitor-exit v1
:try_end_1a
.catchall {:try_start_10 .. :try_end_1a} :catchall_18
throw v0
.end method
.method public getTransportRttMs()I
.registers 4
const/4 v0, -0x1
iget-boolean v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v1, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_10
iget v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mTransportRttMs:I
if-eq v2, v0, :cond_16
iget v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mTransportRttMs:I
:cond_16
monitor-exit v1
return v0
:catchall_18
move-exception v0
monitor-exit v1
:try_end_1a
.catchall {:try_start_10 .. :try_end_1a} :catchall_18
throw v0
.end method
.method public getUrlRequestContextAdapter()J
.registers 5
.annotation build Laegon/chrome/base/VisibleForTesting;
.end annotation
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
monitor-exit v1
return-wide v2
:catchall_a
move-exception v0
monitor-exit v1
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_a
throw v0
.end method
.method public getVersionString()Ljava/lang/String;
.registers 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Cronet/"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Laegon/chrome/net/impl/ImplVersion;->getCronetVersionWithLastChange()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method hasRequestFinishedListener()Z
.registers 3
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
move-result v0
if-nez v0, :cond_e
const/4 v0, 0x1
:goto_c
monitor-exit v1
return v0
:cond_e
const/4 v0, 0x0
goto :goto_c
:catchall_10
move-exception v0
monitor-exit v1
:try_end_12
.catchall {:try_start_3 .. :try_end_12} :catchall_10
throw v0
.end method
.method public isNetworkThread(Ljava/lang/Thread;)Z
.registers 3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkThread:Ljava/lang/Thread;
if-ne p1, v0, :cond_6
const/4 v0, 0x1
:goto_5
return v0
:cond_6
const/4 v0, 0x0
goto :goto_5
.end method
.method public newBidirectionalStreamBuilder(Ljava/lang/String;Laegon/chrome/net/BidirectionalStream$Callback;Ljava/util/concurrent/Executor;)Laegon/chrome/net/ExperimentalBidirectionalStream$Builder;
.registers 5
new-instance v0, Laegon/chrome/net/impl/BidirectionalStreamBuilderImpl;
invoke-direct {v0, p1, p2, p3, p0}, Laegon/chrome/net/impl/BidirectionalStreamBuilderImpl;-><init>(Ljava/lang/String;Laegon/chrome/net/BidirectionalStream$Callback;Ljava/util/concurrent/Executor;Laegon/chrome/net/impl/CronetEngineBase;)V
return-object v0
.end method
.method onRequestDestroyed()V
.registers 2
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mActiveRequestCount:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
return-void
.end method
.method onRequestStarted()V
.registers 2
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mActiveRequestCount:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I
return-void
.end method
.method public openConnection(Ljava/net/URL;)Ljava/net/URLConnection;
.registers 3
sget-object v0, Ljava/net/Proxy;->NO_PROXY:Ljava/net/Proxy;
invoke-virtual {p0, p1, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->openConnection(Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/URLConnection;
move-result-object v0
return-object v0
.end method
.method public openConnection(Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/URLConnection;
.registers 7
invoke-virtual {p2}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object v0
sget-object v1, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
if-eq v0, v1, :cond_e
new-instance v0, Ljava/lang/UnsupportedOperationException;
invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw v0
:cond_e
invoke-virtual {p1}, Ljava/net/URL;->getProtocol()Ljava/lang/String;
move-result-object v0
const-string v1, "http"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_22
const-string v1, "https"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_28
:cond_22
new-instance v0, Laegon/chrome/net/urlconnection/CronetHttpURLConnection;
invoke-direct {v0, p1, p0}, Laegon/chrome/net/urlconnection/CronetHttpURLConnection;-><init>(Ljava/net/URL;Laegon/chrome/net/CronetEngine;)V
return-object v0
:cond_28
new-instance v1, Ljava/lang/UnsupportedOperationException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Unexpected protocol:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public removeRequestFinishedListener(Laegon/chrome/net/RequestFinishedInfo$Listener;)V
.registers 4
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
monitor-exit v1
return-void
:catchall_a
move-exception v0
monitor-exit v1
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_a
throw v0
.end method
.method public removeRttListener(Laegon/chrome/net/NetworkQualityRttListener;)V
.registers 8
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_f
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
new-instance v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;
invoke-direct {v2, p1}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityRttListenerWrapper;-><init>(Laegon/chrome/net/NetworkQualityRttListener;)V
invoke-virtual {v0, v2}, Laegon/chrome/base/ObserverList;->removeObserver(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_31
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mRttListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->isEmpty()Z
move-result v0
if-eqz v0, :cond_31
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v2
:try_end_27
.catchall {:try_start_f .. :try_end_27} :catchall_36
:try_start_27
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v4, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const/4 v0, 0x0
invoke-direct {p0, v4, v5, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeProvideRTTObservations(JZ)V
monitor-exit v2
:try_end_31
.catchall {:try_start_27 .. :try_end_31} :catchall_33
:cond_31
:try_start_31
monitor-exit v1
:try_end_32
.catchall {:try_start_31 .. :try_end_32} :catchall_36
return-void
:catchall_33
move-exception v0
:try_start_34
monitor-exit v2
:try_end_35
.catchall {:try_start_34 .. :try_end_35} :catchall_33
:try_start_35
throw v0
:catchall_36
move-exception v0
monitor-exit v1
:try_end_38
.catchall {:try_start_35 .. :try_end_38} :catchall_36
throw v0
.end method
.method public removeThroughputListener(Laegon/chrome/net/NetworkQualityThroughputListener;)V
.registers 8
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityEstimatorEnabled:Z
if-nez v0, :cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Network quality estimator must be enabled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkQualityLock:Ljava/lang/Object;
monitor-enter v1
:try_start_f
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
new-instance v2, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;
invoke-direct {v2, p1}, Laegon/chrome/net/impl/VersionSafeCallbacks$NetworkQualityThroughputListenerWrapper;-><init>(Laegon/chrome/net/NetworkQualityThroughputListener;)V
invoke-virtual {v0, v2}, Laegon/chrome/base/ObserverList;->removeObserver(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_31
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mThroughputListenerList:Laegon/chrome/base/ObserverList;
invoke-virtual {v0}, Laegon/chrome/base/ObserverList;->isEmpty()Z
move-result v0
if-eqz v0, :cond_31
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v2
:try_end_27
.catchall {:try_start_f .. :try_end_27} :catchall_36
:try_start_27
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v4, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
const/4 v0, 0x0
invoke-direct {p0, v4, v5, v0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeProvideThroughputObservations(JZ)V
monitor-exit v2
:try_end_31
.catchall {:try_start_27 .. :try_end_31} :catchall_33
:cond_31
:try_start_31
monitor-exit v1
:try_end_32
.catchall {:try_start_31 .. :try_end_32} :catchall_36
return-void
:catchall_33
move-exception v0
:try_start_34
monitor-exit v2
:try_end_35
.catchall {:try_start_34 .. :try_end_35} :catchall_33
:try_start_35
throw v0
:catchall_36
move-exception v0
monitor-exit v1
:try_end_38
.catchall {:try_start_35 .. :try_end_38} :catchall_36
throw v0
.end method
.method reportRequestFinished(Laegon/chrome/net/RequestFinishedInfo;)V
.registers 5
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
move-result v0
if-eqz v0, :cond_d
monitor-exit v1
:cond_c
return-void
:cond_d
new-instance v0, Ljava/util/ArrayList;
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mFinishedListenerMap:Ljava/util/Map;
invoke-interface {v2}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v2
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
monitor-exit v1
:try_end_19
.catchall {:try_start_3 .. :try_end_19} :catchall_36
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_1d
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_c
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;
new-instance v2, Laegon/chrome/net/impl/CronetUrlRequestContext$4;
invoke-direct {v2, p0, v0, p1}, Laegon/chrome/net/impl/CronetUrlRequestContext$4;-><init>(Laegon/chrome/net/impl/CronetUrlRequestContext;Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;Laegon/chrome/net/RequestFinishedInfo;)V
invoke-virtual {v0}, Laegon/chrome/net/impl/VersionSafeCallbacks$RequestFinishedInfoListener;->getExecutor()Ljava/util/concurrent/Executor;
move-result-object v0
invoke-static {v0, v2}, Laegon/chrome/net/impl/CronetUrlRequestContext;->postObservationTaskToExecutor(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
goto :goto_1d
:catchall_36
move-exception v0
:try_start_37
monitor-exit v1
:try_end_38
.catchall {:try_start_37 .. :try_end_38} :catchall_36
throw v0
.end method
.method public shutdown()V
.registers 5
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInUseStoragePath:Ljava/lang/String;
if-eqz v0, :cond_f
sget-object v1, Laegon/chrome/net/impl/CronetUrlRequestContext;->sInUseStoragePaths:Ljava/util/HashSet;
monitor-enter v1
:try_start_7
sget-object v0, Laegon/chrome/net/impl/CronetUrlRequestContext;->sInUseStoragePaths:Ljava/util/HashSet;
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInUseStoragePath:Ljava/lang/String;
invoke-virtual {v0, v2}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
monitor-exit v1
:try_end_f
.catchall {:try_start_7 .. :try_end_f} :catchall_28
:cond_f
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_12
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mActiveRequestCount:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
if-eqz v0, :cond_2b
new-instance v0, Ljava/lang/IllegalStateException;
const-string v2, "Cannot shutdown with active requests."
invoke-direct {v0, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_25
move-exception v0
monitor-exit v1
:try_end_27
.catchall {:try_start_12 .. :try_end_27} :catchall_25
throw v0
:catchall_28
move-exception v0
:try_start_29
monitor-exit v1
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_28
throw v0
:cond_2b
:try_start_2b
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iget-object v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mNetworkThread:Ljava/lang/Thread;
if-ne v0, v2, :cond_3b
new-instance v0, Ljava/lang/IllegalThreadStateException;
const-string v2, "Cannot shutdown from network thread."
invoke-direct {v0, v2}, Ljava/lang/IllegalThreadStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_3b
monitor-exit v1
:try_end_3c
.catchall {:try_start_2b .. :try_end_3c} :catchall_25
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mInitCompleted:Landroid/os/ConditionVariable;
invoke-virtual {v0}, Landroid/os/ConditionVariable;->block()V
invoke-virtual {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->stopNetLog()V
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_47
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->haveRequestContextAdapter()Z
move-result v0
if-nez v0, :cond_4f
monitor-exit v1
:goto_4e
return-void
:cond_4f
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
invoke-direct {p0, v2, v3}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeDestroy(J)V
const-wide/16 v2, 0x0
iput-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
monitor-exit v1
goto :goto_4e
:catchall_5a
move-exception v0
monitor-exit v1
:try_end_5c
.catchall {:try_start_47 .. :try_end_5c} :catchall_5a
throw v0
.end method
.method public startNetLogToDisk(Ljava/lang/String;ZI)V
.registers 12
iget-object v7, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v7
:try_start_3
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
move-object v1, p0
move-object v4, p1
move v5, p2
move v6, p3
invoke-direct/range {v1 .. v6}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeStartNetLogToDisk(JLjava/lang/String;ZI)V
const/4 v0, 0x1
iput-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mIsLogging:Z
monitor-exit v7
return-void
:catchall_14
move-exception v0
monitor-exit v7
:try_end_16
.catchall {:try_start_3 .. :try_end_16} :catchall_14
throw v0
.end method
.method public startNetLogToFile(Ljava/lang/String;Z)V
.registers 7
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
invoke-direct {p0, v2, v3, p1, p2}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeStartNetLogToFile(JLjava/lang/String;Z)Z
move-result v0
if-nez v0, :cond_19
new-instance v0, Ljava/lang/RuntimeException;
const-string v2, "Unable to start NetLog"
invoke-direct {v0, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_16
move-exception v0
monitor-exit v1
:try_end_18
.catchall {:try_start_3 .. :try_end_18} :catchall_16
throw v0
:cond_19
const/4 v0, 0x1
:try_start_1a
iput-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mIsLogging:Z
monitor-exit v1
:try_end_1d
.catchall {:try_start_1a .. :try_end_1d} :catchall_16
return-void
.end method
.method public stopNetLog()V
.registers 5
iget-object v1, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mLock:Ljava/lang/Object;
monitor-enter v1
:try_start_3
iget-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mIsLogging:Z
if-nez v0, :cond_9
monitor-exit v1
:goto_8
return-void
:cond_9
invoke-direct {p0}, Laegon/chrome/net/impl/CronetUrlRequestContext;->checkHaveAdapter()V
new-instance v0, Landroid/os/ConditionVariable;
invoke-direct {v0}, Landroid/os/ConditionVariable;-><init>()V
iput-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mStopNetLogCompleted:Landroid/os/ConditionVariable;
iget-wide v2, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mUrlRequestContextAdapter:J
invoke-direct {p0, v2, v3}, Laegon/chrome/net/impl/CronetUrlRequestContext;->nativeStopNetLog(J)V
const/4 v0, 0x0
iput-boolean v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mIsLogging:Z
monitor-exit v1
:try_end_1c
.catchall {:try_start_3 .. :try_end_1c} :catchall_22
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mStopNetLogCompleted:Landroid/os/ConditionVariable;
invoke-virtual {v0}, Landroid/os/ConditionVariable;->block()V
goto :goto_8
:catchall_22
move-exception v0
:try_start_23
monitor-exit v1
:try_end_24
.catchall {:try_start_23 .. :try_end_24} :catchall_22
throw v0
.end method
.method public stopNetLogCompleted()V
.registers 2
.annotation build Laegon/chrome/base/annotations/CalledByNative;
.end annotation
iget-object v0, p0, Laegon/chrome/net/impl/CronetUrlRequestContext;->mStopNetLogCompleted:Landroid/os/ConditionVariable;
invoke-virtual {v0}, Landroid/os/ConditionVariable;->open()V
return-void
.end method