first commit
This commit is contained in:
commit
0b134cf11f
1087 changed files with 16728 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
.class public interface abstract Lcom/mojang/android/StringValue;
|
||||
.super Ljava/lang/Object;
|
||||
.source "StringValue.java"
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public abstract getStringValue()Ljava/lang/String;
|
||||
.end method
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
.class public Lcom/mojang/android/TextViewReader;
|
||||
.super Ljava/lang/Object;
|
||||
.source "TextViewReader.java"
|
||||
|
||||
# interfaces
|
||||
.implements Lcom/mojang/android/StringValue;
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private _view:Landroid/widget/TextView;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(Landroid/widget/TextView;)V
|
||||
.locals 0
|
||||
.param p1, "view" # Landroid/widget/TextView;
|
||||
|
||||
.prologue
|
||||
.line 6
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
.line 7
|
||||
iput-object p1, p0, Lcom/mojang/android/TextViewReader;->_view:Landroid/widget/TextView;
|
||||
|
||||
.line 8
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public getStringValue()Ljava/lang/String;
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 10
|
||||
iget-object v0, p0, Lcom/mojang/android/TextViewReader;->_view:Landroid/widget/TextView;
|
||||
|
||||
invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
.class Lcom/mojang/android/net/NoCertSSLSocketFactory$1;
|
||||
.super Ljava/lang/Object;
|
||||
.source "NoCertSSLSocketFactory.java"
|
||||
|
||||
# interfaces
|
||||
.implements Ljavax/net/ssl/X509TrustManager;
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingMethod;
|
||||
value = Lcom/mojang/android/net/NoCertSSLSocketFactory;-><init>(Ljava/security/KeyStore;)V
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x0
|
||||
name = null
|
||||
.end annotation
|
||||
|
||||
|
||||
# instance fields
|
||||
.field final synthetic this$0:Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method constructor <init>(Lcom/mojang/android/net/NoCertSSLSocketFactory;)V
|
||||
.locals 0
|
||||
|
||||
.prologue
|
||||
.line 25
|
||||
iput-object p1, p0, Lcom/mojang/android/net/NoCertSSLSocketFactory$1;->this$0:Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public checkClientTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;)V
|
||||
.locals 0
|
||||
.param p1, "chain" # [Ljava/security/cert/X509Certificate;
|
||||
.param p2, "authType" # Ljava/lang/String;
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/security/cert/CertificateException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
.line 26
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;)V
|
||||
.locals 0
|
||||
.param p1, "chain" # [Ljava/security/cert/X509Certificate;
|
||||
.param p2, "authType" # Ljava/lang/String;
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/security/cert/CertificateException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
.line 27
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public getAcceptedIssuers()[Ljava/security/cert/X509Certificate;
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 28
|
||||
const/4 v0, 0x0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
.class public Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
.super Lorg/apache/http/conn/ssl/SSLSocketFactory;
|
||||
.source "NoCertSSLSocketFactory.java"
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private sslContext:Ljavax/net/ssl/SSLContext;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(Ljava/security/KeyStore;)V
|
||||
.locals 5
|
||||
.param p1, "keyStore" # Ljava/security/KeyStore;
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/security/NoSuchAlgorithmException;,
|
||||
Ljava/security/KeyManagementException;,
|
||||
Ljava/security/KeyStoreException;,
|
||||
Ljava/security/UnrecoverableKeyException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
const/4 v4, 0x0
|
||||
|
||||
.line 24
|
||||
invoke-direct {p0, p1}, Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>(Ljava/security/KeyStore;)V
|
||||
|
||||
.line 21
|
||||
const-string v1, "TLS"
|
||||
|
||||
invoke-static {v1}, Ljavax/net/ssl/SSLContext;->getInstance(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
iput-object v1, p0, Lcom/mojang/android/net/NoCertSSLSocketFactory;->sslContext:Ljavax/net/ssl/SSLContext;
|
||||
|
||||
.line 25
|
||||
new-instance v0, Lcom/mojang/android/net/NoCertSSLSocketFactory$1;
|
||||
|
||||
invoke-direct {v0, p0}, Lcom/mojang/android/net/NoCertSSLSocketFactory$1;-><init>(Lcom/mojang/android/net/NoCertSSLSocketFactory;)V
|
||||
|
||||
.line 30
|
||||
.local v0, "tm":Ljavax/net/ssl/TrustManager;
|
||||
iget-object v1, p0, Lcom/mojang/android/net/NoCertSSLSocketFactory;->sslContext:Ljavax/net/ssl/SSLContext;
|
||||
|
||||
const/4 v2, 0x1
|
||||
|
||||
new-array v2, v2, [Ljavax/net/ssl/TrustManager;
|
||||
|
||||
const/4 v3, 0x0
|
||||
|
||||
aput-object v0, v2, v3
|
||||
|
||||
invoke-virtual {v1, v4, v2, v4}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
|
||||
|
||||
.line 31
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static createDefault()Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
.locals 4
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/security/KeyStoreException;,
|
||||
Ljava/security/NoSuchAlgorithmException;,
|
||||
Ljava/security/cert/CertificateException;,
|
||||
Ljava/io/IOException;,
|
||||
Ljava/security/KeyManagementException;,
|
||||
Ljava/security/UnrecoverableKeyException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
const/4 v3, 0x0
|
||||
|
||||
.line 44
|
||||
invoke-static {}, Ljava/security/KeyStore;->getDefaultType()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Ljava/security/KeyStore;->getInstance(Ljava/lang/String;)Ljava/security/KeyStore;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
.line 45
|
||||
.local v1, "keyStore":Ljava/security/KeyStore;
|
||||
invoke-virtual {v1, v3, v3}, Ljava/security/KeyStore;->load(Ljava/io/InputStream;[C)V
|
||||
|
||||
.line 46
|
||||
new-instance v0, Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
|
||||
invoke-direct {v0, v1}, Lcom/mojang/android/net/NoCertSSLSocketFactory;-><init>(Ljava/security/KeyStore;)V
|
||||
|
||||
.line 47
|
||||
.local v0, "factory":Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
sget-object v2, Lorg/apache/http/conn/ssl/SSLSocketFactory;->ALLOW_ALL_HOSTNAME_VERIFIER:Lorg/apache/http/conn/ssl/X509HostnameVerifier;
|
||||
|
||||
invoke-virtual {v0, v2}, Lcom/mojang/android/net/NoCertSSLSocketFactory;->setHostnameVerifier(Lorg/apache/http/conn/ssl/X509HostnameVerifier;)V
|
||||
|
||||
.line 48
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public createSocket()Ljava/net/Socket;
|
||||
.locals 1
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/io/IOException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
.line 40
|
||||
iget-object v0, p0, Lcom/mojang/android/net/NoCertSSLSocketFactory;->sslContext:Ljavax/net/ssl/SSLContext;
|
||||
|
||||
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Ljavax/net/ssl/SSLSocketFactory;->createSocket()Ljava/net/Socket;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
||||
.locals 1
|
||||
.param p1, "socket" # Ljava/net/Socket;
|
||||
.param p2, "host" # Ljava/lang/String;
|
||||
.param p3, "port" # I
|
||||
.param p4, "autoClose" # Z
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/io/IOException;,
|
||||
Ljava/net/UnknownHostException;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
.line 35
|
||||
iget-object v0, p0, Lcom/mojang/android/net/NoCertSSLSocketFactory;->sslContext:Ljavax/net/ssl/SSLContext;
|
||||
|
||||
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0, p1, p2, p3, p4}, Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
.class Lcom/mojang/android/net/WebRequestManager$1;
|
||||
.super Ljava/lang/Object;
|
||||
.source "WebRequestManager.java"
|
||||
|
||||
# interfaces
|
||||
.implements Ljava/lang/Runnable;
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingMethod;
|
||||
value = Lcom/mojang/android/net/WebRequestManager;->webRequest(IJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x0
|
||||
name = null
|
||||
.end annotation
|
||||
|
||||
|
||||
# instance fields
|
||||
.field final synthetic this$0:Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
.field final synthetic val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method constructor <init>(Lcom/mojang/android/net/WebRequestManager;Lcom/mojang/android/net/WebRequestManager$WebRequestData;)V
|
||||
.locals 0
|
||||
|
||||
.prologue
|
||||
.line 137
|
||||
iput-object p1, p0, Lcom/mojang/android/net/WebRequestManager$1;->this$0:Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
iput-object p2, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public run()V
|
||||
.locals 8
|
||||
|
||||
.prologue
|
||||
.line 142
|
||||
:cond_0
|
||||
:try_start_0
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-object v1, p0, Lcom/mojang/android/net/WebRequestManager$1;->this$0:Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
invoke-static {v1}, Lcom/mojang/android/net/WebRequestManager;->access$000(Lcom/mojang/android/net/WebRequestManager;)Lorg/apache/http/client/HttpClient;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->execute(Lorg/apache/http/client/HttpClient;)V
|
||||
|
||||
.line 143
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
invoke-virtual {v0}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->getStatusCode()I
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
move-result v0
|
||||
|
||||
const/16 v1, 0x1f7
|
||||
|
||||
if-eq v0, v1, :cond_2
|
||||
|
||||
.line 157
|
||||
:goto_0
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->this$0:Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
invoke-static {v0}, Lcom/mojang/android/net/WebRequestManager;->access$100(Lcom/mojang/android/net/WebRequestManager;)Ljava/lang/Object;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
monitor-enter v7
|
||||
|
||||
.line 158
|
||||
:try_start_1
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-boolean v0, v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
|
||||
if-nez v0, :cond_1
|
||||
|
||||
.line 161
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->this$0:Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
invoke-static {v0}, Lcom/mojang/android/net/WebRequestManager;->access$200(Lcom/mojang/android/net/WebRequestManager;)Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
iget-object v1, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget v1, v1, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
iget-object v2, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-wide v2, v2, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->voidptr:J
|
||||
|
||||
iget-object v4, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
invoke-virtual {v4}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->getStatusCode()I
|
||||
|
||||
move-result v4
|
||||
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-object v5, v5, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
|
||||
invoke-interface/range {v0 .. v5}, Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;->onRequestComplete(IJILjava/lang/String;)V
|
||||
|
||||
.line 165
|
||||
:cond_1
|
||||
monitor-exit v7
|
||||
:try_end_1
|
||||
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||||
|
||||
.line 166
|
||||
return-void
|
||||
|
||||
.line 146
|
||||
:cond_2
|
||||
:try_start_2
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-object v1, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget v1, v1, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->retryTimeout:I
|
||||
|
||||
invoke-virtual {v0, v1}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->waitForSeconds(I)V
|
||||
|
||||
.line 147
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
iget-boolean v0, v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
:try_end_2
|
||||
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 151
|
||||
:catch_0
|
||||
move-exception v6
|
||||
|
||||
.line 152
|
||||
.local v6, "e":Ljava/lang/Exception;
|
||||
invoke-virtual {v6}, Ljava/lang/Exception;->printStackTrace()V
|
||||
|
||||
.line 153
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$1;->val$request:Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_TIMEOUT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {v0, v1}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 165
|
||||
.end local v6 # "e":Ljava/lang/Exception;
|
||||
:catchall_0
|
||||
move-exception v0
|
||||
|
||||
:try_start_3
|
||||
monitor-exit v7
|
||||
:try_end_3
|
||||
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
||||
|
||||
throw v0
|
||||
.end method
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
.class public interface abstract Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
.super Ljava/lang/Object;
|
||||
.source "WebRequestManager.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lcom/mojang/android/net/WebRequestManager;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x609
|
||||
name = "IRequestCompleteCallback"
|
||||
.end annotation
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public abstract onRequestComplete(IJILjava/lang/String;)V
|
||||
.end method
|
||||
|
|
@ -0,0 +1,273 @@
|
|||
.class public final enum Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
.super Ljava/lang/Enum;
|
||||
.source "WebRequestManager.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lcom/mojang/android/net/WebRequestManager;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x4019
|
||||
name = "Status"
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/Signature;
|
||||
value = {
|
||||
"Ljava/lang/Enum",
|
||||
"<",
|
||||
"Lcom/mojang/android/net/WebRequestManager$Status;",
|
||||
">;"
|
||||
}
|
||||
.end annotation
|
||||
|
||||
|
||||
# static fields
|
||||
.field private static final synthetic $VALUES:[Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FAIL_CANCELLED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FAIL_PARSE:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FAIL_TIMEOUT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FAIL_URLFORMAT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public static final enum REQUEST_NOT_FOUND:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
.locals 8
|
||||
|
||||
.prologue
|
||||
const/4 v7, 0x4
|
||||
|
||||
const/4 v6, 0x3
|
||||
|
||||
const/4 v5, 0x2
|
||||
|
||||
const/4 v4, 0x1
|
||||
|
||||
const/4 v3, 0x0
|
||||
|
||||
.line 208
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "REQUEST_NOT_FOUND"
|
||||
|
||||
invoke-direct {v0, v1, v3}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->REQUEST_NOT_FOUND:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 209
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "PENDING"
|
||||
|
||||
invoke-direct {v0, v1, v4}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 210
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FINISHED"
|
||||
|
||||
invoke-direct {v0, v1, v5}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 211
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FAIL_URLFORMAT"
|
||||
|
||||
invoke-direct {v0, v1, v6}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_URLFORMAT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 212
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FAIL_PARSE"
|
||||
|
||||
invoke-direct {v0, v1, v7}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_PARSE:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 213
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FAIL_TIMEOUT"
|
||||
|
||||
const/4 v2, 0x5
|
||||
|
||||
invoke-direct {v0, v1, v2}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_TIMEOUT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 214
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FAIL_GENERAL"
|
||||
|
||||
const/4 v2, 0x6
|
||||
|
||||
invoke-direct {v0, v1, v2}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 215
|
||||
new-instance v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
const-string v1, "FAIL_CANCELLED"
|
||||
|
||||
const/4 v2, 0x7
|
||||
|
||||
invoke-direct {v0, v1, v2}, Lcom/mojang/android/net/WebRequestManager$Status;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_CANCELLED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 207
|
||||
const/16 v0, 0x8
|
||||
|
||||
new-array v0, v0, [Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->REQUEST_NOT_FOUND:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v1, v0, v3
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v1, v0, v4
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v1, v0, v5
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_URLFORMAT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v1, v0, v6
|
||||
|
||||
sget-object v1, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_PARSE:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v1, v0, v7
|
||||
|
||||
const/4 v1, 0x5
|
||||
|
||||
sget-object v2, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_TIMEOUT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v2, v0, v1
|
||||
|
||||
const/4 v1, 0x6
|
||||
|
||||
sget-object v2, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v2, v0, v1
|
||||
|
||||
const/4 v1, 0x7
|
||||
|
||||
sget-object v2, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_CANCELLED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
aput-object v2, v0, v1
|
||||
|
||||
sput-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->$VALUES:[Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private constructor <init>(Ljava/lang/String;I)V
|
||||
.locals 0
|
||||
.annotation system Ldalvik/annotation/Signature;
|
||||
value = {
|
||||
"()V"
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.prologue
|
||||
.line 207
|
||||
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static valueOf(Ljava/lang/String;)Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
.locals 1
|
||||
.param p0, "name" # Ljava/lang/String;
|
||||
|
||||
.prologue
|
||||
.line 207
|
||||
const-class v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public static values()[Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 207
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->$VALUES:[Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {v0}, [Lcom/mojang/android/net/WebRequestManager$Status;->clone()Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, [Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public getCode()I
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 217
|
||||
invoke-virtual {p0}, Lcom/mojang/android/net/WebRequestManager$Status;->ordinal()I
|
||||
|
||||
move-result v0
|
||||
|
||||
neg-int v0, v0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public isError()Z
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 216
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
if-eq p0, v0, :cond_0
|
||||
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
if-eq p0, v0, :cond_0
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
:goto_0
|
||||
return v0
|
||||
|
||||
:cond_0
|
||||
const/4 v0, 0x0
|
||||
|
||||
goto :goto_0
|
||||
.end method
|
||||
|
|
@ -0,0 +1,524 @@
|
|||
.class Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
.super Ljava/lang/Object;
|
||||
.source "WebRequestManager.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lcom/mojang/android/net/WebRequestManager;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0xa
|
||||
name = "WebRequestData"
|
||||
.end annotation
|
||||
|
||||
|
||||
# static fields
|
||||
.field static final synthetic $assertionsDisabled:Z
|
||||
|
||||
|
||||
# instance fields
|
||||
.field public volatile aborted:Z
|
||||
|
||||
.field public content:Ljava/lang/String;
|
||||
|
||||
.field private request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
.field public final requestId:I
|
||||
|
||||
.field private response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
.field public retryTimeout:I
|
||||
|
||||
.field public status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.field public voidptr:J
|
||||
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 224
|
||||
const-class v0, Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
:goto_0
|
||||
sput-boolean v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->$assertionsDisabled:Z
|
||||
|
||||
return-void
|
||||
|
||||
:cond_0
|
||||
const/4 v0, 0x0
|
||||
|
||||
goto :goto_0
|
||||
.end method
|
||||
|
||||
.method public constructor <init>(I)V
|
||||
.locals 1
|
||||
.param p1, "requestId" # I
|
||||
|
||||
.prologue
|
||||
.line 225
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
.line 311
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 314
|
||||
const-string v0, ""
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
|
||||
.line 316
|
||||
const/4 v0, 0x0
|
||||
|
||||
iput-boolean v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
|
||||
.line 317
|
||||
const/4 v0, 0x5
|
||||
|
||||
iput v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->retryTimeout:I
|
||||
|
||||
.line 226
|
||||
iput p1, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
.line 227
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public constructor <init>(ILorg/apache/http/client/methods/HttpRequestBase;J)V
|
||||
.locals 1
|
||||
.param p1, "requestId" # I
|
||||
.param p2, "request" # Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
.param p3, "voidptr" # J
|
||||
|
||||
.prologue
|
||||
.line 228
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
.line 311
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 314
|
||||
const-string v0, ""
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
|
||||
.line 316
|
||||
const/4 v0, 0x0
|
||||
|
||||
iput-boolean v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
|
||||
.line 317
|
||||
const/4 v0, 0x5
|
||||
|
||||
iput v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->retryTimeout:I
|
||||
|
||||
.line 229
|
||||
iput p1, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
.line 230
|
||||
iput-object p2, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
.line 231
|
||||
iput-wide p3, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->voidptr:J
|
||||
|
||||
.line 232
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public abort()V
|
||||
.locals 1
|
||||
|
||||
.prologue
|
||||
.line 253
|
||||
const/4 v0, 0x1
|
||||
|
||||
iput-boolean v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
|
||||
.line 254
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
invoke-virtual {v0}, Lorg/apache/http/client/methods/HttpRequestBase;->isAborted()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
.line 255
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
invoke-virtual {v0}, Lorg/apache/http/client/methods/HttpRequestBase;->abort()V
|
||||
|
||||
.line 257
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public execute(Lorg/apache/http/client/HttpClient;)V
|
||||
.locals 7
|
||||
.param p1, "httpClient" # Lorg/apache/http/client/HttpClient;
|
||||
|
||||
.prologue
|
||||
.line 259
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->PENDING:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iget-object v6, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
if-eq v5, v6, :cond_1
|
||||
|
||||
.line 302
|
||||
:cond_0
|
||||
:goto_0
|
||||
return-void
|
||||
|
||||
.line 263
|
||||
:cond_1
|
||||
:try_start_0
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->request:Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
|
||||
invoke-interface {p1, v5}, Lorg/apache/http/client/HttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
:try_end_0
|
||||
.catch Lorg/apache/http/client/ClientProtocolException; {:try_start_0 .. :try_end_0} :catch_1
|
||||
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_3
|
||||
|
||||
.line 275
|
||||
:goto_1
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
if-eqz v5, :cond_0
|
||||
|
||||
.line 279
|
||||
:try_start_1
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
invoke-interface {v5}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
invoke-interface {v5}, Lorg/apache/http/StatusLine;->getStatusCode()I
|
||||
|
||||
move-result v4
|
||||
|
||||
.line 280
|
||||
.local v4, "responseCode":I
|
||||
const/16 v5, 0xcc
|
||||
|
||||
if-ne v4, v5, :cond_3
|
||||
|
||||
.line 281
|
||||
const-string v5, ""
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
|
||||
.line 294
|
||||
:cond_2
|
||||
:goto_2
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
:try_end_1
|
||||
.catch Lorg/apache/http/ParseException; {:try_start_1 .. :try_end_1} :catch_0
|
||||
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_5
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 295
|
||||
.end local v4 # "responseCode":I
|
||||
:catch_0
|
||||
move-exception v0
|
||||
|
||||
.line 296
|
||||
.local v0, "e":Lorg/apache/http/ParseException;
|
||||
invoke-virtual {v0}, Lorg/apache/http/ParseException;->printStackTrace()V
|
||||
|
||||
.line 297
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_PARSE:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 264
|
||||
.end local v0 # "e":Lorg/apache/http/ParseException;
|
||||
:catch_1
|
||||
move-exception v1
|
||||
|
||||
.line 265
|
||||
.local v1, "e1":Lorg/apache/http/client/ClientProtocolException;
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_URLFORMAT:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {p0, v5}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
.line 266
|
||||
invoke-virtual {v1}, Lorg/apache/http/client/ClientProtocolException;->printStackTrace()V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
.line 267
|
||||
.end local v1 # "e1":Lorg/apache/http/client/ClientProtocolException;
|
||||
:catch_2
|
||||
move-exception v1
|
||||
|
||||
.line 268
|
||||
.local v1, "e1":Ljava/io/IOException;
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {p0, v5}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
.line 269
|
||||
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
.line 270
|
||||
.end local v1 # "e1":Ljava/io/IOException;
|
||||
:catch_3
|
||||
move-exception v1
|
||||
|
||||
.line 271
|
||||
.local v1, "e1":Ljava/lang/Exception;
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {p0, v5}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
.line 272
|
||||
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
.line 282
|
||||
.end local v1 # "e1":Ljava/lang/Exception;
|
||||
.restart local v4 # "responseCode":I
|
||||
:cond_3
|
||||
const/16 v5, 0x1f7
|
||||
|
||||
if-ne v4, v5, :cond_4
|
||||
|
||||
.line 283
|
||||
:try_start_2
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
const-string v6, "Retry-After"
|
||||
|
||||
invoke-interface {v5, v6}, Lorg/apache/http/HttpResponse;->getLastHeader(Ljava/lang/String;)Lorg/apache/http/Header;
|
||||
:try_end_2
|
||||
.catch Lorg/apache/http/ParseException; {:try_start_2 .. :try_end_2} :catch_0
|
||||
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_5
|
||||
|
||||
move-result-object v3
|
||||
|
||||
.line 284
|
||||
.local v3, "h":Lorg/apache/http/Header;
|
||||
if-eqz v3, :cond_2
|
||||
|
||||
.line 286
|
||||
:try_start_3
|
||||
invoke-interface {v3}, Lorg/apache/http/Header;->getValue()Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
invoke-static {v5}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
invoke-virtual {v5}, Ljava/lang/Integer;->intValue()I
|
||||
|
||||
move-result v5
|
||||
|
||||
iput v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->retryTimeout:I
|
||||
:try_end_3
|
||||
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_4
|
||||
.catch Lorg/apache/http/ParseException; {:try_start_3 .. :try_end_3} :catch_0
|
||||
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_5
|
||||
|
||||
goto :goto_2
|
||||
|
||||
.line 287
|
||||
:catch_4
|
||||
move-exception v5
|
||||
|
||||
goto :goto_2
|
||||
|
||||
.line 291
|
||||
.end local v3 # "h":Lorg/apache/http/Header;
|
||||
:cond_4
|
||||
:try_start_4
|
||||
iget-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
invoke-interface {v5}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
.line 292
|
||||
.local v2, "entity":Lorg/apache/http/HttpEntity;
|
||||
invoke-static {v2}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
:try_end_4
|
||||
.catch Lorg/apache/http/ParseException; {:try_start_4 .. :try_end_4} :catch_0
|
||||
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_5
|
||||
|
||||
goto :goto_2
|
||||
|
||||
.line 298
|
||||
.end local v2 # "entity":Lorg/apache/http/HttpEntity;
|
||||
.end local v4 # "responseCode":I
|
||||
:catch_5
|
||||
move-exception v0
|
||||
|
||||
.line 299
|
||||
.local v0, "e":Ljava/io/IOException;
|
||||
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
|
||||
|
||||
.line 300
|
||||
sget-object v5, Lcom/mojang/android/net/WebRequestManager$Status;->FAIL_GENERAL:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
goto :goto_0
|
||||
.end method
|
||||
|
||||
.method public getStatusCode()I
|
||||
.locals 2
|
||||
|
||||
.prologue
|
||||
.line 305
|
||||
sget-object v0, Lcom/mojang/android/net/WebRequestManager$Status;->FINISHED:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
iget-object v1, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
if-ne v0, v1, :cond_0
|
||||
|
||||
.line 306
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->response:Lorg/apache/http/HttpResponse;
|
||||
|
||||
invoke-interface {v0}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-interface {v0}, Lorg/apache/http/StatusLine;->getStatusCode()I
|
||||
|
||||
move-result v0
|
||||
|
||||
.line 307
|
||||
:goto_0
|
||||
return v0
|
||||
|
||||
:cond_0
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {v0}, Lcom/mojang/android/net/WebRequestManager$Status;->getCode()I
|
||||
|
||||
move-result v0
|
||||
|
||||
goto :goto_0
|
||||
.end method
|
||||
|
||||
.method public markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
.locals 1
|
||||
.param p1, "errorCode" # Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.prologue
|
||||
.line 247
|
||||
sget-boolean v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->$assertionsDisabled:Z
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
invoke-virtual {p1}, Lcom/mojang/android/net/WebRequestManager$Status;->isError()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
new-instance v0, Ljava/lang/AssertionError;
|
||||
|
||||
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
|
||||
|
||||
throw v0
|
||||
|
||||
.line 248
|
||||
:cond_0
|
||||
iput-object p1, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
.line 249
|
||||
return-object p0
|
||||
.end method
|
||||
|
||||
.method public waitForSeconds(I)V
|
||||
.locals 4
|
||||
.param p1, "seconds" # I
|
||||
|
||||
.prologue
|
||||
.line 234
|
||||
const/4 v0, 0x0
|
||||
|
||||
.local v0, "a":I
|
||||
:goto_0
|
||||
mul-int/lit8 v2, p1, 0x5
|
||||
|
||||
if-ge v0, v2, :cond_0
|
||||
|
||||
.line 235
|
||||
iget-boolean v2, p0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->aborted:Z
|
||||
|
||||
if-eqz v2, :cond_1
|
||||
|
||||
.line 244
|
||||
:cond_0
|
||||
return-void
|
||||
|
||||
.line 238
|
||||
:cond_1
|
||||
mul-int/lit16 v2, v0, 0xc8
|
||||
|
||||
int-to-long v2, v2
|
||||
|
||||
:try_start_0
|
||||
invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
|
||||
:try_end_0
|
||||
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
.line 234
|
||||
:goto_1
|
||||
add-int/lit8 v0, v0, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 239
|
||||
:catch_0
|
||||
move-exception v1
|
||||
|
||||
.line 241
|
||||
.local v1, "e":Ljava/lang/InterruptedException;
|
||||
invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V
|
||||
|
||||
goto :goto_1
|
||||
.end method
|
||||
|
|
@ -0,0 +1,823 @@
|
|||
.class public Lcom/mojang/android/net/WebRequestManager;
|
||||
.super Ljava/lang/Object;
|
||||
.source "WebRequestManager.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/MemberClasses;
|
||||
value = {
|
||||
Lcom/mojang/android/net/WebRequestManager$WebRequestData;,
|
||||
Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;,
|
||||
Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private _httpClient:Lorg/apache/http/client/HttpClient;
|
||||
|
||||
.field private _requestlock:Ljava/lang/Object;
|
||||
|
||||
.field private _webRequests:Ljava/util/ArrayList;
|
||||
.annotation system Ldalvik/annotation/Signature;
|
||||
value = {
|
||||
"Ljava/util/ArrayList",
|
||||
"<",
|
||||
"Lcom/mojang/android/net/WebRequestManager$WebRequestData;",
|
||||
">;"
|
||||
}
|
||||
.end annotation
|
||||
.end field
|
||||
|
||||
.field private onRequestCompleteCallback:Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;)V
|
||||
.locals 1
|
||||
.param p1, "onRequestCompleteCallback" # Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
|
||||
.prologue
|
||||
.line 38
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
.line 202
|
||||
const/4 v0, 0x0
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->_httpClient:Lorg/apache/http/client/HttpClient;
|
||||
|
||||
.line 203
|
||||
new-instance v0, Ljava/util/ArrayList;
|
||||
|
||||
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
.line 205
|
||||
new-instance v0, Ljava/lang/Object;
|
||||
|
||||
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
iput-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->_requestlock:Ljava/lang/Object;
|
||||
|
||||
.line 39
|
||||
iput-object p1, p0, Lcom/mojang/android/net/WebRequestManager;->onRequestCompleteCallback:Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
|
||||
.line 40
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private _findWebRequest(I)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
.locals 4
|
||||
.param p1, "requestId" # I
|
||||
|
||||
.prologue
|
||||
.line 195
|
||||
iget-object v3, p0, Lcom/mojang/android/net/WebRequestManager;->_requestlock:Ljava/lang/Object;
|
||||
|
||||
monitor-enter v3
|
||||
|
||||
.line 196
|
||||
:try_start_0
|
||||
iget-object v2, p0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
.local v0, "i$":Ljava/util/Iterator;
|
||||
:cond_0
|
||||
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
if-eqz v2, :cond_1
|
||||
|
||||
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
.line 197
|
||||
.local v1, "r":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
iget v2, v1, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
if-ne v2, p1, :cond_0
|
||||
|
||||
monitor-exit v3
|
||||
|
||||
.line 199
|
||||
.end local v1 # "r":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
:goto_0
|
||||
return-object v1
|
||||
|
||||
.line 198
|
||||
:cond_1
|
||||
monitor-exit v3
|
||||
:try_end_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
.line 199
|
||||
new-instance v2, Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
invoke-direct {v2, p1}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;-><init>(I)V
|
||||
|
||||
sget-object v3, Lcom/mojang/android/net/WebRequestManager$Status;->REQUEST_NOT_FOUND:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
invoke-virtual {v2, v3}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->markError(Lcom/mojang/android/net/WebRequestManager$Status;)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
.line 198
|
||||
.end local v0 # "i$":Ljava/util/Iterator;
|
||||
:catchall_0
|
||||
move-exception v2
|
||||
|
||||
:try_start_1
|
||||
monitor-exit v3
|
||||
:try_end_1
|
||||
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||||
|
||||
throw v2
|
||||
.end method
|
||||
|
||||
.method private _init()V
|
||||
.locals 9
|
||||
|
||||
.prologue
|
||||
.line 44
|
||||
new-instance v2, Lorg/apache/http/params/BasicHttpParams;
|
||||
|
||||
invoke-direct {v2}, Lorg/apache/http/params/BasicHttpParams;-><init>()V
|
||||
|
||||
.line 45
|
||||
.local v2, "params":Lorg/apache/http/params/HttpParams;
|
||||
sget-object v5, Lorg/apache/http/HttpVersion;->HTTP_1_1:Lorg/apache/http/HttpVersion;
|
||||
|
||||
invoke-static {v2, v5}, Lorg/apache/http/params/HttpProtocolParams;->setVersion(Lorg/apache/http/params/HttpParams;Lorg/apache/http/ProtocolVersion;)V
|
||||
|
||||
.line 46
|
||||
const-string v5, "utf-8"
|
||||
|
||||
invoke-static {v2, v5}, Lorg/apache/http/params/HttpProtocolParams;->setContentCharset(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V
|
||||
|
||||
.line 47
|
||||
const-string v5, "http.protocol.expect-continue"
|
||||
|
||||
const/4 v6, 0x0
|
||||
|
||||
invoke-interface {v2, v5, v6}, Lorg/apache/http/params/HttpParams;->setBooleanParameter(Ljava/lang/String;Z)Lorg/apache/http/params/HttpParams;
|
||||
|
||||
.line 50
|
||||
new-instance v3, Lorg/apache/http/conn/scheme/SchemeRegistry;
|
||||
|
||||
invoke-direct {v3}, Lorg/apache/http/conn/scheme/SchemeRegistry;-><init>()V
|
||||
|
||||
.line 51
|
||||
.local v3, "registry":Lorg/apache/http/conn/scheme/SchemeRegistry;
|
||||
new-instance v5, Lorg/apache/http/conn/scheme/Scheme;
|
||||
|
||||
const-string v6, "http"
|
||||
|
||||
invoke-static {}, Lorg/apache/http/conn/scheme/PlainSocketFactory;->getSocketFactory()Lorg/apache/http/conn/scheme/PlainSocketFactory;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
const/16 v8, 0x50
|
||||
|
||||
invoke-direct {v5, v6, v7, v8}, Lorg/apache/http/conn/scheme/Scheme;-><init>(Ljava/lang/String;Lorg/apache/http/conn/scheme/SocketFactory;I)V
|
||||
|
||||
invoke-virtual {v3, v5}, Lorg/apache/http/conn/scheme/SchemeRegistry;->register(Lorg/apache/http/conn/scheme/Scheme;)Lorg/apache/http/conn/scheme/Scheme;
|
||||
|
||||
.line 56
|
||||
const/4 v4, 0x0
|
||||
|
||||
.line 58
|
||||
.local v4, "sslSocketFactory":Lorg/apache/http/conn/ssl/SSLSocketFactory;
|
||||
:try_start_0
|
||||
invoke-static {}, Lcom/mojang/android/net/NoCertSSLSocketFactory;->createDefault()Lcom/mojang/android/net/NoCertSSLSocketFactory;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
.line 59
|
||||
new-instance v5, Lorg/apache/http/conn/scheme/Scheme;
|
||||
|
||||
const-string v6, "https"
|
||||
|
||||
const/16 v7, 0x1bb
|
||||
|
||||
invoke-direct {v5, v6, v4, v7}, Lorg/apache/http/conn/scheme/Scheme;-><init>(Ljava/lang/String;Lorg/apache/http/conn/scheme/SocketFactory;I)V
|
||||
|
||||
invoke-virtual {v3, v5}, Lorg/apache/http/conn/scheme/SchemeRegistry;->register(Lorg/apache/http/conn/scheme/Scheme;)Lorg/apache/http/conn/scheme/Scheme;
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
.line 65
|
||||
new-instance v1, Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager;
|
||||
|
||||
invoke-direct {v1, v2, v3}, Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager;-><init>(Lorg/apache/http/params/HttpParams;Lorg/apache/http/conn/scheme/SchemeRegistry;)V
|
||||
|
||||
.line 66
|
||||
.local v1, "manager":Lorg/apache/http/conn/ClientConnectionManager;
|
||||
new-instance v5, Lorg/apache/http/impl/client/DefaultHttpClient;
|
||||
|
||||
invoke-direct {v5, v1, v2}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/conn/ClientConnectionManager;Lorg/apache/http/params/HttpParams;)V
|
||||
|
||||
iput-object v5, p0, Lcom/mojang/android/net/WebRequestManager;->_httpClient:Lorg/apache/http/client/HttpClient;
|
||||
|
||||
.line 67
|
||||
.end local v1 # "manager":Lorg/apache/http/conn/ClientConnectionManager;
|
||||
:goto_0
|
||||
return-void
|
||||
|
||||
.line 60
|
||||
:catch_0
|
||||
move-exception v0
|
||||
|
||||
.line 61
|
||||
.local v0, "e":Ljava/lang/Exception;
|
||||
const-string v5, "MCPE_ssl"
|
||||
|
||||
const-string v6, "Couldn\'t create SSLSocketFactory"
|
||||
|
||||
invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
||||
|
||||
goto :goto_0
|
||||
.end method
|
||||
|
||||
.method static synthetic access$000(Lcom/mojang/android/net/WebRequestManager;)Lorg/apache/http/client/HttpClient;
|
||||
.locals 1
|
||||
.param p0, "x0" # Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
.prologue
|
||||
.line 36
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->_httpClient:Lorg/apache/http/client/HttpClient;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method static synthetic access$100(Lcom/mojang/android/net/WebRequestManager;)Ljava/lang/Object;
|
||||
.locals 1
|
||||
.param p0, "x0" # Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
.prologue
|
||||
.line 36
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->_requestlock:Ljava/lang/Object;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method static synthetic access$200(Lcom/mojang/android/net/WebRequestManager;)Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
.locals 1
|
||||
.param p0, "x0" # Lcom/mojang/android/net/WebRequestManager;
|
||||
|
||||
.prologue
|
||||
.line 36
|
||||
iget-object v0, p0, Lcom/mojang/android/net/WebRequestManager;->onRequestCompleteCallback:Lcom/mojang/android/net/WebRequestManager$IRequestCompleteCallback;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public abortWebRequest(I)I
|
||||
.locals 4
|
||||
.param p1, "requestId" # I
|
||||
|
||||
.prologue
|
||||
.line 181
|
||||
invoke-direct {p0, p1}, Lcom/mojang/android/net/WebRequestManager;->_findWebRequest(I)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
.line 182
|
||||
.local v0, "r":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
iget-object v1, v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->status:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
sget-object v2, Lcom/mojang/android/net/WebRequestManager$Status;->REQUEST_NOT_FOUND:Lcom/mojang/android/net/WebRequestManager$Status;
|
||||
|
||||
if-eq v1, v2, :cond_0
|
||||
|
||||
.line 183
|
||||
iget-object v2, p0, Lcom/mojang/android/net/WebRequestManager;->_requestlock:Ljava/lang/Object;
|
||||
|
||||
monitor-enter v2
|
||||
|
||||
.line 185
|
||||
:try_start_0
|
||||
invoke-virtual {v0}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->abort()V
|
||||
|
||||
.line 186
|
||||
iget-object v1, p0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
|
||||
|
||||
.line 188
|
||||
monitor-exit v2
|
||||
:try_end_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
.line 189
|
||||
sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;
|
||||
|
||||
new-instance v2, Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
||||
|
||||
const-string v3, "Requests left "
|
||||
|
||||
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
iget-object v3, p0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
|
||||
|
||||
move-result v3
|
||||
|
||||
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-virtual {v1, v2}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
|
||||
|
||||
.line 191
|
||||
:cond_0
|
||||
invoke-virtual {v0}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->getStatusCode()I
|
||||
|
||||
move-result v1
|
||||
|
||||
return v1
|
||||
|
||||
.line 188
|
||||
:catchall_0
|
||||
move-exception v1
|
||||
|
||||
:try_start_1
|
||||
monitor-exit v2
|
||||
:try_end_1
|
||||
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||||
|
||||
throw v1
|
||||
.end method
|
||||
|
||||
.method public getWebRequestContent(I)Ljava/lang/String;
|
||||
.locals 1
|
||||
.param p1, "requestId" # I
|
||||
|
||||
.prologue
|
||||
.line 175
|
||||
invoke-direct {p0, p1}, Lcom/mojang/android/net/WebRequestManager;->_findWebRequest(I)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
iget-object v0, v0, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->content:Ljava/lang/String;
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public getWebRequestStatus(I)I
|
||||
.locals 1
|
||||
.param p1, "requestId" # I
|
||||
|
||||
.prologue
|
||||
.line 171
|
||||
invoke-direct {p0, p1}, Lcom/mojang/android/net/WebRequestManager;->_findWebRequest(I)Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->getStatusCode()I
|
||||
|
||||
move-result v0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public webRequest(IJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||
.locals 16
|
||||
.param p1, "requestId" # I
|
||||
.param p2, "voidptr" # J
|
||||
.param p4, "uri" # Ljava/lang/String;
|
||||
.param p5, "method" # Ljava/lang/String;
|
||||
.param p6, "cookieData" # Ljava/lang/String;
|
||||
.param p7, "httpBody" # Ljava/lang/String;
|
||||
|
||||
.prologue
|
||||
.line 71
|
||||
move-object/from16 v0, p0
|
||||
|
||||
iget-object v13, v0, Lcom/mojang/android/net/WebRequestManager;->_httpClient:Lorg/apache/http/client/HttpClient;
|
||||
|
||||
if-nez v13, :cond_0
|
||||
|
||||
.line 72
|
||||
invoke-direct/range {p0 .. p0}, Lcom/mojang/android/net/WebRequestManager;->_init()V
|
||||
|
||||
.line 75
|
||||
:cond_0
|
||||
const/4 v6, 0x0
|
||||
|
||||
.line 77
|
||||
.local v6, "httpRequest":Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
const-string v13, "DELETE"
|
||||
|
||||
move-object/from16 v0, p5
|
||||
|
||||
invoke-virtual {v0, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v13
|
||||
|
||||
if-eqz v13, :cond_3
|
||||
|
||||
.line 78
|
||||
new-instance v6, Lorg/apache/http/client/methods/HttpDelete;
|
||||
|
||||
.end local v6 # "httpRequest":Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
move-object/from16 v0, p4
|
||||
|
||||
invoke-direct {v6, v0}, Lorg/apache/http/client/methods/HttpDelete;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.line 112
|
||||
.restart local v6 # "httpRequest":Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
:goto_0
|
||||
const-string v13, "User-Agent"
|
||||
|
||||
const-string v14, "MCPE/Curl"
|
||||
|
||||
invoke-virtual {v6, v13, v14}, Lorg/apache/http/client/methods/HttpRequestBase;->addHeader(Ljava/lang/String;Ljava/lang/String;)V
|
||||
|
||||
.line 114
|
||||
new-instance v5, Lorg/apache/http/params/BasicHttpParams;
|
||||
|
||||
invoke-direct {v5}, Lorg/apache/http/params/BasicHttpParams;-><init>()V
|
||||
|
||||
.line 116
|
||||
.local v5, "httpParameters":Lorg/apache/http/params/HttpParams;
|
||||
const/16 v13, 0x7530
|
||||
|
||||
invoke-static {v5, v13}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V
|
||||
|
||||
.line 118
|
||||
invoke-virtual {v6, v5}, Lorg/apache/http/client/methods/HttpRequestBase;->setParams(Lorg/apache/http/params/HttpParams;)V
|
||||
|
||||
.line 121
|
||||
if-eqz p6, :cond_1
|
||||
|
||||
invoke-virtual/range {p6 .. p6}, Ljava/lang/String;->length()I
|
||||
|
||||
move-result v13
|
||||
|
||||
if-lez v13, :cond_1
|
||||
|
||||
.line 122
|
||||
sget-object v13, Ljava/lang/System;->out:Ljava/io/PrintStream;
|
||||
|
||||
new-instance v14, Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
|
||||
|
||||
const-string v15, "Setting cookie: ("
|
||||
|
||||
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
invoke-virtual/range {p6 .. p6}, Ljava/lang/String;->length()I
|
||||
|
||||
move-result v15
|
||||
|
||||
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
const-string v15, ") "
|
||||
|
||||
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
move-object/from16 v0, p6
|
||||
|
||||
invoke-virtual {v14, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
invoke-virtual {v13, v14}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
|
||||
|
||||
.line 123
|
||||
const-string v13, "Cookie"
|
||||
|
||||
move-object/from16 v0, p6
|
||||
|
||||
invoke-virtual {v6, v13, v0}, Lorg/apache/http/client/methods/HttpRequestBase;->addHeader(Ljava/lang/String;Ljava/lang/String;)V
|
||||
|
||||
.line 126
|
||||
:cond_1
|
||||
new-instance v10, Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
move/from16 v0, p1
|
||||
|
||||
move-wide/from16 v1, p2
|
||||
|
||||
invoke-direct {v10, v0, v6, v1, v2}, Lcom/mojang/android/net/WebRequestManager$WebRequestData;-><init>(ILorg/apache/http/client/methods/HttpRequestBase;J)V
|
||||
|
||||
.line 127
|
||||
.local v10, "request":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
move-object/from16 v3, p4
|
||||
|
||||
.line 128
|
||||
.local v3, "callURI":Ljava/lang/String;
|
||||
move-object/from16 v0, p0
|
||||
|
||||
iget-object v14, v0, Lcom/mojang/android/net/WebRequestManager;->_requestlock:Ljava/lang/Object;
|
||||
|
||||
monitor-enter v14
|
||||
|
||||
.line 130
|
||||
:try_start_0
|
||||
move-object/from16 v0, p0
|
||||
|
||||
iget-object v13, v0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
invoke-virtual {v13}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
.local v7, "i$":Ljava/util/Iterator;
|
||||
:cond_2
|
||||
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
|
||||
|
||||
move-result v13
|
||||
|
||||
if-eqz v13, :cond_9
|
||||
|
||||
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||||
|
||||
move-result-object v12
|
||||
|
||||
check-cast v12, Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
|
||||
.line 131
|
||||
.local v12, "w":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
iget v13, v12, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
iget v15, v10, Lcom/mojang/android/net/WebRequestManager$WebRequestData;->requestId:I
|
||||
|
||||
if-ne v13, v15, :cond_2
|
||||
|
||||
.line 132
|
||||
monitor-exit v14
|
||||
:try_end_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
.line 168
|
||||
.end local v12 # "w":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
:goto_1
|
||||
return-void
|
||||
|
||||
.line 79
|
||||
.end local v3 # "callURI":Ljava/lang/String;
|
||||
.end local v5 # "httpParameters":Lorg/apache/http/params/HttpParams;
|
||||
.end local v7 # "i$":Ljava/util/Iterator;
|
||||
.end local v10 # "request":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
:cond_3
|
||||
const-string v13, "PUT"
|
||||
|
||||
move-object/from16 v0, p5
|
||||
|
||||
invoke-virtual {v0, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v13
|
||||
|
||||
if-eqz v13, :cond_5
|
||||
|
||||
.line 80
|
||||
new-instance v9, Lorg/apache/http/client/methods/HttpPut;
|
||||
|
||||
move-object/from16 v0, p4
|
||||
|
||||
invoke-direct {v9, v0}, Lorg/apache/http/client/methods/HttpPut;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.line 81
|
||||
.local v9, "putRequest":Lorg/apache/http/client/methods/HttpPut;
|
||||
const-string v13, ""
|
||||
|
||||
move-object/from16 v0, p7
|
||||
|
||||
if-eq v0, v13, :cond_4
|
||||
|
||||
.line 83
|
||||
:try_start_1
|
||||
new-instance v11, Lorg/apache/http/entity/StringEntity;
|
||||
|
||||
move-object/from16 v0, p7
|
||||
|
||||
invoke-direct {v11, v0}, Lorg/apache/http/entity/StringEntity;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.line 84
|
||||
.local v11, "se":Lorg/apache/http/entity/StringEntity;
|
||||
const-string v13, "application/json"
|
||||
|
||||
invoke-virtual {v11, v13}, Lorg/apache/http/entity/StringEntity;->setContentType(Ljava/lang/String;)V
|
||||
|
||||
.line 85
|
||||
invoke-virtual {v9, v11}, Lorg/apache/http/client/methods/HttpPut;->setEntity(Lorg/apache/http/HttpEntity;)V
|
||||
:try_end_1
|
||||
.catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_0
|
||||
|
||||
.line 91
|
||||
.end local v11 # "se":Lorg/apache/http/entity/StringEntity;
|
||||
:cond_4
|
||||
:goto_2
|
||||
move-object v6, v9
|
||||
|
||||
.line 92
|
||||
goto/16 :goto_0
|
||||
|
||||
.line 86
|
||||
:catch_0
|
||||
move-exception v4
|
||||
|
||||
.line 88
|
||||
.local v4, "e":Ljava/io/UnsupportedEncodingException;
|
||||
invoke-virtual {v4}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
|
||||
|
||||
goto :goto_2
|
||||
|
||||
.line 92
|
||||
.end local v4 # "e":Ljava/io/UnsupportedEncodingException;
|
||||
.end local v9 # "putRequest":Lorg/apache/http/client/methods/HttpPut;
|
||||
:cond_5
|
||||
const-string v13, "GET"
|
||||
|
||||
move-object/from16 v0, p5
|
||||
|
||||
invoke-virtual {v0, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v13
|
||||
|
||||
if-eqz v13, :cond_6
|
||||
|
||||
.line 93
|
||||
new-instance v6, Lorg/apache/http/client/methods/HttpGet;
|
||||
|
||||
.end local v6 # "httpRequest":Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
move-object/from16 v0, p4
|
||||
|
||||
invoke-direct {v6, v0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.restart local v6 # "httpRequest":Lorg/apache/http/client/methods/HttpRequestBase;
|
||||
goto/16 :goto_0
|
||||
|
||||
.line 94
|
||||
:cond_6
|
||||
const-string v13, "POST"
|
||||
|
||||
move-object/from16 v0, p5
|
||||
|
||||
invoke-virtual {v0, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v13
|
||||
|
||||
if-eqz v13, :cond_8
|
||||
|
||||
.line 95
|
||||
new-instance v8, Lorg/apache/http/client/methods/HttpPost;
|
||||
|
||||
move-object/from16 v0, p4
|
||||
|
||||
invoke-direct {v8, v0}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.line 96
|
||||
.local v8, "postRequest":Lorg/apache/http/client/methods/HttpPost;
|
||||
const-string v13, ""
|
||||
|
||||
move-object/from16 v0, p7
|
||||
|
||||
if-eq v0, v13, :cond_7
|
||||
|
||||
.line 98
|
||||
:try_start_2
|
||||
new-instance v11, Lorg/apache/http/entity/StringEntity;
|
||||
|
||||
move-object/from16 v0, p7
|
||||
|
||||
invoke-direct {v11, v0}, Lorg/apache/http/entity/StringEntity;-><init>(Ljava/lang/String;)V
|
||||
|
||||
.line 99
|
||||
.restart local v11 # "se":Lorg/apache/http/entity/StringEntity;
|
||||
const-string v13, "application/json"
|
||||
|
||||
invoke-virtual {v11, v13}, Lorg/apache/http/entity/StringEntity;->setContentType(Ljava/lang/String;)V
|
||||
|
||||
.line 100
|
||||
invoke-virtual {v8, v11}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V
|
||||
:try_end_2
|
||||
.catch Ljava/io/UnsupportedEncodingException; {:try_start_2 .. :try_end_2} :catch_1
|
||||
|
||||
.line 106
|
||||
.end local v11 # "se":Lorg/apache/http/entity/StringEntity;
|
||||
:cond_7
|
||||
:goto_3
|
||||
move-object v6, v8
|
||||
|
||||
.line 107
|
||||
goto/16 :goto_0
|
||||
|
||||
.line 101
|
||||
:catch_1
|
||||
move-exception v4
|
||||
|
||||
.line 103
|
||||
.restart local v4 # "e":Ljava/io/UnsupportedEncodingException;
|
||||
invoke-virtual {v4}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
|
||||
|
||||
goto :goto_3
|
||||
|
||||
.line 108
|
||||
.end local v4 # "e":Ljava/io/UnsupportedEncodingException;
|
||||
.end local v8 # "postRequest":Lorg/apache/http/client/methods/HttpPost;
|
||||
:cond_8
|
||||
new-instance v13, Ljava/security/InvalidParameterException;
|
||||
|
||||
new-instance v14, Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
|
||||
|
||||
const-string v15, "Unknown request method "
|
||||
|
||||
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
move-object/from16 v0, p5
|
||||
|
||||
invoke-virtual {v14, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||
|
||||
move-result-object v14
|
||||
|
||||
invoke-direct {v13, v14}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V
|
||||
|
||||
throw v13
|
||||
|
||||
.line 135
|
||||
.restart local v3 # "callURI":Ljava/lang/String;
|
||||
.restart local v5 # "httpParameters":Lorg/apache/http/params/HttpParams;
|
||||
.restart local v7 # "i$":Ljava/util/Iterator;
|
||||
.restart local v10 # "request":Lcom/mojang/android/net/WebRequestManager$WebRequestData;
|
||||
:cond_9
|
||||
:try_start_3
|
||||
move-object/from16 v0, p0
|
||||
|
||||
iget-object v13, v0, Lcom/mojang/android/net/WebRequestManager;->_webRequests:Ljava/util/ArrayList;
|
||||
|
||||
invoke-virtual {v13, v10}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||||
|
||||
.line 136
|
||||
monitor-exit v14
|
||||
:try_end_3
|
||||
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
||||
|
||||
.line 137
|
||||
new-instance v13, Ljava/lang/Thread;
|
||||
|
||||
new-instance v14, Lcom/mojang/android/net/WebRequestManager$1;
|
||||
|
||||
move-object/from16 v0, p0
|
||||
|
||||
invoke-direct {v14, v0, v10}, Lcom/mojang/android/net/WebRequestManager$1;-><init>(Lcom/mojang/android/net/WebRequestManager;Lcom/mojang/android/net/WebRequestManager$WebRequestData;)V
|
||||
|
||||
invoke-direct {v13, v14}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
|
||||
|
||||
invoke-virtual {v13}, Ljava/lang/Thread;->start()V
|
||||
|
||||
goto/16 :goto_1
|
||||
|
||||
.line 136
|
||||
.end local v7 # "i$":Ljava/util/Iterator;
|
||||
:catchall_0
|
||||
move-exception v13
|
||||
|
||||
:try_start_4
|
||||
monitor-exit v14
|
||||
:try_end_4
|
||||
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
||||
|
||||
throw v13
|
||||
.end method
|
||||
Loading…
Add table
Add a link
Reference in a new issue