* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1302 lines
28 KiB
Smali
1302 lines
28 KiB
Smali
.class public final Lcom/google/api/client/http/HttpResponse;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field private static final CONTENT_ENCODING_GZIP:Ljava/lang/String; = "gzip"
|
|
|
|
.field private static final CONTENT_ENCODING_XGZIP:Ljava/lang/String; = "x-gzip"
|
|
|
|
|
|
# instance fields
|
|
.field private content:Ljava/io/InputStream;
|
|
|
|
.field private final contentEncoding:Ljava/lang/String;
|
|
|
|
.field private contentLoggingLimit:I
|
|
|
|
.field private contentRead:Z
|
|
|
|
.field private final contentType:Ljava/lang/String;
|
|
|
|
.field private loggingEnabled:Z
|
|
|
|
.field private final mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.field private final request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.field response:Lcom/google/api/client/http/LowLevelHttpResponse;
|
|
|
|
.field private final returnRawInputStream:Z
|
|
|
|
.field private final statusCode:I
|
|
|
|
.field private final statusMessage:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/api/client/http/HttpRequest;Lcom/google/api/client/http/LowLevelHttpResponse;)V
|
|
.locals 8
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
iput-object p1, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.line 5
|
|
.line 6
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpRequest;->getResponseReturnRawInputStream()Z
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
move-result v0
|
|
|
|
.line 10
|
|
iput-boolean v0, p0, Lcom/google/api/client/http/HttpResponse;->returnRawInputStream:Z
|
|
|
|
.line 11
|
|
.line 12
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpRequest;->getContentLoggingLimit()I
|
|
|
|
.line 13
|
|
.line 14
|
|
.line 15
|
|
move-result v0
|
|
|
|
.line 16
|
|
iput v0, p0, Lcom/google/api/client/http/HttpResponse;->contentLoggingLimit:I
|
|
|
|
.line 17
|
|
.line 18
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpRequest;->isLoggingEnabled()Z
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result v0
|
|
|
|
.line 22
|
|
iput-boolean v0, p0, Lcom/google/api/client/http/HttpResponse;->loggingEnabled:Z
|
|
|
|
.line 23
|
|
.line 24
|
|
iput-object p2, p0, Lcom/google/api/client/http/HttpResponse;->response:Lcom/google/api/client/http/LowLevelHttpResponse;
|
|
|
|
.line 25
|
|
.line 26
|
|
invoke-virtual {p2}, Lcom/google/api/client/http/LowLevelHttpResponse;->getContentEncoding()Ljava/lang/String;
|
|
|
|
.line 27
|
|
.line 28
|
|
.line 29
|
|
move-result-object v0
|
|
|
|
.line 30
|
|
iput-object v0, p0, Lcom/google/api/client/http/HttpResponse;->contentEncoding:Ljava/lang/String;
|
|
|
|
.line 31
|
|
.line 32
|
|
invoke-virtual {p2}, Lcom/google/api/client/http/LowLevelHttpResponse;->getStatusCode()I
|
|
|
|
.line 33
|
|
.line 34
|
|
.line 35
|
|
move-result v0
|
|
|
|
.line 36
|
|
const/4 v1, 0x0
|
|
|
|
.line 37
|
|
if-gez v0, :cond_0
|
|
|
|
.line 38
|
|
.line 39
|
|
move v0, v1
|
|
|
|
.line 40
|
|
:cond_0
|
|
iput v0, p0, Lcom/google/api/client/http/HttpResponse;->statusCode:I
|
|
|
|
.line 41
|
|
.line 42
|
|
invoke-virtual {p2}, Lcom/google/api/client/http/LowLevelHttpResponse;->getReasonPhrase()Ljava/lang/String;
|
|
|
|
.line 43
|
|
.line 44
|
|
.line 45
|
|
move-result-object v2
|
|
|
|
.line 46
|
|
iput-object v2, p0, Lcom/google/api/client/http/HttpResponse;->statusMessage:Ljava/lang/String;
|
|
|
|
.line 47
|
|
.line 48
|
|
sget-object v3, Lcom/google/api/client/http/HttpTransport;->LOGGER:Ljava/util/logging/Logger;
|
|
|
|
.line 49
|
|
.line 50
|
|
iget-boolean v4, p0, Lcom/google/api/client/http/HttpResponse;->loggingEnabled:Z
|
|
|
|
.line 51
|
|
.line 52
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 53
|
|
.line 54
|
|
sget-object v4, Ljava/util/logging/Level;->CONFIG:Ljava/util/logging/Level;
|
|
|
|
.line 55
|
|
.line 56
|
|
invoke-virtual {v3, v4}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z
|
|
|
|
.line 57
|
|
.line 58
|
|
.line 59
|
|
move-result v4
|
|
|
|
.line 60
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 61
|
|
.line 62
|
|
const/4 v1, 0x1
|
|
|
|
.line 63
|
|
:cond_1
|
|
const/4 v4, 0x0
|
|
|
|
.line 64
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 65
|
|
.line 66
|
|
const-string v5, "-------------- RESPONSE --------------"
|
|
|
|
.line 67
|
|
.line 68
|
|
invoke-static {v5}, Landroid/support/v4/media/a;->t(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 69
|
|
.line 70
|
|
.line 71
|
|
move-result-object v5
|
|
|
|
.line 72
|
|
sget-object v6, Lcom/google/api/client/util/StringUtils;->LINE_SEPARATOR:Ljava/lang/String;
|
|
|
|
.line 73
|
|
.line 74
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 75
|
|
.line 76
|
|
.line 77
|
|
invoke-virtual {p2}, Lcom/google/api/client/http/LowLevelHttpResponse;->getStatusLine()Ljava/lang/String;
|
|
|
|
.line 78
|
|
.line 79
|
|
.line 80
|
|
move-result-object v7
|
|
|
|
.line 81
|
|
if-eqz v7, :cond_2
|
|
|
|
.line 82
|
|
.line 83
|
|
invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 84
|
|
.line 85
|
|
.line 86
|
|
goto :goto_0
|
|
|
|
.line 87
|
|
:cond_2
|
|
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
.line 88
|
|
.line 89
|
|
.line 90
|
|
if-eqz v2, :cond_3
|
|
|
|
.line 91
|
|
.line 92
|
|
const/16 v0, 0x20
|
|
|
|
.line 93
|
|
.line 94
|
|
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
.line 95
|
|
.line 96
|
|
.line 97
|
|
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 98
|
|
.line 99
|
|
.line 100
|
|
:cond_3
|
|
:goto_0
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 101
|
|
.line 102
|
|
.line 103
|
|
goto :goto_1
|
|
|
|
.line 104
|
|
:cond_4
|
|
move-object v5, v4
|
|
|
|
.line 105
|
|
:goto_1
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpRequest;->getResponseHeaders()Lcom/google/api/client/http/HttpHeaders;
|
|
|
|
.line 106
|
|
.line 107
|
|
.line 108
|
|
move-result-object v0
|
|
|
|
.line 109
|
|
if-eqz v1, :cond_5
|
|
|
|
.line 110
|
|
.line 111
|
|
move-object v4, v5
|
|
|
|
.line 112
|
|
:cond_5
|
|
invoke-virtual {v0, p2, v4}, Lcom/google/api/client/http/HttpHeaders;->fromHttpResponse(Lcom/google/api/client/http/LowLevelHttpResponse;Ljava/lang/StringBuilder;)V
|
|
|
|
.line 113
|
|
.line 114
|
|
.line 115
|
|
invoke-virtual {p2}, Lcom/google/api/client/http/LowLevelHttpResponse;->getContentType()Ljava/lang/String;
|
|
|
|
.line 116
|
|
.line 117
|
|
.line 118
|
|
move-result-object p2
|
|
|
|
.line 119
|
|
if-nez p2, :cond_6
|
|
|
|
.line 120
|
|
.line 121
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpRequest;->getResponseHeaders()Lcom/google/api/client/http/HttpHeaders;
|
|
|
|
.line 122
|
|
.line 123
|
|
.line 124
|
|
move-result-object p1
|
|
|
|
.line 125
|
|
invoke-virtual {p1}, Lcom/google/api/client/http/HttpHeaders;->getContentType()Ljava/lang/String;
|
|
|
|
.line 126
|
|
.line 127
|
|
.line 128
|
|
move-result-object p2
|
|
|
|
.line 129
|
|
:cond_6
|
|
iput-object p2, p0, Lcom/google/api/client/http/HttpResponse;->contentType:Ljava/lang/String;
|
|
|
|
.line 130
|
|
.line 131
|
|
invoke-static {p2}, Lcom/google/api/client/http/HttpResponse;->parseMediaType(Ljava/lang/String;)Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 132
|
|
.line 133
|
|
.line 134
|
|
move-result-object p1
|
|
|
|
.line 135
|
|
iput-object p1, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 136
|
|
.line 137
|
|
if-eqz v1, :cond_7
|
|
|
|
.line 138
|
|
.line 139
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
.line 140
|
|
.line 141
|
|
.line 142
|
|
move-result-object p1
|
|
|
|
.line 143
|
|
invoke-virtual {v3, p1}, Ljava/util/logging/Logger;->config(Ljava/lang/String;)V
|
|
|
|
.line 144
|
|
.line 145
|
|
.line 146
|
|
:cond_7
|
|
return-void
|
|
.end method
|
|
|
|
.method private hasMessageBody()Z
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getStatusCode()I
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result v0
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getRequest()Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
move-result-object v1
|
|
|
|
.line 9
|
|
invoke-virtual {v1}, Lcom/google/api/client/http/HttpRequest;->getRequestMethod()Ljava/lang/String;
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result-object v1
|
|
|
|
.line 13
|
|
const-string v2, "HEAD"
|
|
|
|
.line 14
|
|
.line 15
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
move-result v1
|
|
|
|
.line 19
|
|
if-nez v1, :cond_1
|
|
|
|
.line 20
|
|
.line 21
|
|
div-int/lit8 v1, v0, 0x64
|
|
|
|
.line 22
|
|
.line 23
|
|
const/4 v2, 0x1
|
|
|
|
.line 24
|
|
if-eq v1, v2, :cond_1
|
|
|
|
.line 25
|
|
.line 26
|
|
const/16 v1, 0xcc
|
|
|
|
.line 27
|
|
.line 28
|
|
if-eq v0, v1, :cond_1
|
|
|
|
.line 29
|
|
.line 30
|
|
const/16 v1, 0x130
|
|
|
|
.line 31
|
|
.line 32
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 33
|
|
.line 34
|
|
goto :goto_0
|
|
|
|
.line 35
|
|
:cond_0
|
|
return v2
|
|
|
|
.line 36
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->ignore()V
|
|
|
|
.line 37
|
|
.line 38
|
|
.line 39
|
|
const/4 v0, 0x0
|
|
|
|
.line 40
|
|
return v0
|
|
.end method
|
|
|
|
.method private static parseMediaType(Ljava/lang/String;)Lcom/google/api/client/http/HttpMediaType;
|
|
.locals 2
|
|
|
|
.line 1
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
if-nez p0, :cond_0
|
|
|
|
.line 3
|
|
.line 4
|
|
return-object v0
|
|
|
|
.line 5
|
|
:cond_0
|
|
:try_start_0
|
|
new-instance v1, Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 6
|
|
.line 7
|
|
invoke-direct {v1, p0}, Lcom/google/api/client/http/HttpMediaType;-><init>(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
return-object v1
|
|
|
|
.line 11
|
|
:catch_0
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public disconnect()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->ignore()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->response:Lcom/google/api/client/http/LowLevelHttpResponse;
|
|
|
|
.line 5
|
|
.line 6
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/LowLevelHttpResponse;->disconnect()V
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
return-void
|
|
.end method
|
|
|
|
.method public download(Ljava/io/OutputStream;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result-object v0
|
|
|
|
.line 5
|
|
invoke-static {v0, p1}, Lcom/google/api/client/util/IOUtils;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContent()Ljava/io/InputStream;
|
|
.locals 5
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcom/google/api/client/http/HttpResponse;->contentRead:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
if-nez v0, :cond_5
|
|
|
|
.line 4
|
|
.line 5
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->response:Lcom/google/api/client/http/LowLevelHttpResponse;
|
|
|
|
.line 6
|
|
.line 7
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/LowLevelHttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
move-result-object v0
|
|
|
|
.line 11
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 12
|
|
.line 13
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lcom/google/api/client/http/HttpResponse;->returnRawInputStream:Z
|
|
|
|
.line 14
|
|
.line 15
|
|
if-nez v1, :cond_1
|
|
|
|
.line 16
|
|
.line 17
|
|
iget-object v1, p0, Lcom/google/api/client/http/HttpResponse;->contentEncoding:Ljava/lang/String;
|
|
|
|
.line 18
|
|
.line 19
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 20
|
|
.line 21
|
|
invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
.line 22
|
|
.line 23
|
|
.line 24
|
|
move-result-object v1
|
|
|
|
.line 25
|
|
sget-object v2, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
|
|
|
|
.line 26
|
|
.line 27
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
.line 28
|
|
.line 29
|
|
.line 30
|
|
move-result-object v1
|
|
|
|
.line 31
|
|
const-string v2, "gzip"
|
|
|
|
.line 32
|
|
.line 33
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 34
|
|
.line 35
|
|
.line 36
|
|
move-result v2
|
|
|
|
.line 37
|
|
if-nez v2, :cond_0
|
|
|
|
.line 38
|
|
.line 39
|
|
const-string v2, "x-gzip"
|
|
|
|
.line 40
|
|
.line 41
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 42
|
|
.line 43
|
|
.line 44
|
|
move-result v1
|
|
|
|
.line 45
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 46
|
|
.line 47
|
|
goto :goto_0
|
|
|
|
.line 48
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 49
|
|
goto :goto_1
|
|
|
|
.line 50
|
|
:cond_0
|
|
:goto_0
|
|
new-instance v1, Lcom/google/api/client/http/ConsumingInputStream;
|
|
|
|
.line 51
|
|
.line 52
|
|
invoke-direct {v1, v0}, Lcom/google/api/client/http/ConsumingInputStream;-><init>(Ljava/io/InputStream;)V
|
|
|
|
.line 53
|
|
.line 54
|
|
.line 55
|
|
invoke-static {v1}, Lcom/google/api/client/http/GzipSupport;->newGzipInputStream(Ljava/io/InputStream;)Ljava/util/zip/GZIPInputStream;
|
|
|
|
.line 56
|
|
.line 57
|
|
.line 58
|
|
move-result-object v0
|
|
|
|
.line 59
|
|
:cond_1
|
|
sget-object v1, Lcom/google/api/client/http/HttpTransport;->LOGGER:Ljava/util/logging/Logger;
|
|
|
|
.line 60
|
|
.line 61
|
|
iget-boolean v2, p0, Lcom/google/api/client/http/HttpResponse;->loggingEnabled:Z
|
|
|
|
.line 62
|
|
.line 63
|
|
if-eqz v2, :cond_2
|
|
|
|
.line 64
|
|
.line 65
|
|
sget-object v2, Ljava/util/logging/Level;->CONFIG:Ljava/util/logging/Level;
|
|
|
|
.line 66
|
|
.line 67
|
|
invoke-virtual {v1, v2}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z
|
|
|
|
.line 68
|
|
.line 69
|
|
.line 70
|
|
move-result v3
|
|
|
|
.line 71
|
|
if-eqz v3, :cond_2
|
|
|
|
.line 72
|
|
.line 73
|
|
new-instance v3, Lcom/google/api/client/util/LoggingInputStream;
|
|
|
|
.line 74
|
|
.line 75
|
|
iget v4, p0, Lcom/google/api/client/http/HttpResponse;->contentLoggingLimit:I
|
|
|
|
.line 76
|
|
.line 77
|
|
invoke-direct {v3, v0, v1, v2, v4}, Lcom/google/api/client/util/LoggingInputStream;-><init>(Ljava/io/InputStream;Ljava/util/logging/Logger;Ljava/util/logging/Level;I)V
|
|
|
|
.line 78
|
|
.line 79
|
|
.line 80
|
|
move-object v0, v3
|
|
|
|
.line 81
|
|
:cond_2
|
|
iget-boolean v1, p0, Lcom/google/api/client/http/HttpResponse;->returnRawInputStream:Z
|
|
|
|
.line 82
|
|
.line 83
|
|
if-eqz v1, :cond_3
|
|
|
|
.line 84
|
|
.line 85
|
|
iput-object v0, p0, Lcom/google/api/client/http/HttpResponse;->content:Ljava/io/InputStream;
|
|
|
|
.line 86
|
|
.line 87
|
|
goto :goto_2
|
|
|
|
.line 88
|
|
:cond_3
|
|
new-instance v1, Ljava/io/BufferedInputStream;
|
|
|
|
.line 89
|
|
.line 90
|
|
invoke-direct {v1, v0}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V
|
|
|
|
.line 91
|
|
.line 92
|
|
.line 93
|
|
iput-object v1, p0, Lcom/google/api/client/http/HttpResponse;->content:Ljava/io/InputStream;
|
|
:try_end_0
|
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 94
|
|
.line 95
|
|
goto :goto_2
|
|
|
|
.line 96
|
|
:goto_1
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 97
|
|
.line 98
|
|
.line 99
|
|
throw v1
|
|
|
|
.line 100
|
|
:catch_0
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 101
|
|
.line 102
|
|
.line 103
|
|
:cond_4
|
|
:goto_2
|
|
const/4 v0, 0x1
|
|
|
|
.line 104
|
|
iput-boolean v0, p0, Lcom/google/api/client/http/HttpResponse;->contentRead:Z
|
|
|
|
.line 105
|
|
.line 106
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->content:Ljava/io/InputStream;
|
|
|
|
.line 107
|
|
.line 108
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentCharset()Ljava/nio/charset/Charset;
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 2
|
|
.line 3
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 4
|
|
.line 5
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getCharsetParameter()Ljava/nio/charset/Charset;
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
move-result-object v0
|
|
|
|
.line 9
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 10
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 12
|
|
.line 13
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getCharsetParameter()Ljava/nio/charset/Charset;
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
move-result-object v0
|
|
|
|
.line 17
|
|
return-object v0
|
|
|
|
.line 18
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getType()Ljava/lang/String;
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
move-result-object v0
|
|
|
|
.line 24
|
|
const-string v1, "application"
|
|
|
|
.line 25
|
|
.line 26
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 27
|
|
.line 28
|
|
.line 29
|
|
move-result v0
|
|
|
|
.line 30
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 31
|
|
.line 32
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 33
|
|
.line 34
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getSubType()Ljava/lang/String;
|
|
|
|
.line 35
|
|
.line 36
|
|
.line 37
|
|
move-result-object v0
|
|
|
|
.line 38
|
|
const-string v1, "json"
|
|
|
|
.line 39
|
|
.line 40
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 41
|
|
.line 42
|
|
.line 43
|
|
move-result v0
|
|
|
|
.line 44
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 45
|
|
.line 46
|
|
sget-object v0, Ljava/nio/charset/StandardCharsets;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
.line 47
|
|
.line 48
|
|
return-object v0
|
|
|
|
.line 49
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 50
|
|
.line 51
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getType()Ljava/lang/String;
|
|
|
|
.line 52
|
|
.line 53
|
|
.line 54
|
|
move-result-object v0
|
|
|
|
.line 55
|
|
const-string v1, "text"
|
|
|
|
.line 56
|
|
.line 57
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 58
|
|
.line 59
|
|
.line 60
|
|
move-result v0
|
|
|
|
.line 61
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 62
|
|
.line 63
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 64
|
|
.line 65
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpMediaType;->getSubType()Ljava/lang/String;
|
|
|
|
.line 66
|
|
.line 67
|
|
.line 68
|
|
move-result-object v0
|
|
|
|
.line 69
|
|
const-string v1, "csv"
|
|
|
|
.line 70
|
|
.line 71
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 72
|
|
.line 73
|
|
.line 74
|
|
move-result v0
|
|
|
|
.line 75
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 76
|
|
.line 77
|
|
sget-object v0, Ljava/nio/charset/StandardCharsets;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
.line 78
|
|
.line 79
|
|
return-object v0
|
|
|
|
.line 80
|
|
:cond_2
|
|
sget-object v0, Ljava/nio/charset/StandardCharsets;->ISO_8859_1:Ljava/nio/charset/Charset;
|
|
|
|
.line 81
|
|
.line 82
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentEncoding()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->contentEncoding:Ljava/lang/String;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentLoggingLimit()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/api/client/http/HttpResponse;->contentLoggingLimit:I
|
|
|
|
.line 2
|
|
.line 3
|
|
return v0
|
|
.end method
|
|
|
|
.method public getContentType()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->contentType:Ljava/lang/String;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getHeaders()Lcom/google/api/client/http/HttpHeaders;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpRequest;->getResponseHeaders()Lcom/google/api/client/http/HttpHeaders;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object v0
|
|
|
|
.line 7
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMediaType()Lcom/google/api/client/http/HttpMediaType;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->mediaType:Lcom/google/api/client/http/HttpMediaType;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRequest()Lcom/google/api/client/http/HttpRequest;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getStatusCode()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/api/client/http/HttpResponse;->statusCode:I
|
|
|
|
.line 2
|
|
.line 3
|
|
return v0
|
|
.end method
|
|
|
|
.method public getStatusMessage()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->statusMessage:Ljava/lang/String;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTransport()Lcom/google/api/client/http/HttpTransport;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpRequest;->getTransport()Lcom/google/api/client/http/HttpTransport;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object v0
|
|
|
|
.line 7
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public ignore()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->response:Lcom/google/api/client/http/LowLevelHttpResponse;
|
|
|
|
.line 2
|
|
.line 3
|
|
if-nez v0, :cond_0
|
|
|
|
.line 4
|
|
.line 5
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/LowLevelHttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
move-result-object v0
|
|
|
|
.line 10
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 11
|
|
.line 12
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 13
|
|
.line 14
|
|
.line 15
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public isLoggingEnabled()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcom/google/api/client/http/HttpResponse;->loggingEnabled:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
return v0
|
|
.end method
|
|
|
|
.method public isSuccessStatusCode()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/api/client/http/HttpResponse;->statusCode:I
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-static {v0}, Lcom/google/api/client/http/HttpStatusCodes;->isSuccess(I)Z
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result v0
|
|
|
|
.line 7
|
|
return v0
|
|
.end method
|
|
|
|
.method public parseAs(Ljava/lang/Class;)Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"TT;>;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/api/client/http/HttpResponse;->hasMessageBody()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpRequest;->getParser()Lcom/google/api/client/util/ObjectParser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContentCharset()Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v1, v2, p1}, Lcom/google/api/client/util/ObjectParser;->parseAndClose(Ljava/io/InputStream;Ljava/nio/charset/Charset;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public parseAs(Ljava/lang/reflect/Type;)Ljava/lang/Object;
|
|
.locals 3
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/api/client/http/HttpResponse;->hasMessageBody()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/api/client/http/HttpResponse;->request:Lcom/google/api/client/http/HttpRequest;
|
|
|
|
invoke-virtual {v0}, Lcom/google/api/client/http/HttpRequest;->getParser()Lcom/google/api/client/util/ObjectParser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContentCharset()Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v1, v2, p1}, Lcom/google/api/client/util/ObjectParser;->parseAndClose(Ljava/io/InputStream;Ljava/nio/charset/Charset;Ljava/lang/reflect/Type;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public parseAsString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContent()Ljava/io/InputStream;
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result-object v0
|
|
|
|
.line 5
|
|
if-nez v0, :cond_0
|
|
|
|
.line 6
|
|
.line 7
|
|
const-string v0, ""
|
|
|
|
.line 8
|
|
.line 9
|
|
return-object v0
|
|
|
|
.line 10
|
|
:cond_0
|
|
new-instance v1, Ljava/io/ByteArrayOutputStream;
|
|
|
|
.line 11
|
|
.line 12
|
|
invoke-direct {v1}, Ljava/io/ByteArrayOutputStream;-><init>()V
|
|
|
|
.line 13
|
|
.line 14
|
|
.line 15
|
|
invoke-static {v0, v1}, Lcom/google/api/client/util/IOUtils;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
invoke-virtual {p0}, Lcom/google/api/client/http/HttpResponse;->getContentCharset()Ljava/nio/charset/Charset;
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result-object v0
|
|
|
|
.line 22
|
|
invoke-virtual {v0}, Ljava/nio/charset/Charset;->name()Ljava/lang/String;
|
|
|
|
.line 23
|
|
.line 24
|
|
.line 25
|
|
move-result-object v0
|
|
|
|
.line 26
|
|
invoke-virtual {v1, v0}, Ljava/io/ByteArrayOutputStream;->toString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
.line 27
|
|
.line 28
|
|
.line 29
|
|
move-result-object v0
|
|
|
|
.line 30
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public setContentLoggingLimit(I)Lcom/google/api/client/http/HttpResponse;
|
|
.locals 2
|
|
|
|
.line 1
|
|
if-ltz p1, :cond_0
|
|
|
|
.line 2
|
|
.line 3
|
|
const/4 v0, 0x1
|
|
|
|
.line 4
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
:goto_0
|
|
const-string v1, "The content logging limit must be non-negative."
|
|
|
|
.line 7
|
|
.line 8
|
|
invoke-static {v0, v1}, Lcom/google/api/client/util/Preconditions;->checkArgument(ZLjava/lang/Object;)V
|
|
|
|
.line 9
|
|
.line 10
|
|
.line 11
|
|
iput p1, p0, Lcom/google/api/client/http/HttpResponse;->contentLoggingLimit:I
|
|
|
|
.line 12
|
|
.line 13
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setLoggingEnabled(Z)Lcom/google/api/client/http/HttpResponse;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-boolean p1, p0, Lcom/google/api/client/http/HttpResponse;->loggingEnabled:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object p0
|
|
.end method
|