- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
807 lines
24 KiB
Smali
807 lines
24 KiB
Smali
.class public Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# instance fields
|
|
.field public final activatedCache:Lcom/google/firebase/remoteconfig/internal/ConfigCacheClient;
|
|
|
|
.field public final configFetchHandler:Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;
|
|
|
|
.field public final eventListeners:Ljava/util/Set;
|
|
|
|
.field public final httpURLConnection:Ljava/net/HttpURLConnection;
|
|
|
|
.field public final random:Ljava/util/Random;
|
|
|
|
.field public final retryCallback:Lcom/google/firebase/remoteconfig/ConfigUpdateListener;
|
|
|
|
.field public final scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
|
|
# direct methods
|
|
.method public static synthetic $r8$lambda$dIKsEJCjbXx7gPnQBWjdTjzJ-GQ(Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;Lcom/google/android/gms/tasks/Task;Lcom/google/android/gms/tasks/Task;JILcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
|
|
.locals 0
|
|
|
|
.line 0
|
|
invoke-virtual/range {p0 .. p6}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->lambda$fetchLatestConfig$0(Lcom/google/android/gms/tasks/Task;Lcom/google/android/gms/tasks/Task;JILcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/net/HttpURLConnection;Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;Lcom/google/firebase/remoteconfig/internal/ConfigCacheClient;Ljava/util/Set;Lcom/google/firebase/remoteconfig/ConfigUpdateListener;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
.locals 0
|
|
|
|
.line 64
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->httpURLConnection:Ljava/net/HttpURLConnection;
|
|
|
|
iput-object p2, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->configFetchHandler:Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;
|
|
|
|
iput-object p3, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->activatedCache:Lcom/google/firebase/remoteconfig/internal/ConfigCacheClient;
|
|
|
|
iput-object p4, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->eventListeners:Ljava/util/Set;
|
|
|
|
iput-object p5, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->retryCallback:Lcom/google/firebase/remoteconfig/ConfigUpdateListener;
|
|
|
|
iput-object p6, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
.line 71
|
|
new-instance p1, Ljava/util/Random;
|
|
|
|
invoke-direct {p1}, Ljava/util/Random;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->random:Ljava/util/Random;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static fetchResponseIsUpToDate(Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;J)Ljava/lang/Boolean;
|
|
.locals 5
|
|
|
|
.line 281
|
|
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;->getFetchedConfigs()Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 282
|
|
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;->getFetchedConfigs()Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/ConfigContainer;->getTemplateVersionNumber()J
|
|
|
|
move-result-wide v3
|
|
|
|
cmp-long p0, v3, p1
|
|
|
|
if-ltz p0, :cond_0
|
|
|
|
move v1, v2
|
|
|
|
:cond_0
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 287
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;->getStatus()I
|
|
|
|
move-result p0
|
|
|
|
if-ne p0, v2, :cond_2
|
|
|
|
move v1, v2
|
|
|
|
:cond_2
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final autoFetch(IJ)V
|
|
.locals 3
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 194
|
|
new-instance p1, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigServerException;
|
|
|
|
const-string p2, "Unable to fetch the latest version of the template."
|
|
|
|
sget-object p3, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;->CONFIG_UPDATE_NOT_FETCHED:Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;
|
|
|
|
invoke-direct {p1, p2, p3}, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigServerException;-><init>(Ljava/lang/String;Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;)V
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->propagateErrors(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->random:Ljava/util/Random;
|
|
|
|
const/4 v1, 0x4
|
|
|
|
.line 202
|
|
invoke-virtual {v0, v1}, Ljava/util/Random;->nextInt(I)I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
.line 203
|
|
new-instance v2, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch$1;
|
|
|
|
invoke-direct {v2, p0, p1, p2, p3}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch$1;-><init>(Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;IJ)V
|
|
|
|
int-to-long p1, v0
|
|
|
|
sget-object p3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-interface {v1, v2, p1, p2, p3}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final declared-synchronized executeAllListenerCallbacks(Lcom/google/firebase/remoteconfig/ConfigUpdate;)V
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->eventListeners:Ljava/util/Set;
|
|
|
|
.line 81
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/firebase/remoteconfig/ConfigUpdateListener;
|
|
|
|
.line 82
|
|
invoke-interface {v1, p1}, Lcom/google/firebase/remoteconfig/ConfigUpdateListener;->onUpdate(Lcom/google/firebase/remoteconfig/ConfigUpdate;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 84
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized fetchLatestConfig(IJ)Lcom/google/android/gms/tasks/Task;
|
|
.locals 9
|
|
|
|
monitor-enter p0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
add-int/lit8 v7, p1, -0x1
|
|
|
|
rsub-int/lit8 p1, v7, 0x3
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->configFetchHandler:Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;
|
|
|
|
.line 219
|
|
sget-object v2, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchType;->REALTIME:Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchType;
|
|
|
|
.line 220
|
|
invoke-virtual {v1, v2, p1}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;->fetchNowWithTypeAndAttemptNumber(Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchType;I)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object p1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->activatedCache:Lcom/google/firebase/remoteconfig/internal/ConfigCacheClient;
|
|
|
|
.line 222
|
|
invoke-virtual {p1}, Lcom/google/firebase/remoteconfig/internal/ConfigCacheClient;->get()Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 p1, 0x2
|
|
|
|
new-array p1, p1, [Lcom/google/android/gms/tasks/Task;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput-object v3, p1, v1
|
|
|
|
aput-object v4, p1, v0
|
|
|
|
.line 224
|
|
invoke-static {p1}, Lcom/google/android/gms/tasks/Tasks;->whenAllComplete([Lcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->scheduledExecutorService:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
new-instance v8, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch$$ExternalSyntheticLambda0;
|
|
|
|
move-object v1, v8
|
|
|
|
move-object v2, p0
|
|
|
|
move-wide v5, p2
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch$$ExternalSyntheticLambda0;-><init>(Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;Lcom/google/android/gms/tasks/Task;Lcom/google/android/gms/tasks/Task;JI)V
|
|
|
|
.line 225
|
|
invoke-virtual {p1, v0, v8}, Lcom/google/android/gms/tasks/Task;->continueWithTask(Ljava/util/concurrent/Executor;Lcom/google/android/gms/tasks/Continuation;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 224
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleNotifications(Ljava/io/InputStream;)V
|
|
.locals 9
|
|
|
|
const-string v0, "latestTemplateVersionNumber"
|
|
|
|
const-string v1, "featureDisabled"
|
|
|
|
.line 122
|
|
new-instance v2, Ljava/io/BufferedReader;
|
|
|
|
new-instance v3, Ljava/io/InputStreamReader;
|
|
|
|
const-string v4, "utf-8"
|
|
|
|
invoke-direct {v3, p1, v4}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V
|
|
|
|
invoke-direct {v2, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
|
|
|
|
const-string v3, ""
|
|
|
|
:cond_0
|
|
:goto_0
|
|
move-object v4, v3
|
|
|
|
.line 129
|
|
:cond_1
|
|
:goto_1
|
|
invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
.line 131
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v6, "}"
|
|
|
|
.line 134
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
.line 138
|
|
invoke-virtual {p0, v4}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->parseAndValidateConfigUpdateMessage(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
.line 139
|
|
invoke-virtual {v4}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
.line 144
|
|
:cond_2
|
|
:try_start_0
|
|
new-instance v5, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v5, v4}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 146
|
|
invoke-virtual {v5, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
.line 147
|
|
invoke-virtual {v5, v1}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
iget-object v4, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->retryCallback:Lcom/google/firebase/remoteconfig/ConfigUpdateListener;
|
|
|
|
.line 148
|
|
new-instance v5, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigServerException;
|
|
|
|
const-string v6, "The server is temporarily unavailable. Try again in a few minutes."
|
|
|
|
sget-object v7, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;->CONFIG_UPDATE_UNAVAILABLE:Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;
|
|
|
|
invoke-direct {v5, v6, v7}, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigServerException;-><init>(Ljava/lang/String;Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;)V
|
|
|
|
invoke-interface {v4, v5}, Lcom/google/firebase/remoteconfig/ConfigUpdateListener;->onError(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;)V
|
|
|
|
goto :goto_3
|
|
|
|
:catch_0
|
|
move-exception v4
|
|
|
|
goto :goto_2
|
|
|
|
.line 162
|
|
:cond_3
|
|
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->isEventListenersEmpty()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
goto :goto_3
|
|
|
|
.line 166
|
|
:cond_4
|
|
invoke-virtual {v5, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
iget-object v4, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->configFetchHandler:Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;
|
|
|
|
.line 167
|
|
invoke-virtual {v4}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler;->getTemplateVersionNumber()J
|
|
|
|
move-result-wide v6
|
|
|
|
.line 168
|
|
invoke-virtual {v5, v0}, Lorg/json/JSONObject;->getLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v6, v4, v6
|
|
|
|
if-lez v6, :cond_0
|
|
|
|
const/4 v6, 0x3
|
|
|
|
.line 170
|
|
invoke-virtual {p0, v6, v4, v5}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->autoFetch(IJ)V
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 176
|
|
:goto_2
|
|
new-instance v5, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;
|
|
|
|
.line 179
|
|
invoke-virtual {v4}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v7, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;->CONFIG_UPDATE_MESSAGE_INVALID:Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;
|
|
|
|
const-string v8, "Unable to parse config update message."
|
|
|
|
invoke-direct {v5, v8, v6, v7}, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException$Code;)V
|
|
|
|
.line 176
|
|
invoke-virtual {p0, v5}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->propagateErrors(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;)V
|
|
|
|
const-string v5, "FirebaseRemoteConfig"
|
|
|
|
const-string v6, "Unable to parse latest config update message."
|
|
|
|
.line 181
|
|
invoke-static {v5, v6, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 188
|
|
:cond_5
|
|
:goto_3
|
|
invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
|
|
|
|
.line 189
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final declared-synchronized isEventListenersEmpty()Z
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->eventListeners:Ljava/util/Set;
|
|
|
|
.line 87
|
|
invoke-interface {v0}, Ljava/util/Set;->isEmpty()Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final synthetic lambda$fetchLatestConfig$0(Lcom/google/android/gms/tasks/Task;Lcom/google/android/gms/tasks/Task;JILcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
|
|
.locals 1
|
|
|
|
.line 228
|
|
invoke-virtual {p1}, Lcom/google/android/gms/tasks/Task;->isSuccessful()Z
|
|
|
|
move-result p6
|
|
|
|
if-nez p6, :cond_0
|
|
|
|
.line 229
|
|
new-instance p2, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;
|
|
|
|
const-string p3, "Failed to auto-fetch config update."
|
|
|
|
.line 231
|
|
invoke-virtual {p1}, Lcom/google/android/gms/tasks/Task;->getException()Ljava/lang/Exception;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p3, p1}, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 229
|
|
invoke-static {p2}, Lcom/google/android/gms/tasks/Tasks;->forException(Ljava/lang/Exception;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 234
|
|
:cond_0
|
|
invoke-virtual {p2}, Lcom/google/android/gms/tasks/Task;->isSuccessful()Z
|
|
|
|
move-result p6
|
|
|
|
if-nez p6, :cond_1
|
|
|
|
.line 235
|
|
new-instance p1, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;
|
|
|
|
const-string p3, "Failed to get activated config for auto-fetch"
|
|
|
|
.line 238
|
|
invoke-virtual {p2}, Lcom/google/android/gms/tasks/Task;->getException()Ljava/lang/Exception;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigClientException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 235
|
|
invoke-static {p1}, Lcom/google/android/gms/tasks/Tasks;->forException(Ljava/lang/Exception;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 241
|
|
:cond_1
|
|
invoke-virtual {p1}, Lcom/google/android/gms/tasks/Task;->getResult()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;
|
|
|
|
.line 242
|
|
invoke-virtual {p2}, Lcom/google/android/gms/tasks/Task;->getResult()Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
.line 244
|
|
invoke-static {p1, p3, p4}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->fetchResponseIsUpToDate(Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;J)Ljava/lang/Boolean;
|
|
|
|
move-result-object p6
|
|
|
|
invoke-virtual {p6}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p6, :cond_2
|
|
|
|
.line 250
|
|
invoke-virtual {p0, p5, p3, p4}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->autoFetch(IJ)V
|
|
|
|
.line 251
|
|
invoke-static {v0}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 254
|
|
:cond_2
|
|
invoke-virtual {p1}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;->getFetchedConfigs()Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
move-result-object p3
|
|
|
|
if-nez p3, :cond_3
|
|
|
|
.line 256
|
|
invoke-static {v0}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_3
|
|
if-nez p2, :cond_4
|
|
|
|
.line 262
|
|
invoke-static {}, Lcom/google/firebase/remoteconfig/internal/ConfigContainer;->newBuilder()Lcom/google/firebase/remoteconfig/internal/ConfigContainer$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Lcom/google/firebase/remoteconfig/internal/ConfigContainer$Builder;->build()Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
move-result-object p2
|
|
|
|
.line 266
|
|
:cond_4
|
|
invoke-virtual {p1}, Lcom/google/firebase/remoteconfig/internal/ConfigFetchHandler$FetchResponse;->getFetchedConfigs()Lcom/google/firebase/remoteconfig/internal/ConfigContainer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Lcom/google/firebase/remoteconfig/internal/ConfigContainer;->getChangedParams(Lcom/google/firebase/remoteconfig/internal/ConfigContainer;)Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
.line 267
|
|
invoke-interface {p1}, Ljava/util/Set;->isEmpty()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
.line 269
|
|
invoke-static {v0}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 272
|
|
:cond_5
|
|
invoke-static {p1}, Lcom/google/firebase/remoteconfig/ConfigUpdate;->create(Ljava/util/Set;)Lcom/google/firebase/remoteconfig/ConfigUpdate;
|
|
|
|
move-result-object p1
|
|
|
|
.line 273
|
|
invoke-virtual {p0, p1}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->executeAllListenerCallbacks(Lcom/google/firebase/remoteconfig/ConfigUpdate;)V
|
|
|
|
.line 274
|
|
invoke-static {v0}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public listenForNotifications()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->httpURLConnection:Ljava/net/HttpURLConnection;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 109
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
|
|
.line 110
|
|
invoke-virtual {p0, v0}, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->handleNotifications(Ljava/io/InputStream;)V
|
|
|
|
.line 111
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:catch_0
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->httpURLConnection:Ljava/net/HttpURLConnection;
|
|
|
|
.line 116
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
iget-object v1, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->httpURLConnection:Ljava/net/HttpURLConnection;
|
|
|
|
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
|
|
|
|
.line 117
|
|
throw v0
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final parseAndValidateConfigUpdateMessage(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/16 v0, 0x7b
|
|
|
|
.line 91
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x7d
|
|
|
|
.line 92
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->lastIndexOf(I)I
|
|
|
|
move-result v1
|
|
|
|
const-string v2, ""
|
|
|
|
if-ltz v0, :cond_2
|
|
|
|
if-gez v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-lt v0, v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
.line 98
|
|
invoke-virtual {p1, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public final declared-synchronized propagateErrors(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;)V
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/ConfigAutoFetch;->eventListeners:Ljava/util/Set;
|
|
|
|
.line 75
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/firebase/remoteconfig/ConfigUpdateListener;
|
|
|
|
.line 76
|
|
invoke-interface {v1, p1}, Lcom/google/firebase/remoteconfig/ConfigUpdateListener;->onError(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 78
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|