Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_ConfigUpdate extends ConfigUpdate {
|
||||
private final Set<String> updatedKeys;
|
||||
|
||||
public AutoValue_ConfigUpdate(Set<String> set) {
|
||||
if (set == null) {
|
||||
throw new NullPointerException("Null updatedKeys");
|
||||
}
|
||||
this.updatedKeys = set;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof ConfigUpdate) {
|
||||
return this.updatedKeys.equals(((ConfigUpdate) obj).getUpdatedKeys());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdate
|
||||
public Set<String> getUpdatedKeys() {
|
||||
return this.updatedKeys;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.updatedKeys.hashCode() ^ 1000003;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ConfigUpdate{updatedKeys=" + this.updatedKeys + "}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuildConfig {
|
||||
public static final String BUILD_TYPE = "release";
|
||||
public static final boolean DEBUG = false;
|
||||
public static final String LIBRARY_PACKAGE_NAME = "com.google.firebase.remoteconfig";
|
||||
public static final String VERSION_NAME = "21.6.0";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import java.util.Set;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ConfigUpdate {
|
||||
public static ConfigUpdate create(Set<String> set) {
|
||||
return new AutoValue_ConfigUpdate(set);
|
||||
}
|
||||
|
||||
public abstract Set<String> getUpdatedKeys();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConfigUpdateListener {
|
||||
void onError(FirebaseRemoteConfigException firebaseRemoteConfigException);
|
||||
|
||||
void onUpdate(ConfigUpdate configUpdate);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConfigUpdateListenerRegistration {
|
||||
void remove();
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import B0.C0031i;
|
||||
import B0.w;
|
||||
import I2.k;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.abt.AbtException;
|
||||
import com.google.firebase.abt.FirebaseABTesting;
|
||||
import com.google.firebase.concurrent.FirebaseExecutors;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigCacheClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHandler;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigMetadataClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigRealtimeHandler;
|
||||
import com.google.firebase.remoteconfig.internal.DefaultsXmlParser;
|
||||
import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateSubscriptionsHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfig {
|
||||
public static final boolean DEFAULT_VALUE_FOR_BOOLEAN = false;
|
||||
public static final byte[] DEFAULT_VALUE_FOR_BYTE_ARRAY = new byte[0];
|
||||
public static final double DEFAULT_VALUE_FOR_DOUBLE = 0.0d;
|
||||
public static final long DEFAULT_VALUE_FOR_LONG = 0;
|
||||
public static final String DEFAULT_VALUE_FOR_STRING = "";
|
||||
public static final int LAST_FETCH_STATUS_FAILURE = 1;
|
||||
public static final int LAST_FETCH_STATUS_NO_FETCH_YET = 0;
|
||||
public static final int LAST_FETCH_STATUS_SUCCESS = -1;
|
||||
public static final int LAST_FETCH_STATUS_THROTTLED = 2;
|
||||
public static final String TAG = "FirebaseRemoteConfig";
|
||||
public static final int VALUE_SOURCE_DEFAULT = 1;
|
||||
public static final int VALUE_SOURCE_REMOTE = 2;
|
||||
public static final int VALUE_SOURCE_STATIC = 0;
|
||||
private final ConfigCacheClient activatedConfigsCache;
|
||||
private final ConfigRealtimeHandler configRealtimeHandler;
|
||||
private final Context context;
|
||||
private final ConfigCacheClient defaultConfigsCache;
|
||||
private final Executor executor;
|
||||
private final ConfigFetchHandler fetchHandler;
|
||||
private final ConfigCacheClient fetchedConfigsCache;
|
||||
private final FirebaseABTesting firebaseAbt;
|
||||
private final FirebaseApp firebaseApp;
|
||||
private final FirebaseInstallationsApi firebaseInstallations;
|
||||
private final ConfigMetadataClient frcMetadata;
|
||||
private final ConfigGetParameterHandler getHandler;
|
||||
private final RolloutsStateSubscriptionsHandler rolloutsStateSubscriptionsHandler;
|
||||
|
||||
public FirebaseRemoteConfig(Context context, FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, FirebaseABTesting firebaseABTesting, Executor executor, ConfigCacheClient configCacheClient, ConfigCacheClient configCacheClient2, ConfigCacheClient configCacheClient3, ConfigFetchHandler configFetchHandler, ConfigGetParameterHandler configGetParameterHandler, ConfigMetadataClient configMetadataClient, ConfigRealtimeHandler configRealtimeHandler, RolloutsStateSubscriptionsHandler rolloutsStateSubscriptionsHandler) {
|
||||
this.context = context;
|
||||
this.firebaseApp = firebaseApp;
|
||||
this.firebaseInstallations = firebaseInstallationsApi;
|
||||
this.firebaseAbt = firebaseABTesting;
|
||||
this.executor = executor;
|
||||
this.fetchedConfigsCache = configCacheClient;
|
||||
this.activatedConfigsCache = configCacheClient2;
|
||||
this.defaultConfigsCache = configCacheClient3;
|
||||
this.fetchHandler = configFetchHandler;
|
||||
this.getHandler = configGetParameterHandler;
|
||||
this.frcMetadata = configMetadataClient;
|
||||
this.configRealtimeHandler = configRealtimeHandler;
|
||||
this.rolloutsStateSubscriptionsHandler = rolloutsStateSubscriptionsHandler;
|
||||
}
|
||||
|
||||
public static FirebaseRemoteConfig getInstance() {
|
||||
return getInstance(FirebaseApp.getInstance());
|
||||
}
|
||||
|
||||
private static boolean isFetchedFresh(ConfigContainer configContainer, ConfigContainer configContainer2) {
|
||||
return configContainer2 == null || !configContainer.getFetchTime().equals(configContainer2.getFetchTime());
|
||||
}
|
||||
|
||||
public /* synthetic */ Task lambda$activate$2(Task task, Task task2, Task task3) throws Exception {
|
||||
if (!task.isSuccessful() || task.getResult() == null) {
|
||||
return Tasks.forResult(Boolean.FALSE);
|
||||
}
|
||||
ConfigContainer configContainer = (ConfigContainer) task.getResult();
|
||||
return (!task2.isSuccessful() || isFetchedFresh(configContainer, (ConfigContainer) task2.getResult())) ? this.activatedConfigsCache.put(configContainer).continueWith(this.executor, new a(this)) : Tasks.forResult(Boolean.FALSE);
|
||||
}
|
||||
|
||||
public static /* synthetic */ FirebaseRemoteConfigInfo lambda$ensureInitialized$0(Task task, Task task2) throws Exception {
|
||||
return (FirebaseRemoteConfigInfo) task.getResult();
|
||||
}
|
||||
|
||||
public static /* synthetic */ Task lambda$fetch$3(ConfigFetchHandler.FetchResponse fetchResponse) throws Exception {
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ Task lambda$fetch$4(ConfigFetchHandler.FetchResponse fetchResponse) throws Exception {
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
|
||||
public /* synthetic */ Task lambda$fetchAndActivate$1(Void r12) throws Exception {
|
||||
return activate();
|
||||
}
|
||||
|
||||
public /* synthetic */ Void lambda$reset$6() throws Exception {
|
||||
this.activatedConfigsCache.clear();
|
||||
this.fetchedConfigsCache.clear();
|
||||
this.defaultConfigsCache.clear();
|
||||
this.frcMetadata.clear();
|
||||
return null;
|
||||
}
|
||||
|
||||
public /* synthetic */ Void lambda$setConfigSettingsAsync$5(FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) throws Exception {
|
||||
this.frcMetadata.setConfigSettings(firebaseRemoteConfigSettings);
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* synthetic */ Task lambda$setDefaultsWithStringsMapAsync$7(ConfigContainer configContainer) throws Exception {
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
|
||||
public boolean processActivatePutTask(Task<ConfigContainer> task) {
|
||||
if (!task.isSuccessful()) {
|
||||
return false;
|
||||
}
|
||||
this.fetchedConfigsCache.clear();
|
||||
ConfigContainer result = task.getResult();
|
||||
if (result == null) {
|
||||
Log.e(TAG, "Activated configs written to disk are null.");
|
||||
return true;
|
||||
}
|
||||
updateAbtWithActivatedExperiments(result.getAbtExperiments());
|
||||
this.rolloutsStateSubscriptionsHandler.publishActiveRolloutsState(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
private Task<Void> setDefaultsWithStringsMapAsync(Map<String, String> map) {
|
||||
try {
|
||||
return this.defaultConfigsCache.put(ConfigContainer.newBuilder().replaceConfigsWith(map).build()).onSuccessTask(FirebaseExecutors.directExecutor(), new w(17));
|
||||
} catch (JSONException e4) {
|
||||
Log.e(TAG, "The provided defaults map could not be processed.", e4);
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Map<String, String>> toExperimentInfoMaps(JSONArray jSONArray) throws JSONException {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (int i = 0; i < jSONArray.length(); i++) {
|
||||
HashMap hashMap = new HashMap();
|
||||
JSONObject jSONObject = jSONArray.getJSONObject(i);
|
||||
Iterator<String> keys = jSONObject.keys();
|
||||
while (keys.hasNext()) {
|
||||
String next = keys.next();
|
||||
hashMap.put(next, jSONObject.getString(next));
|
||||
}
|
||||
arrayList.add(hashMap);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public Task<Boolean> activate() {
|
||||
Task<ConfigContainer> task = this.fetchedConfigsCache.get();
|
||||
Task<ConfigContainer> task2 = this.activatedConfigsCache.get();
|
||||
return Tasks.whenAllComplete((Task<?>[]) new Task[]{task, task2}).continueWithTask(this.executor, new C0031i(this, task, task2, 2));
|
||||
}
|
||||
|
||||
public ConfigUpdateListenerRegistration addOnConfigUpdateListener(ConfigUpdateListener configUpdateListener) {
|
||||
return this.configRealtimeHandler.addRealtimeConfigUpdateListener(configUpdateListener);
|
||||
}
|
||||
|
||||
public Task<FirebaseRemoteConfigInfo> ensureInitialized() {
|
||||
Task<ConfigContainer> task = this.activatedConfigsCache.get();
|
||||
Task<ConfigContainer> task2 = this.defaultConfigsCache.get();
|
||||
Task<ConfigContainer> task3 = this.fetchedConfigsCache.get();
|
||||
Task call = Tasks.call(this.executor, new b(this, 1));
|
||||
return Tasks.whenAllComplete((Task<?>[]) new Task[]{task, task2, task3, call, this.firebaseInstallations.getId(), this.firebaseInstallations.getToken(false)}).continueWith(this.executor, new k(call, 19));
|
||||
}
|
||||
|
||||
public Task<Void> fetch() {
|
||||
return this.fetchHandler.fetch().onSuccessTask(FirebaseExecutors.directExecutor(), new w(19));
|
||||
}
|
||||
|
||||
public Task<Boolean> fetchAndActivate() {
|
||||
return fetch().onSuccessTask(this.executor, new a(this));
|
||||
}
|
||||
|
||||
public Map<String, FirebaseRemoteConfigValue> getAll() {
|
||||
return this.getHandler.getAll();
|
||||
}
|
||||
|
||||
public boolean getBoolean(String str) {
|
||||
return this.getHandler.getBoolean(str);
|
||||
}
|
||||
|
||||
public double getDouble(String str) {
|
||||
return this.getHandler.getDouble(str);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigInfo getInfo() {
|
||||
return this.frcMetadata.getInfo();
|
||||
}
|
||||
|
||||
public Set<String> getKeysByPrefix(String str) {
|
||||
return this.getHandler.getKeysByPrefix(str);
|
||||
}
|
||||
|
||||
public long getLong(String str) {
|
||||
return this.getHandler.getLong(str);
|
||||
}
|
||||
|
||||
public RolloutsStateSubscriptionsHandler getRolloutsStateSubscriptionsHandler() {
|
||||
return this.rolloutsStateSubscriptionsHandler;
|
||||
}
|
||||
|
||||
public String getString(String str) {
|
||||
return this.getHandler.getString(str);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigValue getValue(String str) {
|
||||
return this.getHandler.getValue(str);
|
||||
}
|
||||
|
||||
public Task<Void> reset() {
|
||||
return Tasks.call(this.executor, new b(this, 0));
|
||||
}
|
||||
|
||||
public void schedule(Runnable runnable) {
|
||||
this.executor.execute(runnable);
|
||||
}
|
||||
|
||||
public Task<Void> setConfigSettingsAsync(FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) {
|
||||
return Tasks.call(this.executor, new com.google.firebase.crashlytics.internal.metadata.a(1, this, firebaseRemoteConfigSettings));
|
||||
}
|
||||
|
||||
public void setConfigUpdateBackgroundState(boolean z3) {
|
||||
this.configRealtimeHandler.setBackgroundState(z3);
|
||||
}
|
||||
|
||||
public Task<Void> setDefaultsAsync(Map<String, Object> map) {
|
||||
HashMap hashMap = new HashMap();
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof byte[]) {
|
||||
hashMap.put(entry.getKey(), new String((byte[]) value));
|
||||
} else {
|
||||
hashMap.put(entry.getKey(), value.toString());
|
||||
}
|
||||
}
|
||||
return setDefaultsWithStringsMapAsync(hashMap);
|
||||
}
|
||||
|
||||
public void startLoadingConfigsFromDisk() {
|
||||
this.activatedConfigsCache.get();
|
||||
this.defaultConfigsCache.get();
|
||||
this.fetchedConfigsCache.get();
|
||||
}
|
||||
|
||||
public void updateAbtWithActivatedExperiments(JSONArray jSONArray) {
|
||||
if (this.firebaseAbt == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
this.firebaseAbt.replaceAllExperiments(toExperimentInfoMaps(jSONArray));
|
||||
} catch (AbtException e4) {
|
||||
Log.w(TAG, "Could not update ABT experiments.", e4);
|
||||
} catch (JSONException e5) {
|
||||
Log.e(TAG, "Could not parse ABT experiments from the JSON response.", e5);
|
||||
}
|
||||
}
|
||||
|
||||
public static FirebaseRemoteConfig getInstance(FirebaseApp firebaseApp) {
|
||||
return ((RemoteConfigComponent) firebaseApp.get(RemoteConfigComponent.class)).getDefault();
|
||||
}
|
||||
|
||||
public Task<Void> fetch(long j4) {
|
||||
return this.fetchHandler.fetch(j4).onSuccessTask(FirebaseExecutors.directExecutor(), new w(18));
|
||||
}
|
||||
|
||||
public Task<Void> setDefaultsAsync(int i) {
|
||||
return setDefaultsWithStringsMapAsync(DefaultsXmlParser.getDefaultsFromXml(this.context, i));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigClientException extends FirebaseRemoteConfigException {
|
||||
public FirebaseRemoteConfigClientException(String str) {
|
||||
super(str);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigClientException(String str, Throwable th) {
|
||||
super(str, th);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigClientException(String str, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, code);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigClientException(String str, Throwable th, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, th, code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.FirebaseException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigException extends FirebaseException {
|
||||
private final Code code;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum Code {
|
||||
UNKNOWN(0),
|
||||
CONFIG_UPDATE_STREAM_ERROR(1),
|
||||
CONFIG_UPDATE_MESSAGE_INVALID(2),
|
||||
CONFIG_UPDATE_NOT_FETCHED(3),
|
||||
CONFIG_UPDATE_UNAVAILABLE(4);
|
||||
|
||||
private final int value;
|
||||
|
||||
Code(int i) {
|
||||
this.value = i;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigException(String str) {
|
||||
super(str);
|
||||
this.code = Code.UNKNOWN;
|
||||
}
|
||||
|
||||
public Code getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigException(String str, Throwable th) {
|
||||
super(str, th);
|
||||
this.code = Code.UNKNOWN;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigException(String str, Code code) {
|
||||
super(str);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigException(String str, Throwable th, Code code) {
|
||||
super(str, th);
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigFetchThrottledException extends FirebaseRemoteConfigException {
|
||||
private final long throttleEndTimeMillis;
|
||||
|
||||
public FirebaseRemoteConfigFetchThrottledException(long j4) {
|
||||
this("Fetch was throttled.", j4);
|
||||
}
|
||||
|
||||
public long getThrottleEndTimeMillis() {
|
||||
return this.throttleEndTimeMillis;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigFetchThrottledException(String str, long j4) {
|
||||
super(str);
|
||||
this.throttleEndTimeMillis = j4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FirebaseRemoteConfigInfo {
|
||||
FirebaseRemoteConfigSettings getConfigSettings();
|
||||
|
||||
long getFetchTimeMillis();
|
||||
|
||||
int getLastFetchStatus();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.firebase.components.Component;
|
||||
import com.google.firebase.components.ComponentRegistrar;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
|
||||
@Keep
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u00050\u0004H\u0016¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigKtxRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "com.google.firebase-firebase-config"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FirebaseRemoteConfigKtxRegistrar implements ComponentRegistrar {
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigServerException extends FirebaseRemoteConfigException {
|
||||
private final int httpStatusCode;
|
||||
|
||||
public FirebaseRemoteConfigServerException(int i, String str) {
|
||||
super(str);
|
||||
this.httpStatusCode = i;
|
||||
}
|
||||
|
||||
public int getHttpStatusCode() {
|
||||
return this.httpStatusCode;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigServerException(int i, String str, Throwable th) {
|
||||
super(str, th);
|
||||
this.httpStatusCode = i;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigServerException(String str, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, code);
|
||||
this.httpStatusCode = -1;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigServerException(int i, String str, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, code);
|
||||
this.httpStatusCode = i;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigServerException(String str, Throwable th, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, th, code);
|
||||
this.httpStatusCode = -1;
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigServerException(int i, String str, Throwable th, FirebaseRemoteConfigException.Code code) {
|
||||
super(str, th, code);
|
||||
this.httpStatusCode = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHandler;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigSettings {
|
||||
private final long fetchTimeoutInSeconds;
|
||||
private final long minimumFetchInterval;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private long fetchTimeoutInSeconds = 60;
|
||||
private long minimumFetchInterval = ConfigFetchHandler.DEFAULT_MINIMUM_FETCH_INTERVAL_IN_SECONDS;
|
||||
|
||||
public FirebaseRemoteConfigSettings build() {
|
||||
return new FirebaseRemoteConfigSettings(this);
|
||||
}
|
||||
|
||||
public long getFetchTimeoutInSeconds() {
|
||||
return this.fetchTimeoutInSeconds;
|
||||
}
|
||||
|
||||
public long getMinimumFetchIntervalInSeconds() {
|
||||
return this.minimumFetchInterval;
|
||||
}
|
||||
|
||||
public Builder setFetchTimeoutInSeconds(long j4) throws IllegalArgumentException {
|
||||
if (j4 < 0) {
|
||||
throw new IllegalArgumentException(String.format("Fetch connection timeout has to be a non-negative number. %d is an invalid argument", Long.valueOf(j4)));
|
||||
}
|
||||
this.fetchTimeoutInSeconds = j4;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMinimumFetchIntervalInSeconds(long j4) {
|
||||
if (j4 >= 0) {
|
||||
this.minimumFetchInterval = j4;
|
||||
return this;
|
||||
}
|
||||
throw new IllegalArgumentException("Minimum interval between fetches has to be a non-negative number. " + j4 + " is an invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public long getFetchTimeoutInSeconds() {
|
||||
return this.fetchTimeoutInSeconds;
|
||||
}
|
||||
|
||||
public long getMinimumFetchIntervalInSeconds() {
|
||||
return this.minimumFetchInterval;
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
Builder builder = new Builder();
|
||||
builder.setFetchTimeoutInSeconds(getFetchTimeoutInSeconds());
|
||||
builder.setMinimumFetchIntervalInSeconds(getMinimumFetchIntervalInSeconds());
|
||||
return builder;
|
||||
}
|
||||
|
||||
private FirebaseRemoteConfigSettings(Builder builder) {
|
||||
this.fetchTimeoutInSeconds = builder.fetchTimeoutInSeconds;
|
||||
this.minimumFetchInterval = builder.minimumFetchInterval;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FirebaseRemoteConfigValue {
|
||||
boolean asBoolean() throws IllegalArgumentException;
|
||||
|
||||
byte[] asByteArray();
|
||||
|
||||
double asDouble() throws IllegalArgumentException;
|
||||
|
||||
long asLong() throws IllegalArgumentException;
|
||||
|
||||
String asString();
|
||||
|
||||
int getSource();
|
||||
}
|
||||
290
apk_decompiled/sources/com/google/firebase/remoteconfig/R.java
Normal file
290
apk_decompiled/sources/com/google/firebase/remoteconfig/R.java
Normal file
@@ -0,0 +1,290 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class attr {
|
||||
public static final int alpha = 0x7f030031;
|
||||
public static final int coordinatorLayoutStyle = 0x7f03016c;
|
||||
public static final int font = 0x7f03022d;
|
||||
public static final int fontProviderAuthority = 0x7f03022f;
|
||||
public static final int fontProviderCerts = 0x7f030230;
|
||||
public static final int fontProviderFetchStrategy = 0x7f030231;
|
||||
public static final int fontProviderFetchTimeout = 0x7f030232;
|
||||
public static final int fontProviderPackage = 0x7f030233;
|
||||
public static final int fontProviderQuery = 0x7f030234;
|
||||
public static final int fontStyle = 0x7f030236;
|
||||
public static final int fontVariationSettings = 0x7f030237;
|
||||
public static final int fontWeight = 0x7f030238;
|
||||
public static final int keylines = 0x7f0302b5;
|
||||
public static final int layout_anchor = 0x7f0302c6;
|
||||
public static final int layout_anchorGravity = 0x7f0302c7;
|
||||
public static final int layout_behavior = 0x7f0302c9;
|
||||
public static final int layout_dodgeInsetEdges = 0x7f0302fa;
|
||||
public static final int layout_insetEdge = 0x7f030305;
|
||||
public static final int layout_keyline = 0x7f030306;
|
||||
public static final int statusBarBackground = 0x7f030488;
|
||||
public static final int ttcIndex = 0x7f030559;
|
||||
|
||||
private attr() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class color {
|
||||
public static final int notification_action_color_filter = 0x7f050315;
|
||||
public static final int notification_icon_bg_color = 0x7f050316;
|
||||
public static final int ripple_material_light = 0x7f050322;
|
||||
public static final int secondary_text_default_material_light = 0x7f050324;
|
||||
|
||||
private color() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class dimen {
|
||||
public static final int compat_button_inset_horizontal_material = 0x7f06006d;
|
||||
public static final int compat_button_inset_vertical_material = 0x7f06006e;
|
||||
public static final int compat_button_padding_horizontal_material = 0x7f06006f;
|
||||
public static final int compat_button_padding_vertical_material = 0x7f060070;
|
||||
public static final int compat_control_corner_material = 0x7f060071;
|
||||
public static final int compat_notification_large_icon_max_height = 0x7f060072;
|
||||
public static final int compat_notification_large_icon_max_width = 0x7f060073;
|
||||
public static final int notification_action_icon_size = 0x7f060385;
|
||||
public static final int notification_action_text_size = 0x7f060386;
|
||||
public static final int notification_big_circle_margin = 0x7f060387;
|
||||
public static final int notification_content_margin_start = 0x7f060388;
|
||||
public static final int notification_large_icon_height = 0x7f06038d;
|
||||
public static final int notification_large_icon_width = 0x7f06038e;
|
||||
public static final int notification_main_column_padding_top = 0x7f06038f;
|
||||
public static final int notification_media_narrow_margin = 0x7f060391;
|
||||
public static final int notification_right_icon_size = 0x7f060393;
|
||||
public static final int notification_right_side_padding_top = 0x7f060394;
|
||||
public static final int notification_small_icon_background_padding = 0x7f060395;
|
||||
public static final int notification_small_icon_size_as_large = 0x7f060396;
|
||||
public static final int notification_subtext_size = 0x7f060397;
|
||||
public static final int notification_top_pad = 0x7f06039b;
|
||||
public static final int notification_top_pad_large_text = 0x7f06039c;
|
||||
|
||||
private dimen() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class drawable {
|
||||
public static final int notification_action_background = 0x7f070181;
|
||||
public static final int notification_bg = 0x7f070182;
|
||||
public static final int notification_bg_low = 0x7f070183;
|
||||
public static final int notification_bg_low_normal = 0x7f070184;
|
||||
public static final int notification_bg_low_pressed = 0x7f070185;
|
||||
public static final int notification_bg_normal = 0x7f070186;
|
||||
public static final int notification_bg_normal_pressed = 0x7f070187;
|
||||
public static final int notification_icon_background = 0x7f070188;
|
||||
public static final int notification_template_icon_bg = 0x7f07018a;
|
||||
public static final int notification_template_icon_low_bg = 0x7f07018b;
|
||||
public static final int notification_tile_bg = 0x7f07018c;
|
||||
public static final int notify_panel_notification_icon_bg = 0x7f07018d;
|
||||
|
||||
private drawable() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class id {
|
||||
public static final int accessibility_action_clickable_span = 0x7f090013;
|
||||
public static final int accessibility_custom_action_0 = 0x7f090014;
|
||||
public static final int accessibility_custom_action_1 = 0x7f090015;
|
||||
public static final int accessibility_custom_action_10 = 0x7f090016;
|
||||
public static final int accessibility_custom_action_11 = 0x7f090017;
|
||||
public static final int accessibility_custom_action_12 = 0x7f090018;
|
||||
public static final int accessibility_custom_action_13 = 0x7f090019;
|
||||
public static final int accessibility_custom_action_14 = 0x7f09001a;
|
||||
public static final int accessibility_custom_action_15 = 0x7f09001b;
|
||||
public static final int accessibility_custom_action_16 = 0x7f09001c;
|
||||
public static final int accessibility_custom_action_17 = 0x7f09001d;
|
||||
public static final int accessibility_custom_action_18 = 0x7f09001e;
|
||||
public static final int accessibility_custom_action_19 = 0x7f09001f;
|
||||
public static final int accessibility_custom_action_2 = 0x7f090020;
|
||||
public static final int accessibility_custom_action_20 = 0x7f090021;
|
||||
public static final int accessibility_custom_action_21 = 0x7f090022;
|
||||
public static final int accessibility_custom_action_22 = 0x7f090023;
|
||||
public static final int accessibility_custom_action_23 = 0x7f090024;
|
||||
public static final int accessibility_custom_action_24 = 0x7f090025;
|
||||
public static final int accessibility_custom_action_25 = 0x7f090026;
|
||||
public static final int accessibility_custom_action_26 = 0x7f090027;
|
||||
public static final int accessibility_custom_action_27 = 0x7f090028;
|
||||
public static final int accessibility_custom_action_28 = 0x7f090029;
|
||||
public static final int accessibility_custom_action_29 = 0x7f09002a;
|
||||
public static final int accessibility_custom_action_3 = 0x7f09002b;
|
||||
public static final int accessibility_custom_action_30 = 0x7f09002c;
|
||||
public static final int accessibility_custom_action_31 = 0x7f09002d;
|
||||
public static final int accessibility_custom_action_4 = 0x7f09002e;
|
||||
public static final int accessibility_custom_action_5 = 0x7f09002f;
|
||||
public static final int accessibility_custom_action_6 = 0x7f090030;
|
||||
public static final int accessibility_custom_action_7 = 0x7f090031;
|
||||
public static final int accessibility_custom_action_8 = 0x7f090032;
|
||||
public static final int accessibility_custom_action_9 = 0x7f090033;
|
||||
public static final int action_container = 0x7f090045;
|
||||
public static final int action_divider = 0x7f090048;
|
||||
public static final int action_image = 0x7f09004a;
|
||||
public static final int action_text = 0x7f090051;
|
||||
public static final int actions = 0x7f090052;
|
||||
public static final int async = 0x7f090071;
|
||||
public static final int blocking = 0x7f090082;
|
||||
public static final int bottom = 0x7f090083;
|
||||
public static final int chronometer = 0x7f0900a9;
|
||||
public static final int dialog_button = 0x7f09010b;
|
||||
public static final int end = 0x7f090133;
|
||||
public static final int forever = 0x7f090152;
|
||||
public static final int icon = 0x7f090195;
|
||||
public static final int icon_group = 0x7f090196;
|
||||
public static final int info = 0x7f0901a9;
|
||||
public static final int italic = 0x7f0901be;
|
||||
public static final int left = 0x7f0901e2;
|
||||
public static final int line1 = 0x7f0901e9;
|
||||
public static final int line3 = 0x7f0901ea;
|
||||
public static final int none = 0x7f090264;
|
||||
public static final int normal = 0x7f090265;
|
||||
public static final int notification_background = 0x7f090269;
|
||||
public static final int notification_main_column = 0x7f09026a;
|
||||
public static final int notification_main_column_container = 0x7f09026b;
|
||||
public static final int right = 0x7f0902cd;
|
||||
public static final int right_icon = 0x7f0902cf;
|
||||
public static final int right_side = 0x7f0902d0;
|
||||
public static final int start = 0x7f090322;
|
||||
public static final int tag_accessibility_actions = 0x7f09035c;
|
||||
public static final int tag_accessibility_clickable_spans = 0x7f09035d;
|
||||
public static final int tag_accessibility_heading = 0x7f09035e;
|
||||
public static final int tag_accessibility_pane_title = 0x7f09035f;
|
||||
public static final int tag_screen_reader_focusable = 0x7f090363;
|
||||
public static final int tag_transition_group = 0x7f090365;
|
||||
public static final int tag_unhandled_key_event_manager = 0x7f090366;
|
||||
public static final int tag_unhandled_key_listeners = 0x7f090367;
|
||||
public static final int text = 0x7f09036d;
|
||||
public static final int text2 = 0x7f09036e;
|
||||
public static final int time = 0x7f09038e;
|
||||
public static final int title = 0x7f090393;
|
||||
public static final int top = 0x7f0903ac;
|
||||
|
||||
private id() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class integer {
|
||||
public static final int google_play_services_version = 0x7f0a0009;
|
||||
public static final int status_bar_notification_info_maxnum = 0x7f0a0045;
|
||||
|
||||
private integer() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class layout {
|
||||
public static final int custom_dialog = 0x7f0c0026;
|
||||
public static final int notification_action = 0x7f0c00a8;
|
||||
public static final int notification_action_tombstone = 0x7f0c00a9;
|
||||
public static final int notification_template_custom_big = 0x7f0c00aa;
|
||||
public static final int notification_template_icon_group = 0x7f0c00ab;
|
||||
public static final int notification_template_part_chronometer = 0x7f0c00ac;
|
||||
public static final int notification_template_part_time = 0x7f0c00ad;
|
||||
|
||||
private layout() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class raw {
|
||||
public static final int firebase_common_keep = 0x7f120000;
|
||||
|
||||
private raw() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class string {
|
||||
public static final int common_google_play_services_unknown_issue = 0x7f1300bc;
|
||||
public static final int status_bar_notification_info_overflow = 0x7f13023b;
|
||||
|
||||
private string() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class style {
|
||||
public static final int TextAppearance_Compat_Notification = 0x7f1401fb;
|
||||
public static final int TextAppearance_Compat_Notification_Info = 0x7f1401fc;
|
||||
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f1401fd;
|
||||
public static final int TextAppearance_Compat_Notification_Time = 0x7f1401fe;
|
||||
public static final int TextAppearance_Compat_Notification_Title = 0x7f1401ff;
|
||||
public static final int Widget_Compat_NotificationActionContainer = 0x7f1403a1;
|
||||
public static final int Widget_Compat_NotificationActionText = 0x7f1403a2;
|
||||
public static final int Widget_Support_CoordinatorLayout = 0x7f1404d7;
|
||||
|
||||
private style() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class styleable {
|
||||
public static final int ColorStateListItem_alpha = 0x00000003;
|
||||
public static final int ColorStateListItem_android_alpha = 0x00000001;
|
||||
public static final int ColorStateListItem_android_color = 0x00000000;
|
||||
public static final int ColorStateListItem_android_lStar = 0x00000002;
|
||||
public static final int ColorStateListItem_lStar = 0x00000004;
|
||||
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0x00000000;
|
||||
public static final int CoordinatorLayout_Layout_layout_anchor = 0x00000001;
|
||||
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 0x00000002;
|
||||
public static final int CoordinatorLayout_Layout_layout_behavior = 0x00000003;
|
||||
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 0x00000004;
|
||||
public static final int CoordinatorLayout_Layout_layout_insetEdge = 0x00000005;
|
||||
public static final int CoordinatorLayout_Layout_layout_keyline = 0x00000006;
|
||||
public static final int CoordinatorLayout_keylines = 0x00000000;
|
||||
public static final int CoordinatorLayout_statusBarBackground = 0x00000001;
|
||||
public static final int FontFamilyFont_android_font = 0x00000000;
|
||||
public static final int FontFamilyFont_android_fontStyle = 0x00000002;
|
||||
public static final int FontFamilyFont_android_fontVariationSettings = 0x00000004;
|
||||
public static final int FontFamilyFont_android_fontWeight = 0x00000001;
|
||||
public static final int FontFamilyFont_android_ttcIndex = 0x00000003;
|
||||
public static final int FontFamilyFont_font = 0x00000005;
|
||||
public static final int FontFamilyFont_fontStyle = 0x00000006;
|
||||
public static final int FontFamilyFont_fontVariationSettings = 0x00000007;
|
||||
public static final int FontFamilyFont_fontWeight = 0x00000008;
|
||||
public static final int FontFamilyFont_ttcIndex = 0x00000009;
|
||||
public static final int FontFamily_fontProviderAuthority = 0x00000000;
|
||||
public static final int FontFamily_fontProviderCerts = 0x00000001;
|
||||
public static final int FontFamily_fontProviderFetchStrategy = 0x00000002;
|
||||
public static final int FontFamily_fontProviderFetchTimeout = 0x00000003;
|
||||
public static final int FontFamily_fontProviderPackage = 0x00000004;
|
||||
public static final int FontFamily_fontProviderQuery = 0x00000005;
|
||||
public static final int FontFamily_fontProviderSystemFontFamily = 0x00000006;
|
||||
public static final int GradientColorItem_android_color = 0x00000000;
|
||||
public static final int GradientColorItem_android_offset = 0x00000001;
|
||||
public static final int GradientColor_android_centerColor = 0x00000007;
|
||||
public static final int GradientColor_android_centerX = 0x00000003;
|
||||
public static final int GradientColor_android_centerY = 0x00000004;
|
||||
public static final int GradientColor_android_endColor = 0x00000001;
|
||||
public static final int GradientColor_android_endX = 0x0000000a;
|
||||
public static final int GradientColor_android_endY = 0x0000000b;
|
||||
public static final int GradientColor_android_gradientRadius = 0x00000005;
|
||||
public static final int GradientColor_android_startColor = 0x00000000;
|
||||
public static final int GradientColor_android_startX = 0x00000008;
|
||||
public static final int GradientColor_android_startY = 0x00000009;
|
||||
public static final int GradientColor_android_tileMode = 0x00000006;
|
||||
public static final int GradientColor_android_type = 0x00000002;
|
||||
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, 16844359, com.adif.elcanomovil.R.attr.alpha, com.adif.elcanomovil.R.attr.lStar};
|
||||
public static final int[] CoordinatorLayout = {com.adif.elcanomovil.R.attr.keylines, com.adif.elcanomovil.R.attr.statusBarBackground};
|
||||
public static final int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, com.adif.elcanomovil.R.attr.layout_anchor, com.adif.elcanomovil.R.attr.layout_anchorGravity, com.adif.elcanomovil.R.attr.layout_behavior, com.adif.elcanomovil.R.attr.layout_dodgeInsetEdges, com.adif.elcanomovil.R.attr.layout_insetEdge, com.adif.elcanomovil.R.attr.layout_keyline};
|
||||
public static final int[] FontFamily = {com.adif.elcanomovil.R.attr.fontProviderAuthority, com.adif.elcanomovil.R.attr.fontProviderCerts, com.adif.elcanomovil.R.attr.fontProviderFetchStrategy, com.adif.elcanomovil.R.attr.fontProviderFetchTimeout, com.adif.elcanomovil.R.attr.fontProviderPackage, com.adif.elcanomovil.R.attr.fontProviderQuery, com.adif.elcanomovil.R.attr.fontProviderSystemFontFamily};
|
||||
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.font, com.adif.elcanomovil.R.attr.fontStyle, com.adif.elcanomovil.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.fontWeight, com.adif.elcanomovil.R.attr.ttcIndex};
|
||||
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
|
||||
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
|
||||
|
||||
private styleable() {
|
||||
}
|
||||
}
|
||||
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,259 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import C.w;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.internal.BackgroundDetector;
|
||||
import com.google.android.gms.common.util.BiConsumer;
|
||||
import com.google.android.gms.common.util.Clock;
|
||||
import com.google.android.gms.common.util.DefaultClock;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.abt.FirebaseABTesting;
|
||||
import com.google.firebase.analytics.connector.AnalyticsConnector;
|
||||
import com.google.firebase.annotations.concurrent.Blocking;
|
||||
import com.google.firebase.concurrent.g;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigCacheClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHandler;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHttpClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigMetadataClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigRealtimeHandler;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigStorageClient;
|
||||
import com.google.firebase.remoteconfig.internal.Personalization;
|
||||
import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateFactory;
|
||||
import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateSubscriptionsHandler;
|
||||
import com.google.firebase.remoteconfig.interop.FirebaseRemoteConfigInterop;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsStateSubscriber;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class RemoteConfigComponent implements FirebaseRemoteConfigInterop {
|
||||
public static final String ACTIVATE_FILE_NAME = "activate";
|
||||
public static final long CONNECTION_TIMEOUT_IN_SECONDS = 60;
|
||||
public static final String DEFAULTS_FILE_NAME = "defaults";
|
||||
public static final String DEFAULT_NAMESPACE = "firebase";
|
||||
public static final String FETCH_FILE_NAME = "fetch";
|
||||
private static final String FIREBASE_REMOTE_CONFIG_FILE_NAME_PREFIX = "frc";
|
||||
private static final String PREFERENCES_FILE_NAME = "settings";
|
||||
private final Provider<AnalyticsConnector> analyticsConnector;
|
||||
private final String appId;
|
||||
private final Context context;
|
||||
private Map<String, String> customHeaders;
|
||||
private final ScheduledExecutorService executor;
|
||||
private final FirebaseABTesting firebaseAbt;
|
||||
private final FirebaseApp firebaseApp;
|
||||
private final FirebaseInstallationsApi firebaseInstallations;
|
||||
private final Map<String, FirebaseRemoteConfig> frcNamespaceInstances;
|
||||
private static final Clock DEFAULT_CLOCK = DefaultClock.getInstance();
|
||||
private static final Random DEFAULT_RANDOM = new Random();
|
||||
private static final Map<String, FirebaseRemoteConfig> frcNamespaceInstancesStatic = new HashMap();
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class GlobalBackgroundListener implements BackgroundDetector.BackgroundStateChangeListener {
|
||||
private static final AtomicReference<GlobalBackgroundListener> INSTANCE = new AtomicReference<>();
|
||||
|
||||
private GlobalBackgroundListener() {
|
||||
}
|
||||
|
||||
public static void ensureBackgroundListenerIsRegistered(Context context) {
|
||||
Application application = (Application) context.getApplicationContext();
|
||||
AtomicReference<GlobalBackgroundListener> atomicReference = INSTANCE;
|
||||
if (atomicReference.get() == null) {
|
||||
GlobalBackgroundListener globalBackgroundListener = new GlobalBackgroundListener();
|
||||
while (!atomicReference.compareAndSet(null, globalBackgroundListener)) {
|
||||
if (atomicReference.get() != null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
BackgroundDetector.initialize(application);
|
||||
BackgroundDetector.getInstance().addListener(globalBackgroundListener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BackgroundDetector.BackgroundStateChangeListener
|
||||
public void onBackgroundStateChanged(boolean z3) {
|
||||
RemoteConfigComponent.notifyRCInstances(z3);
|
||||
}
|
||||
}
|
||||
|
||||
public RemoteConfigComponent(Context context, @Blocking ScheduledExecutorService scheduledExecutorService, FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, FirebaseABTesting firebaseABTesting, Provider<AnalyticsConnector> provider) {
|
||||
this(context, scheduledExecutorService, firebaseApp, firebaseInstallationsApi, firebaseABTesting, provider, true);
|
||||
}
|
||||
|
||||
private ConfigCacheClient getCacheClient(String str, String str2) {
|
||||
String str3 = this.appId;
|
||||
StringBuilder sb = new StringBuilder("frc_");
|
||||
sb.append(str3);
|
||||
sb.append("_");
|
||||
sb.append(str);
|
||||
sb.append("_");
|
||||
return ConfigCacheClient.getInstance(this.executor, ConfigStorageClient.getInstance(this.context, w.r(sb, str2, ".json")));
|
||||
}
|
||||
|
||||
private ConfigGetParameterHandler getGetHandler(ConfigCacheClient configCacheClient, ConfigCacheClient configCacheClient2) {
|
||||
return new ConfigGetParameterHandler(this.executor, configCacheClient, configCacheClient2);
|
||||
}
|
||||
|
||||
public static ConfigMetadataClient getMetadataClient(Context context, String str, String str2) {
|
||||
return new ConfigMetadataClient(context.getSharedPreferences("frc_" + str + "_" + str2 + "_settings", 0));
|
||||
}
|
||||
|
||||
private static Personalization getPersonalization(FirebaseApp firebaseApp, String str, Provider<AnalyticsConnector> provider) {
|
||||
if (isPrimaryApp(firebaseApp) && str.equals(DEFAULT_NAMESPACE)) {
|
||||
return new Personalization(provider);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private RolloutsStateSubscriptionsHandler getRolloutsStateSubscriptionsHandler(ConfigCacheClient configCacheClient, ConfigGetParameterHandler configGetParameterHandler) {
|
||||
return new RolloutsStateSubscriptionsHandler(configCacheClient, RolloutsStateFactory.create(configGetParameterHandler), this.executor);
|
||||
}
|
||||
|
||||
private static boolean isAbtSupported(FirebaseApp firebaseApp, String str) {
|
||||
return str.equals(DEFAULT_NAMESPACE) && isPrimaryApp(firebaseApp);
|
||||
}
|
||||
|
||||
private static boolean isPrimaryApp(FirebaseApp firebaseApp) {
|
||||
return firebaseApp.getName().equals(FirebaseApp.DEFAULT_APP_NAME);
|
||||
}
|
||||
|
||||
public static /* synthetic */ AnalyticsConnector lambda$getFetchHandler$0() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static synchronized void notifyRCInstances(boolean z3) {
|
||||
synchronized (RemoteConfigComponent.class) {
|
||||
Iterator<FirebaseRemoteConfig> it = frcNamespaceInstancesStatic.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().setConfigUpdateBackgroundState(z3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public synchronized FirebaseRemoteConfig get(String str) {
|
||||
Throwable th;
|
||||
RemoteConfigComponent remoteConfigComponent;
|
||||
ConfigCacheClient cacheClient;
|
||||
ConfigCacheClient cacheClient2;
|
||||
ConfigCacheClient cacheClient3;
|
||||
ConfigMetadataClient metadataClient;
|
||||
ConfigGetParameterHandler getHandler;
|
||||
try {
|
||||
try {
|
||||
cacheClient = getCacheClient(str, FETCH_FILE_NAME);
|
||||
cacheClient2 = getCacheClient(str, ACTIVATE_FILE_NAME);
|
||||
cacheClient3 = getCacheClient(str, DEFAULTS_FILE_NAME);
|
||||
metadataClient = getMetadataClient(this.context, this.appId, str);
|
||||
getHandler = getGetHandler(cacheClient2, cacheClient3);
|
||||
final Personalization personalization = getPersonalization(this.firebaseApp, str, this.analyticsConnector);
|
||||
if (personalization != null) {
|
||||
try {
|
||||
getHandler.addListener(new BiConsumer() { // from class: com.google.firebase.remoteconfig.c
|
||||
@Override // com.google.android.gms.common.util.BiConsumer
|
||||
public final void accept(Object obj, Object obj2) {
|
||||
Personalization.this.logArmActive((String) obj, (ConfigContainer) obj2);
|
||||
}
|
||||
});
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
remoteConfigComponent = this;
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
remoteConfigComponent = this;
|
||||
th = th;
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th4) {
|
||||
th = th4;
|
||||
}
|
||||
return get(this.firebaseApp, str, this.firebaseInstallations, this.firebaseAbt, this.executor, cacheClient, cacheClient2, cacheClient3, getFetchHandler(str, cacheClient, metadataClient), getHandler, metadataClient, getRolloutsStateSubscriptionsHandler(cacheClient2, getHandler));
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfig getDefault() {
|
||||
return get(DEFAULT_NAMESPACE);
|
||||
}
|
||||
|
||||
public synchronized ConfigFetchHandler getFetchHandler(String str, ConfigCacheClient configCacheClient, ConfigMetadataClient configMetadataClient) {
|
||||
try {
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
return new ConfigFetchHandler(this.firebaseInstallations, isPrimaryApp(this.firebaseApp) ? this.analyticsConnector : new g(4), this.executor, DEFAULT_CLOCK, DEFAULT_RANDOM, configCacheClient, getFrcBackendApiClient(this.firebaseApp.getOptions().getApiKey(), str, configMetadataClient), configMetadataClient, this.customHeaders);
|
||||
}
|
||||
|
||||
public ConfigFetchHttpClient getFrcBackendApiClient(String str, String str2, ConfigMetadataClient configMetadataClient) {
|
||||
return new ConfigFetchHttpClient(this.context, this.firebaseApp.getOptions().getApplicationId(), str, str2, configMetadataClient.getFetchTimeoutInSeconds(), configMetadataClient.getFetchTimeoutInSeconds());
|
||||
}
|
||||
|
||||
public synchronized ConfigRealtimeHandler getRealtime(FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, ConfigFetchHandler configFetchHandler, ConfigCacheClient configCacheClient, Context context, String str, ConfigMetadataClient configMetadataClient) {
|
||||
return new ConfigRealtimeHandler(firebaseApp, firebaseInstallationsApi, configFetchHandler, configCacheClient, context, str, configMetadataClient, this.executor);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.FirebaseRemoteConfigInterop
|
||||
public void registerRolloutsStateSubscriber(String str, RolloutsStateSubscriber rolloutsStateSubscriber) {
|
||||
get(str).getRolloutsStateSubscriptionsHandler().registerRolloutsStateSubscriber(rolloutsStateSubscriber);
|
||||
}
|
||||
|
||||
public synchronized void setCustomHeaders(Map<String, String> map) {
|
||||
this.customHeaders = map;
|
||||
}
|
||||
|
||||
public RemoteConfigComponent(Context context, ScheduledExecutorService scheduledExecutorService, FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, FirebaseABTesting firebaseABTesting, Provider<AnalyticsConnector> provider, boolean z3) {
|
||||
this.frcNamespaceInstances = new HashMap();
|
||||
this.customHeaders = new HashMap();
|
||||
this.context = context;
|
||||
this.executor = scheduledExecutorService;
|
||||
this.firebaseApp = firebaseApp;
|
||||
this.firebaseInstallations = firebaseInstallationsApi;
|
||||
this.firebaseAbt = firebaseABTesting;
|
||||
this.analyticsConnector = provider;
|
||||
this.appId = firebaseApp.getOptions().getApplicationId();
|
||||
GlobalBackgroundListener.ensureBackgroundListenerIsRegistered(context);
|
||||
if (z3) {
|
||||
Tasks.call(scheduledExecutorService, new com.google.firebase.installations.b(this, 1));
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized FirebaseRemoteConfig get(FirebaseApp firebaseApp, String str, FirebaseInstallationsApi firebaseInstallationsApi, FirebaseABTesting firebaseABTesting, Executor executor, ConfigCacheClient configCacheClient, ConfigCacheClient configCacheClient2, ConfigCacheClient configCacheClient3, ConfigFetchHandler configFetchHandler, ConfigGetParameterHandler configGetParameterHandler, ConfigMetadataClient configMetadataClient, RolloutsStateSubscriptionsHandler rolloutsStateSubscriptionsHandler) {
|
||||
RemoteConfigComponent remoteConfigComponent;
|
||||
String str2;
|
||||
try {
|
||||
try {
|
||||
if (this.frcNamespaceInstances.containsKey(str)) {
|
||||
remoteConfigComponent = this;
|
||||
str2 = str;
|
||||
} else {
|
||||
remoteConfigComponent = this;
|
||||
str2 = str;
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = new FirebaseRemoteConfig(this.context, firebaseApp, firebaseInstallationsApi, isAbtSupported(firebaseApp, str) ? firebaseABTesting : null, executor, configCacheClient, configCacheClient2, configCacheClient3, configFetchHandler, configGetParameterHandler, configMetadataClient, getRealtime(firebaseApp, firebaseInstallationsApi, configFetchHandler, configCacheClient2, this.context, str, configMetadataClient), rolloutsStateSubscriptionsHandler);
|
||||
firebaseRemoteConfig.startLoadingConfigsFromDisk();
|
||||
remoteConfigComponent.frcNamespaceInstances.put(str2, firebaseRemoteConfig);
|
||||
frcNamespaceInstancesStatic.put(str2, firebaseRemoteConfig);
|
||||
}
|
||||
return remoteConfigComponent.frcNamespaceInstances.get(str2);
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigConstants {
|
||||
public static final String FETCH_REGEX_URL = "https://firebaseremoteconfig.googleapis.com/v1/projects/%s/namespaces/%s:fetch";
|
||||
public static final String REALTIME_REGEX_URL = "https://firebaseremoteconfigrealtime.googleapis.com/v1/projects/%s/namespaces/%s:streamFetchInvalidations";
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ExperimentDescriptionFieldKey {
|
||||
public static final String EXPERIMENT_ID = "experimentId";
|
||||
public static final String VARIANT_ID = "variantId";
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface RequestFieldKey {
|
||||
public static final String ANALYTICS_USER_PROPERTIES = "analyticsUserProperties";
|
||||
public static final String APP_BUILD = "appBuild";
|
||||
public static final String APP_ID = "appId";
|
||||
public static final String APP_VERSION = "appVersion";
|
||||
public static final String COUNTRY_CODE = "countryCode";
|
||||
public static final String FIRST_OPEN_TIME = "firstOpenTime";
|
||||
public static final String INSTANCE_ID = "appInstanceId";
|
||||
public static final String INSTANCE_ID_TOKEN = "appInstanceIdToken";
|
||||
public static final String LANGUAGE_CODE = "languageCode";
|
||||
public static final String PACKAGE_NAME = "packageName";
|
||||
public static final String PLATFORM_VERSION = "platformVersion";
|
||||
public static final String SDK_VERSION = "sdkVersion";
|
||||
public static final String TIME_ZONE = "timeZone";
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ResponseFieldKey {
|
||||
public static final String ENTRIES = "entries";
|
||||
public static final String EXPERIMENT_DESCRIPTIONS = "experimentDescriptions";
|
||||
public static final String PERSONALIZATION_METADATA = "personalizationMetadata";
|
||||
public static final String ROLLOUT_METADATA = "rolloutMetadata";
|
||||
public static final String STATE = "state";
|
||||
public static final String TEMPLATE_VERSION_NUMBER = "templateVersion";
|
||||
}
|
||||
|
||||
private RemoteConfigConstants() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import kotlinx.coroutines.channels.ChannelsKt;
|
||||
import kotlinx.coroutines.channels.ProducerScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001f\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\u0010\u0010\u0006\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t"}, d2 = {"com/google/firebase/remoteconfig/RemoteConfigKt$configUpdates$1$registration$1", "Lcom/google/firebase/remoteconfig/ConfigUpdateListener;", "onError", "", Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;", "onUpdate", "configUpdate", "Lcom/google/firebase/remoteconfig/ConfigUpdate;", "com.google.firebase-firebase-config"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt$configUpdates$1$registration$1 implements ConfigUpdateListener {
|
||||
final /* synthetic */ ProducerScope<ConfigUpdate> $$this$callbackFlow;
|
||||
final /* synthetic */ FirebaseRemoteConfig $this_configUpdates;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public RemoteConfigKt$configUpdates$1$registration$1(FirebaseRemoteConfig firebaseRemoteConfig, ProducerScope<? super ConfigUpdate> producerScope) {
|
||||
this.$this_configUpdates = firebaseRemoteConfig;
|
||||
this.$$this$callbackFlow = producerScope;
|
||||
}
|
||||
|
||||
/* renamed from: onUpdate$lambda-0 */
|
||||
public static final void m94onUpdate$lambda0(ProducerScope $this$callbackFlow, ConfigUpdate configUpdate) {
|
||||
Intrinsics.checkNotNullParameter($this$callbackFlow, "$$this$callbackFlow");
|
||||
Intrinsics.checkNotNullParameter(configUpdate, "$configUpdate");
|
||||
ChannelsKt.trySendBlocking($this$callbackFlow, configUpdate);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onError(FirebaseRemoteConfigException r22) {
|
||||
Intrinsics.checkNotNullParameter(r22, "error");
|
||||
CoroutineScopeKt.cancel(this.$$this$callbackFlow, "Error listening for config updates.", r22);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onUpdate(ConfigUpdate configUpdate) {
|
||||
Intrinsics.checkNotNullParameter(configUpdate, "configUpdate");
|
||||
this.$this_configUpdates.schedule(new d(this.$$this$callbackFlow, configUpdate, 0));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.channels.ProduceKt;
|
||||
import kotlinx.coroutines.channels.ProducerScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/channels/ProducerScope;", "Lcom/google/firebase/remoteconfig/ConfigUpdate;"}, k = 3, mv = {1, 7, 1}, xi = 48)
|
||||
@DebugMetadata(c = "com.google.firebase.remoteconfig.RemoteConfigKt$configUpdates$1", f = "RemoteConfig.kt", i = {}, l = {71}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt$configUpdates$1 extends SuspendLambda implements Function2<ProducerScope<? super ConfigUpdate>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ FirebaseRemoteConfig $this_configUpdates;
|
||||
private /* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public RemoteConfigKt$configUpdates$1(FirebaseRemoteConfig firebaseRemoteConfig, Continuation<? super RemoteConfigKt$configUpdates$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_configUpdates = firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
RemoteConfigKt$configUpdates$1 remoteConfigKt$configUpdates$1 = new RemoteConfigKt$configUpdates$1(this.$this_configUpdates, continuation);
|
||||
remoteConfigKt$configUpdates$1.L$0 = obj;
|
||||
return remoteConfigKt$configUpdates$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
ProducerScope producerScope = (ProducerScope) this.L$0;
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = this.$this_configUpdates;
|
||||
final ConfigUpdateListenerRegistration addOnConfigUpdateListener = firebaseRemoteConfig.addOnConfigUpdateListener(new RemoteConfigKt$configUpdates$1$registration$1(firebaseRemoteConfig, producerScope));
|
||||
Intrinsics.checkNotNullExpressionValue(addOnConfigUpdateListener, "FirebaseRemoteConfig.con… }\n }\n )");
|
||||
Function0<Unit> function0 = new Function0<Unit>() { // from class: com.google.firebase.remoteconfig.RemoteConfigKt$configUpdates$1.1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public /* bridge */ /* synthetic */ Unit invoke() {
|
||||
invoke2();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2() {
|
||||
ConfigUpdateListenerRegistration.this.remove();
|
||||
}
|
||||
};
|
||||
this.label = 1;
|
||||
if (ProduceKt.awaitClose(producerScope, function0, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super ConfigUpdate> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((RemoteConfigKt$configUpdates$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.firebase.Firebase;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
@Metadata(d1 = {"\u0000D\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u001f\u0010\n\u001a\u00020\u000b2\u0017\u0010\f\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u000f0\r¢\u0006\u0002\b\u0010\u001a\u0015\u0010\u0011\u001a\u00020\u0012*\u00020\u00032\u0006\u0010\u0013\u001a\u00020\u0014H\u0086\u0002\u001a\u0012\u0010\u0006\u001a\u00020\u0003*\u00020\u00072\u0006\u0010\u0015\u001a\u00020\u0016\"\u001b\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u00038F¢\u0006\u0006\u001a\u0004\b\u0004\u0010\u0005\"\u0015\u0010\u0006\u001a\u00020\u0003*\u00020\u00078F¢\u0006\u0006\u001a\u0004\b\b\u0010\t¨\u0006\u0017"}, d2 = {"configUpdates", "Lkotlinx/coroutines/flow/Flow;", "Lcom/google/firebase/remoteconfig/ConfigUpdate;", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;", "getConfigUpdates", "(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;)Lkotlinx/coroutines/flow/Flow;", "remoteConfig", "Lcom/google/firebase/Firebase;", "getRemoteConfig", "(Lcom/google/firebase/Firebase;)Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;", "remoteConfigSettings", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings;", "init", "Lkotlin/Function1;", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings$Builder;", "", "Lkotlin/ExtensionFunctionType;", "get", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigValue;", "key", "", "app", "Lcom/google/firebase/FirebaseApp;", "com.google.firebase-firebase-config"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt {
|
||||
public static final FirebaseRemoteConfigValue get(FirebaseRemoteConfig firebaseRemoteConfig, String key) {
|
||||
Intrinsics.checkNotNullParameter(firebaseRemoteConfig, "<this>");
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
FirebaseRemoteConfigValue value = firebaseRemoteConfig.getValue(key);
|
||||
Intrinsics.checkNotNullExpressionValue(value, "this.getValue(key)");
|
||||
return value;
|
||||
}
|
||||
|
||||
public static final Flow<ConfigUpdate> getConfigUpdates(FirebaseRemoteConfig firebaseRemoteConfig) {
|
||||
Intrinsics.checkNotNullParameter(firebaseRemoteConfig, "<this>");
|
||||
return FlowKt.callbackFlow(new RemoteConfigKt$configUpdates$1(firebaseRemoteConfig, null));
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfig getRemoteConfig(Firebase firebase) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseRemoteConfig, "getInstance()");
|
||||
return firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfig remoteConfig(Firebase firebase, FirebaseApp app) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
Intrinsics.checkNotNullParameter(app, "app");
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = FirebaseRemoteConfig.getInstance(app);
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseRemoteConfig, "getInstance(app)");
|
||||
return firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfigSettings remoteConfigSettings(Function1<? super FirebaseRemoteConfigSettings.Builder, Unit> init) {
|
||||
Intrinsics.checkNotNullParameter(init, "init");
|
||||
FirebaseRemoteConfigSettings.Builder builder = new FirebaseRemoteConfigSettings.Builder();
|
||||
init.invoke(builder);
|
||||
FirebaseRemoteConfigSettings build = builder.build();
|
||||
Intrinsics.checkNotNullExpressionValue(build, "builder.build()");
|
||||
return build;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.abt.FirebaseABTesting;
|
||||
import com.google.firebase.abt.component.AbtComponent;
|
||||
import com.google.firebase.analytics.connector.AnalyticsConnector;
|
||||
import com.google.firebase.annotations.concurrent.Blocking;
|
||||
import com.google.firebase.components.Component;
|
||||
import com.google.firebase.components.ComponentContainer;
|
||||
import com.google.firebase.components.ComponentRegistrar;
|
||||
import com.google.firebase.components.Dependency;
|
||||
import com.google.firebase.components.Qualified;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.platforminfo.LibraryVersionComponent;
|
||||
import com.google.firebase.remoteconfig.interop.FirebaseRemoteConfigInterop;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
@Keep
|
||||
/* loaded from: classes3.dex */
|
||||
public class RemoteConfigRegistrar implements ComponentRegistrar {
|
||||
private static final String LIBRARY_NAME = "fire-rc";
|
||||
|
||||
public static /* synthetic */ RemoteConfigComponent lambda$getComponents$0(Qualified qualified, ComponentContainer componentContainer) {
|
||||
return new RemoteConfigComponent((Context) componentContainer.get(Context.class), (ScheduledExecutorService) componentContainer.get(qualified), (FirebaseApp) componentContainer.get(FirebaseApp.class), (FirebaseInstallationsApi) componentContainer.get(FirebaseInstallationsApi.class), ((AbtComponent) componentContainer.get(AbtComponent.class)).get(FirebaseABTesting.OriginService.REMOTE_CONFIG), componentContainer.getProvider(AnalyticsConnector.class));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
Qualified qualified = Qualified.qualified(Blocking.class, ScheduledExecutorService.class);
|
||||
return Arrays.asList(Component.builder(RemoteConfigComponent.class, FirebaseRemoteConfigInterop.class).name(LIBRARY_NAME).add(Dependency.required((Class<?>) Context.class)).add(Dependency.required((Qualified<?>) qualified)).add(Dependency.required((Class<?>) FirebaseApp.class)).add(Dependency.required((Class<?>) FirebaseInstallationsApi.class)).add(Dependency.required((Class<?>) AbtComponent.class)).add(Dependency.optionalProvider((Class<?>) AnalyticsConnector.class)).factory(new com.google.firebase.heartbeatinfo.b(qualified, 1)).eagerInDefaultApp().build(), LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import com.google.android.gms.tasks.Continuation;
|
||||
import com.google.android.gms.tasks.SuccessContinuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class a implements Continuation, SuccessContinuation {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ FirebaseRemoteConfig f6032a;
|
||||
|
||||
public /* synthetic */ a(FirebaseRemoteConfig firebaseRemoteConfig) {
|
||||
this.f6032a = firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.SuccessContinuation
|
||||
public Task then(Object obj) {
|
||||
Task lambda$fetchAndActivate$1;
|
||||
lambda$fetchAndActivate$1 = this.f6032a.lambda$fetchAndActivate$1((Void) obj);
|
||||
return lambda$fetchAndActivate$1;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.Continuation
|
||||
public Object then(Task task) {
|
||||
boolean processActivatePutTask;
|
||||
processActivatePutTask = this.f6032a.processActivatePutTask(task);
|
||||
return Boolean.valueOf(processActivatePutTask);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class b implements Callable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f6033a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ FirebaseRemoteConfig f6034b;
|
||||
|
||||
public /* synthetic */ b(FirebaseRemoteConfig firebaseRemoteConfig, int i) {
|
||||
this.f6033a = i;
|
||||
this.f6034b = firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.Callable
|
||||
public final Object call() {
|
||||
int i = this.f6033a;
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = this.f6034b;
|
||||
switch (i) {
|
||||
case 0:
|
||||
return FirebaseRemoteConfig.i(firebaseRemoteConfig);
|
||||
default:
|
||||
return firebaseRemoteConfig.getInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.google.firebase.remoteconfig;
|
||||
|
||||
import kotlinx.coroutines.channels.ProducerScope;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class d implements Runnable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f6036a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ ProducerScope f6037b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ ConfigUpdate f6038c;
|
||||
|
||||
public /* synthetic */ d(ProducerScope producerScope, ConfigUpdate configUpdate, int i) {
|
||||
this.f6036a = i;
|
||||
this.f6037b = producerScope;
|
||||
this.f6038c = configUpdate;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
switch (this.f6036a) {
|
||||
case 0:
|
||||
RemoteConfigKt$configUpdates$1$registration$1.a(this.f6037b, this.f6038c);
|
||||
return;
|
||||
default:
|
||||
com.google.firebase.remoteconfig.ktx.RemoteConfigKt$configUpdates$1$registration$1.a(this.f6037b, this.f6038c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface Code {
|
||||
public static final int ABORTED = 10;
|
||||
public static final int ALREADY_EXISTS = 6;
|
||||
public static final int CANCELLED = 1;
|
||||
public static final int DATA_LOSS = 15;
|
||||
public static final int DEADLINE_EXCEEDED = 4;
|
||||
public static final int FAILED_PRECONDITION = 9;
|
||||
public static final int INTERNAL = 13;
|
||||
public static final int INVALID_ARGUMENT = 3;
|
||||
public static final int NOT_FOUND = 5;
|
||||
public static final int OK = 0;
|
||||
public static final int OUT_OF_RANGE = 11;
|
||||
public static final int PERMISSION_DENIED = 7;
|
||||
public static final int RESOURCE_EXHAUSTED = 8;
|
||||
public static final int UNAUTHENTICATED = 16;
|
||||
public static final int UNAVAILABLE = 14;
|
||||
public static final int UNIMPLEMENTED = 12;
|
||||
public static final int UNKNOWN = 2;
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.Continuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdate;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListener;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHandler;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigAutoFetch {
|
||||
private static final int MAXIMUM_FETCH_ATTEMPTS = 3;
|
||||
private static final String REALTIME_DISABLED_KEY = "featureDisabled";
|
||||
private static final String TEMPLATE_VERSION_KEY = "latestTemplateVersionNumber";
|
||||
private final ConfigCacheClient activatedCache;
|
||||
private final ConfigFetchHandler configFetchHandler;
|
||||
private final Set<ConfigUpdateListener> eventListeners;
|
||||
private final HttpURLConnection httpURLConnection;
|
||||
private final Random random = new Random();
|
||||
private final ConfigUpdateListener retryCallback;
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
|
||||
public ConfigAutoFetch(HttpURLConnection httpURLConnection, ConfigFetchHandler configFetchHandler, ConfigCacheClient configCacheClient, Set<ConfigUpdateListener> set, ConfigUpdateListener configUpdateListener, ScheduledExecutorService scheduledExecutorService) {
|
||||
this.httpURLConnection = httpURLConnection;
|
||||
this.configFetchHandler = configFetchHandler;
|
||||
this.activatedCache = configCacheClient;
|
||||
this.eventListeners = set;
|
||||
this.retryCallback = configUpdateListener;
|
||||
this.scheduledExecutorService = scheduledExecutorService;
|
||||
}
|
||||
|
||||
private void autoFetch(final int i, final long j4) {
|
||||
if (i == 0) {
|
||||
propagateErrors(new FirebaseRemoteConfigServerException("Unable to fetch the latest version of the template.", FirebaseRemoteConfigException.Code.CONFIG_UPDATE_NOT_FETCHED));
|
||||
} else {
|
||||
this.scheduledExecutorService.schedule(new Runnable() { // from class: com.google.firebase.remoteconfig.internal.ConfigAutoFetch.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
ConfigAutoFetch.this.fetchLatestConfig(i, j4);
|
||||
}
|
||||
}, this.random.nextInt(4), TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void executeAllListenerCallbacks(ConfigUpdate configUpdate) {
|
||||
Iterator<ConfigUpdateListener> it = this.eventListeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().onUpdate(configUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
private static Boolean fetchResponseIsUpToDate(ConfigFetchHandler.FetchResponse fetchResponse, long j4) {
|
||||
if (fetchResponse.getFetchedConfigs() != null) {
|
||||
return Boolean.valueOf(fetchResponse.getFetchedConfigs().getTemplateVersionNumber() >= j4);
|
||||
}
|
||||
return Boolean.valueOf(fetchResponse.getStatus() == 1);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:11:0x0030, code lost:
|
||||
|
||||
r5 = new org.json.JSONObject(r4);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:12:0x0039, code lost:
|
||||
|
||||
if (r5.has(com.google.firebase.remoteconfig.internal.ConfigAutoFetch.REALTIME_DISABLED_KEY) == false) goto L38;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:14:0x003f, code lost:
|
||||
|
||||
if (r5.getBoolean(com.google.firebase.remoteconfig.internal.ConfigAutoFetch.REALTIME_DISABLED_KEY) == false) goto L39;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:16:0x0041, code lost:
|
||||
|
||||
r9.retryCallback.onError(new com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException("The server is temporarily unavailable. Try again in a few minutes.", com.google.firebase.remoteconfig.FirebaseRemoteConfigException.Code.CONFIG_UPDATE_UNAVAILABLE));
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:24:0x0056, code lost:
|
||||
|
||||
if (isEventListenersEmpty() == false) goto L21;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:26:0x005d, code lost:
|
||||
|
||||
if (r5.has(com.google.firebase.remoteconfig.internal.ConfigAutoFetch.TEMPLATE_VERSION_KEY) == false) goto L41;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:28:0x005f, code lost:
|
||||
|
||||
r6 = r9.configFetchHandler.getTemplateVersionNumber();
|
||||
r4 = r5.getLong(com.google.firebase.remoteconfig.internal.ConfigAutoFetch.TEMPLATE_VERSION_KEY);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:29:0x006b, code lost:
|
||||
|
||||
if (r4 <= r6) goto L42;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:31:0x006d, code lost:
|
||||
|
||||
autoFetch(3, r4);
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private void handleNotifications(java.io.InputStream r10) throws java.io.IOException {
|
||||
/*
|
||||
r9 = this;
|
||||
java.lang.String r0 = "latestTemplateVersionNumber"
|
||||
java.lang.String r1 = "featureDisabled"
|
||||
java.io.BufferedReader r2 = new java.io.BufferedReader
|
||||
java.io.InputStreamReader r3 = new java.io.InputStreamReader
|
||||
java.lang.String r4 = "utf-8"
|
||||
r3.<init>(r10, r4)
|
||||
r2.<init>(r3)
|
||||
java.lang.String r3 = ""
|
||||
L12:
|
||||
r4 = r3
|
||||
L13:
|
||||
java.lang.String r5 = r2.readLine()
|
||||
if (r5 == 0) goto L8a
|
||||
java.lang.String r4 = C.w.n(r4, r5)
|
||||
java.lang.String r6 = "}"
|
||||
boolean r5 = r5.contains(r6)
|
||||
if (r5 == 0) goto L13
|
||||
java.lang.String r4 = r9.parseAndValidateConfigUpdateMessage(r4)
|
||||
boolean r5 = r4.isEmpty()
|
||||
if (r5 == 0) goto L30
|
||||
goto L13
|
||||
L30:
|
||||
org.json.JSONObject r5 = new org.json.JSONObject // Catch: org.json.JSONException -> L50
|
||||
r5.<init>(r4) // Catch: org.json.JSONException -> L50
|
||||
boolean r4 = r5.has(r1) // Catch: org.json.JSONException -> L50
|
||||
if (r4 == 0) goto L52
|
||||
boolean r4 = r5.getBoolean(r1) // Catch: org.json.JSONException -> L50
|
||||
if (r4 == 0) goto L52
|
||||
com.google.firebase.remoteconfig.ConfigUpdateListener r4 = r9.retryCallback // Catch: org.json.JSONException -> L50
|
||||
com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException r5 = new com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException // Catch: org.json.JSONException -> L50
|
||||
java.lang.String r6 = "The server is temporarily unavailable. Try again in a few minutes."
|
||||
com.google.firebase.remoteconfig.FirebaseRemoteConfigException$Code r7 = com.google.firebase.remoteconfig.FirebaseRemoteConfigException.Code.CONFIG_UPDATE_UNAVAILABLE // Catch: org.json.JSONException -> L50
|
||||
r5.<init>(r6, r7) // Catch: org.json.JSONException -> L50
|
||||
r4.onError(r5) // Catch: org.json.JSONException -> L50
|
||||
goto L8a
|
||||
L50:
|
||||
r4 = move-exception
|
||||
goto L72
|
||||
L52:
|
||||
boolean r4 = r9.isEventListenersEmpty() // Catch: org.json.JSONException -> L50
|
||||
if (r4 == 0) goto L59
|
||||
goto L8a
|
||||
L59:
|
||||
boolean r4 = r5.has(r0) // Catch: org.json.JSONException -> L50
|
||||
if (r4 == 0) goto L12
|
||||
com.google.firebase.remoteconfig.internal.ConfigFetchHandler r4 = r9.configFetchHandler // Catch: org.json.JSONException -> L50
|
||||
long r6 = r4.getTemplateVersionNumber() // Catch: org.json.JSONException -> L50
|
||||
long r4 = r5.getLong(r0) // Catch: org.json.JSONException -> L50
|
||||
int r6 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))
|
||||
if (r6 <= 0) goto L12
|
||||
r6 = 3
|
||||
r9.autoFetch(r6, r4) // Catch: org.json.JSONException -> L50
|
||||
goto L12
|
||||
L72:
|
||||
com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException r5 = new com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException
|
||||
java.lang.Throwable r6 = r4.getCause()
|
||||
com.google.firebase.remoteconfig.FirebaseRemoteConfigException$Code r7 = com.google.firebase.remoteconfig.FirebaseRemoteConfigException.Code.CONFIG_UPDATE_MESSAGE_INVALID
|
||||
java.lang.String r8 = "Unable to parse config update message."
|
||||
r5.<init>(r8, r6, r7)
|
||||
r9.propagateErrors(r5)
|
||||
java.lang.String r5 = "FirebaseRemoteConfig"
|
||||
java.lang.String r6 = "Unable to parse latest config update message."
|
||||
android.util.Log.e(r5, r6, r4)
|
||||
goto L12
|
||||
L8a:
|
||||
r2.close()
|
||||
r10.close()
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.remoteconfig.internal.ConfigAutoFetch.handleNotifications(java.io.InputStream):void");
|
||||
}
|
||||
|
||||
private synchronized boolean isEventListenersEmpty() {
|
||||
return this.eventListeners.isEmpty();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public /* synthetic */ Task lambda$fetchLatestConfig$0(Task task, Task task2, long j4, int i, Task task3) throws Exception {
|
||||
if (!task.isSuccessful()) {
|
||||
return Tasks.forException(new FirebaseRemoteConfigClientException("Failed to auto-fetch config update.", task.getException()));
|
||||
}
|
||||
if (!task2.isSuccessful()) {
|
||||
return Tasks.forException(new FirebaseRemoteConfigClientException("Failed to get activated config for auto-fetch", task2.getException()));
|
||||
}
|
||||
ConfigFetchHandler.FetchResponse fetchResponse = (ConfigFetchHandler.FetchResponse) task.getResult();
|
||||
ConfigContainer configContainer = (ConfigContainer) task2.getResult();
|
||||
if (!fetchResponseIsUpToDate(fetchResponse, j4).booleanValue()) {
|
||||
Log.d(FirebaseRemoteConfig.TAG, "Fetched template version is the same as SDK's current version. Retrying fetch.");
|
||||
autoFetch(i, j4);
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
if (fetchResponse.getFetchedConfigs() == null) {
|
||||
Log.d(FirebaseRemoteConfig.TAG, "The fetch succeeded, but the backend had no updates.");
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
if (configContainer == null) {
|
||||
configContainer = ConfigContainer.newBuilder().build();
|
||||
}
|
||||
Set<String> changedParams = configContainer.getChangedParams(fetchResponse.getFetchedConfigs());
|
||||
if (changedParams.isEmpty()) {
|
||||
Log.d(FirebaseRemoteConfig.TAG, "Config was fetched, but no params changed.");
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
executeAllListenerCallbacks(ConfigUpdate.create(changedParams));
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
|
||||
private String parseAndValidateConfigUpdateMessage(String str) {
|
||||
int indexOf = str.indexOf(123);
|
||||
int lastIndexOf = str.lastIndexOf(125);
|
||||
return (indexOf < 0 || lastIndexOf < 0 || indexOf >= lastIndexOf) ? "" : str.substring(indexOf, lastIndexOf + 1);
|
||||
}
|
||||
|
||||
private synchronized void propagateErrors(FirebaseRemoteConfigException firebaseRemoteConfigException) {
|
||||
Iterator<ConfigUpdateListener> it = this.eventListeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().onError(firebaseRemoteConfigException);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized Task<Void> fetchLatestConfig(int i, final long j4) {
|
||||
final int i4 = i - 1;
|
||||
try {
|
||||
try {
|
||||
final Task<ConfigFetchHandler.FetchResponse> fetchNowWithTypeAndAttemptNumber = this.configFetchHandler.fetchNowWithTypeAndAttemptNumber(ConfigFetchHandler.FetchType.REALTIME, 3 - i4);
|
||||
final Task<ConfigContainer> task = this.activatedCache.get();
|
||||
return Tasks.whenAllComplete((Task<?>[]) new Task[]{fetchNowWithTypeAndAttemptNumber, task}).continueWithTask(this.scheduledExecutorService, new Continuation() { // from class: com.google.firebase.remoteconfig.internal.a
|
||||
@Override // com.google.android.gms.tasks.Continuation
|
||||
public final Object then(Task task2) {
|
||||
Task lambda$fetchLatestConfig$0;
|
||||
lambda$fetchLatestConfig$0 = ConfigAutoFetch.this.lambda$fetchLatestConfig$0(fetchNowWithTypeAndAttemptNumber, task, j4, i4, task2);
|
||||
return lambda$fetchLatestConfig$0;
|
||||
}
|
||||
});
|
||||
} catch (Throwable th) {
|
||||
th = th;
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public void listenForNotifications() {
|
||||
HttpURLConnection httpURLConnection = this.httpURLConnection;
|
||||
if (httpURLConnection == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
InputStream inputStream = httpURLConnection.getInputStream();
|
||||
handleNotifications(inputStream);
|
||||
inputStream.close();
|
||||
} catch (IOException e4) {
|
||||
Log.d(FirebaseRemoteConfig.TAG, "Stream was cancelled due to an exception. Retrying the connection...", e4);
|
||||
} finally {
|
||||
this.httpURLConnection.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.OnCanceledListener;
|
||||
import com.google.android.gms.tasks.OnFailureListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.android.gms.tasks.SuccessContinuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import n.ExecutorC0507a;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigCacheClient {
|
||||
static final long DISK_READ_TIMEOUT_IN_SECONDS = 5;
|
||||
private Task<ConfigContainer> cachedContainerTask = null;
|
||||
private final Executor executor;
|
||||
private final ConfigStorageClient storageClient;
|
||||
private static final Map<String, ConfigCacheClient> clientInstances = new HashMap();
|
||||
private static final Executor DIRECT_EXECUTOR = new ExecutorC0507a(1);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class AwaitListener<TResult> implements OnSuccessListener<TResult>, OnFailureListener, OnCanceledListener {
|
||||
private final CountDownLatch latch;
|
||||
|
||||
private AwaitListener() {
|
||||
this.latch = new CountDownLatch(1);
|
||||
}
|
||||
|
||||
public void await() throws InterruptedException {
|
||||
this.latch.await();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnCanceledListener
|
||||
public void onCanceled() {
|
||||
this.latch.countDown();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnFailureListener
|
||||
public void onFailure(Exception exc) {
|
||||
this.latch.countDown();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnSuccessListener
|
||||
public void onSuccess(TResult tresult) {
|
||||
this.latch.countDown();
|
||||
}
|
||||
|
||||
public boolean await(long j4, TimeUnit timeUnit) throws InterruptedException {
|
||||
return this.latch.await(j4, timeUnit);
|
||||
}
|
||||
|
||||
public /* synthetic */ AwaitListener(AnonymousClass1 anonymousClass1) {
|
||||
this();
|
||||
}
|
||||
}
|
||||
|
||||
private ConfigCacheClient(Executor executor, ConfigStorageClient configStorageClient) {
|
||||
this.executor = executor;
|
||||
this.storageClient = configStorageClient;
|
||||
}
|
||||
|
||||
private static <TResult> TResult await(Task<TResult> task, long j4, TimeUnit timeUnit) throws ExecutionException, InterruptedException, TimeoutException {
|
||||
AwaitListener awaitListener = new AwaitListener();
|
||||
Executor executor = DIRECT_EXECUTOR;
|
||||
task.addOnSuccessListener(executor, awaitListener);
|
||||
task.addOnFailureListener(executor, awaitListener);
|
||||
task.addOnCanceledListener(executor, awaitListener);
|
||||
if (!awaitListener.await(j4, timeUnit)) {
|
||||
throw new TimeoutException("Task await timed out.");
|
||||
}
|
||||
if (task.isSuccessful()) {
|
||||
return task.getResult();
|
||||
}
|
||||
throw new ExecutionException(task.getException());
|
||||
}
|
||||
|
||||
public static synchronized void clearInstancesForTest() {
|
||||
synchronized (ConfigCacheClient.class) {
|
||||
clientInstances.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized ConfigCacheClient getInstance(Executor executor, ConfigStorageClient configStorageClient) {
|
||||
ConfigCacheClient configCacheClient;
|
||||
synchronized (ConfigCacheClient.class) {
|
||||
try {
|
||||
String fileName = configStorageClient.getFileName();
|
||||
Map<String, ConfigCacheClient> map = clientInstances;
|
||||
if (!map.containsKey(fileName)) {
|
||||
map.put(fileName, new ConfigCacheClient(executor, configStorageClient));
|
||||
}
|
||||
configCacheClient = map.get(fileName);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return configCacheClient;
|
||||
}
|
||||
|
||||
public /* synthetic */ Void lambda$put$0(ConfigContainer configContainer) throws Exception {
|
||||
return this.storageClient.write(configContainer);
|
||||
}
|
||||
|
||||
public /* synthetic */ Task lambda$put$1(boolean z3, ConfigContainer configContainer, Void r32) throws Exception {
|
||||
if (z3) {
|
||||
updateInMemoryConfigContainer(configContainer);
|
||||
}
|
||||
return Tasks.forResult(configContainer);
|
||||
}
|
||||
|
||||
private synchronized void updateInMemoryConfigContainer(ConfigContainer configContainer) {
|
||||
this.cachedContainerTask = Tasks.forResult(configContainer);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
synchronized (this) {
|
||||
this.cachedContainerTask = Tasks.forResult(null);
|
||||
}
|
||||
this.storageClient.clear();
|
||||
}
|
||||
|
||||
public synchronized Task<ConfigContainer> get() {
|
||||
try {
|
||||
Task<ConfigContainer> task = this.cachedContainerTask;
|
||||
if (task != null) {
|
||||
if (task.isComplete() && !this.cachedContainerTask.isSuccessful()) {
|
||||
}
|
||||
}
|
||||
Executor executor = this.executor;
|
||||
ConfigStorageClient configStorageClient = this.storageClient;
|
||||
Objects.requireNonNull(configStorageClient);
|
||||
this.cachedContainerTask = Tasks.call(executor, new com.google.firebase.installations.b(configStorageClient, 2));
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
return this.cachedContainerTask;
|
||||
}
|
||||
|
||||
public ConfigContainer getBlocking() {
|
||||
return getBlocking(DISK_READ_TIMEOUT_IN_SECONDS);
|
||||
}
|
||||
|
||||
public synchronized Task<ConfigContainer> getCachedContainerTask() {
|
||||
return this.cachedContainerTask;
|
||||
}
|
||||
|
||||
public Task<ConfigContainer> put(ConfigContainer configContainer) {
|
||||
return put(configContainer, true);
|
||||
}
|
||||
|
||||
public ConfigContainer getBlocking(long j4) {
|
||||
synchronized (this) {
|
||||
try {
|
||||
Task<ConfigContainer> task = this.cachedContainerTask;
|
||||
if (task != null && task.isSuccessful()) {
|
||||
return this.cachedContainerTask.getResult();
|
||||
}
|
||||
try {
|
||||
return (ConfigContainer) await(get(), j4, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException | ExecutionException | TimeoutException e4) {
|
||||
Log.d(FirebaseRemoteConfig.TAG, "Reading from storage file failed.", e4);
|
||||
return null;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Task<ConfigContainer> put(final ConfigContainer configContainer, final boolean z3) {
|
||||
return Tasks.call(this.executor, new com.google.firebase.crashlytics.internal.metadata.a(2, this, configContainer)).onSuccessTask(this.executor, new SuccessContinuation() { // from class: com.google.firebase.remoteconfig.internal.b
|
||||
@Override // com.google.android.gms.tasks.SuccessContinuation
|
||||
public final Task then(Object obj) {
|
||||
Task lambda$put$1;
|
||||
lambda$put$1 = ConfigCacheClient.this.lambda$put$1(z3, configContainer, (Void) obj);
|
||||
return lambda$put$1;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigContainer {
|
||||
static final String ABT_EXPERIMENTS_KEY = "abt_experiments_key";
|
||||
static final String CONFIGS_KEY = "configs_key";
|
||||
private static final Date DEFAULTS_FETCH_TIME = new Date(0);
|
||||
static final String FETCH_TIME_KEY = "fetch_time_key";
|
||||
static final String PERSONALIZATION_METADATA_KEY = "personalization_metadata_key";
|
||||
public static final String ROLLOUT_METADATA_AFFECTED_KEYS = "affectedParameterKeys";
|
||||
public static final String ROLLOUT_METADATA_ID = "rolloutId";
|
||||
static final String ROLLOUT_METADATA_KEY = "rollout_metadata_key";
|
||||
public static final String ROLLOUT_METADATA_VARIANT_ID = "variantId";
|
||||
static final String TEMPLATE_VERSION_NUMBER_KEY = "template_version_number_key";
|
||||
private JSONArray abtExperiments;
|
||||
private JSONObject configsJson;
|
||||
private JSONObject containerJson;
|
||||
private Date fetchTime;
|
||||
private JSONObject personalizationMetadata;
|
||||
private JSONArray rolloutMetadata;
|
||||
private long templateVersionNumber;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private JSONArray builderAbtExperiments;
|
||||
private JSONObject builderConfigsJson;
|
||||
private Date builderFetchTime;
|
||||
private JSONObject builderPersonalizationMetadata;
|
||||
private JSONArray builderRolloutMetadata;
|
||||
private long builderTemplateVersionNumber;
|
||||
|
||||
public ConfigContainer build() throws JSONException {
|
||||
return new ConfigContainer(this.builderConfigsJson, this.builderFetchTime, this.builderAbtExperiments, this.builderPersonalizationMetadata, this.builderTemplateVersionNumber, this.builderRolloutMetadata);
|
||||
}
|
||||
|
||||
public Builder replaceConfigsWith(Map<String, String> map) {
|
||||
this.builderConfigsJson = new JSONObject(map);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withAbtExperiments(JSONArray jSONArray) {
|
||||
try {
|
||||
this.builderAbtExperiments = new JSONArray(jSONArray.toString());
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withFetchTime(Date date) {
|
||||
this.builderFetchTime = date;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withPersonalizationMetadata(JSONObject jSONObject) {
|
||||
try {
|
||||
this.builderPersonalizationMetadata = new JSONObject(jSONObject.toString());
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withRolloutMetadata(JSONArray jSONArray) {
|
||||
try {
|
||||
this.builderRolloutMetadata = new JSONArray(jSONArray.toString());
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withTemplateVersionNumber(long j4) {
|
||||
this.builderTemplateVersionNumber = j4;
|
||||
return this;
|
||||
}
|
||||
|
||||
private Builder() {
|
||||
this.builderConfigsJson = new JSONObject();
|
||||
this.builderFetchTime = ConfigContainer.DEFAULTS_FETCH_TIME;
|
||||
this.builderAbtExperiments = new JSONArray();
|
||||
this.builderPersonalizationMetadata = new JSONObject();
|
||||
this.builderTemplateVersionNumber = 0L;
|
||||
this.builderRolloutMetadata = new JSONArray();
|
||||
}
|
||||
|
||||
public Builder replaceConfigsWith(JSONObject jSONObject) {
|
||||
try {
|
||||
this.builderConfigsJson = new JSONObject(jSONObject.toString());
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder(ConfigContainer configContainer) {
|
||||
this.builderConfigsJson = configContainer.getConfigs();
|
||||
this.builderFetchTime = configContainer.getFetchTime();
|
||||
this.builderAbtExperiments = configContainer.getAbtExperiments();
|
||||
this.builderPersonalizationMetadata = configContainer.getPersonalizationMetadata();
|
||||
this.builderTemplateVersionNumber = configContainer.getTemplateVersionNumber();
|
||||
this.builderRolloutMetadata = configContainer.getRolloutMetadata();
|
||||
}
|
||||
}
|
||||
|
||||
public static ConfigContainer copyOf(JSONObject jSONObject) throws JSONException {
|
||||
JSONObject optJSONObject = jSONObject.optJSONObject(PERSONALIZATION_METADATA_KEY);
|
||||
if (optJSONObject == null) {
|
||||
optJSONObject = new JSONObject();
|
||||
}
|
||||
JSONObject jSONObject2 = optJSONObject;
|
||||
JSONArray optJSONArray = jSONObject.optJSONArray(ROLLOUT_METADATA_KEY);
|
||||
if (optJSONArray == null) {
|
||||
optJSONArray = new JSONArray();
|
||||
}
|
||||
return new ConfigContainer(jSONObject.getJSONObject(CONFIGS_KEY), new Date(jSONObject.getLong(FETCH_TIME_KEY)), jSONObject.getJSONArray(ABT_EXPERIMENTS_KEY), jSONObject2, jSONObject.optLong(TEMPLATE_VERSION_NUMBER_KEY), optJSONArray);
|
||||
}
|
||||
|
||||
private Map<String, Map<String, String>> createRolloutParameterKeyMap() throws JSONException {
|
||||
HashMap hashMap = new HashMap();
|
||||
for (int i = 0; i < getRolloutMetadata().length(); i++) {
|
||||
JSONObject jSONObject = getRolloutMetadata().getJSONObject(i);
|
||||
String string = jSONObject.getString(ROLLOUT_METADATA_ID);
|
||||
String string2 = jSONObject.getString("variantId");
|
||||
JSONArray jSONArray = jSONObject.getJSONArray(ROLLOUT_METADATA_AFFECTED_KEYS);
|
||||
for (int i4 = 0; i4 < jSONArray.length(); i4++) {
|
||||
String string3 = jSONArray.getString(i4);
|
||||
if (!hashMap.containsKey(string3)) {
|
||||
hashMap.put(string3, new HashMap());
|
||||
}
|
||||
Map map = (Map) hashMap.get(string3);
|
||||
if (map != null) {
|
||||
map.put(string, string2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
private static ConfigContainer deepCopyOf(JSONObject jSONObject) throws JSONException {
|
||||
return copyOf(new JSONObject(jSONObject.toString()));
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof ConfigContainer) {
|
||||
return this.containerJson.toString().equals(((ConfigContainer) obj).toString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public JSONArray getAbtExperiments() {
|
||||
return this.abtExperiments;
|
||||
}
|
||||
|
||||
public Set<String> getChangedParams(ConfigContainer configContainer) throws JSONException {
|
||||
JSONObject configs = deepCopyOf(configContainer.containerJson).getConfigs();
|
||||
Map<String, Map<String, String>> createRolloutParameterKeyMap = createRolloutParameterKeyMap();
|
||||
Map<String, Map<String, String>> createRolloutParameterKeyMap2 = configContainer.createRolloutParameterKeyMap();
|
||||
HashSet hashSet = new HashSet();
|
||||
Iterator<String> keys = getConfigs().keys();
|
||||
while (keys.hasNext()) {
|
||||
String next = keys.next();
|
||||
if (!configContainer.getConfigs().has(next)) {
|
||||
hashSet.add(next);
|
||||
} else if (!getConfigs().get(next).equals(configContainer.getConfigs().get(next))) {
|
||||
hashSet.add(next);
|
||||
} else if ((getPersonalizationMetadata().has(next) && !configContainer.getPersonalizationMetadata().has(next)) || (!getPersonalizationMetadata().has(next) && configContainer.getPersonalizationMetadata().has(next))) {
|
||||
hashSet.add(next);
|
||||
} else if (getPersonalizationMetadata().has(next) && configContainer.getPersonalizationMetadata().has(next) && !getPersonalizationMetadata().getJSONObject(next).toString().equals(configContainer.getPersonalizationMetadata().getJSONObject(next).toString())) {
|
||||
hashSet.add(next);
|
||||
} else if (createRolloutParameterKeyMap.containsKey(next) != createRolloutParameterKeyMap2.containsKey(next)) {
|
||||
hashSet.add(next);
|
||||
} else if (createRolloutParameterKeyMap.containsKey(next) && createRolloutParameterKeyMap2.containsKey(next) && !createRolloutParameterKeyMap.get(next).equals(createRolloutParameterKeyMap2.get(next))) {
|
||||
hashSet.add(next);
|
||||
} else {
|
||||
configs.remove(next);
|
||||
}
|
||||
}
|
||||
Iterator<String> keys2 = configs.keys();
|
||||
while (keys2.hasNext()) {
|
||||
hashSet.add(keys2.next());
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
public JSONObject getConfigs() {
|
||||
return this.configsJson;
|
||||
}
|
||||
|
||||
public Date getFetchTime() {
|
||||
return this.fetchTime;
|
||||
}
|
||||
|
||||
public JSONObject getPersonalizationMetadata() {
|
||||
return this.personalizationMetadata;
|
||||
}
|
||||
|
||||
public JSONArray getRolloutMetadata() {
|
||||
return this.rolloutMetadata;
|
||||
}
|
||||
|
||||
public long getTemplateVersionNumber() {
|
||||
return this.templateVersionNumber;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.containerJson.hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.containerJson.toString();
|
||||
}
|
||||
|
||||
private ConfigContainer(JSONObject jSONObject, Date date, JSONArray jSONArray, JSONObject jSONObject2, long j4, JSONArray jSONArray2) throws JSONException {
|
||||
JSONObject jSONObject3 = new JSONObject();
|
||||
jSONObject3.put(CONFIGS_KEY, jSONObject);
|
||||
jSONObject3.put(FETCH_TIME_KEY, date.getTime());
|
||||
jSONObject3.put(ABT_EXPERIMENTS_KEY, jSONArray);
|
||||
jSONObject3.put(PERSONALIZATION_METADATA_KEY, jSONObject2);
|
||||
jSONObject3.put(TEMPLATE_VERSION_NUMBER_KEY, j4);
|
||||
jSONObject3.put(ROLLOUT_METADATA_KEY, jSONArray2);
|
||||
this.configsJson = jSONObject;
|
||||
this.fetchTime = date;
|
||||
this.abtExperiments = jSONArray;
|
||||
this.personalizationMetadata = jSONObject2;
|
||||
this.templateVersionNumber = j4;
|
||||
this.rolloutMetadata = jSONArray2;
|
||||
this.containerJson = jSONObject3;
|
||||
}
|
||||
|
||||
public static Builder newBuilder(ConfigContainer configContainer) {
|
||||
return new Builder(configContainer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import C.w;
|
||||
import I2.k;
|
||||
import android.text.format.DateUtils;
|
||||
import c2.i;
|
||||
import c2.j;
|
||||
import com.google.android.gms.common.util.Clock;
|
||||
import com.google.android.gms.tasks.Continuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.analytics.connector.AnalyticsConnector;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.installations.InstallationTokenResult;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigFetchThrottledException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigMetadataClient;
|
||||
import com.google.firebase.sessions.settings.RemoteSettings;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigFetchHandler {
|
||||
static final String FIRST_OPEN_TIME_KEY = "_fot";
|
||||
static final int HTTP_TOO_MANY_REQUESTS = 429;
|
||||
private static final String X_FIREBASE_RC_FETCH_TYPE = "X-Firebase-RC-Fetch-Type";
|
||||
private final Provider<AnalyticsConnector> analyticsConnector;
|
||||
private final Clock clock;
|
||||
private final Map<String, String> customHttpHeaders;
|
||||
private final Executor executor;
|
||||
private final ConfigCacheClient fetchedConfigsCache;
|
||||
private final FirebaseInstallationsApi firebaseInstallations;
|
||||
private final ConfigFetchHttpClient frcBackendApiClient;
|
||||
private final ConfigMetadataClient frcMetadata;
|
||||
private final Random randomGenerator;
|
||||
public static final long DEFAULT_MINIMUM_FETCH_INTERVAL_IN_SECONDS = TimeUnit.HOURS.toSeconds(12);
|
||||
static final int[] BACKOFF_TIME_DURATIONS_IN_MINUTES = {2, 4, 8, 16, 32, 64, 128, 256};
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class FetchResponse {
|
||||
private final Date fetchTime;
|
||||
private final ConfigContainer fetchedConfigs;
|
||||
private final String lastFetchETag;
|
||||
private final int status;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface Status {
|
||||
public static final int BACKEND_HAS_NO_UPDATES = 1;
|
||||
public static final int BACKEND_UPDATES_FETCHED = 0;
|
||||
public static final int LOCAL_STORAGE_USED = 2;
|
||||
}
|
||||
|
||||
private FetchResponse(Date date, int i, ConfigContainer configContainer, String str) {
|
||||
this.fetchTime = date;
|
||||
this.status = i;
|
||||
this.fetchedConfigs = configContainer;
|
||||
this.lastFetchETag = str;
|
||||
}
|
||||
|
||||
public static FetchResponse forBackendHasNoUpdates(Date date, ConfigContainer configContainer) {
|
||||
return new FetchResponse(date, 1, configContainer, null);
|
||||
}
|
||||
|
||||
public static FetchResponse forBackendUpdatesFetched(ConfigContainer configContainer, String str) {
|
||||
return new FetchResponse(configContainer.getFetchTime(), 0, configContainer, str);
|
||||
}
|
||||
|
||||
public static FetchResponse forLocalStorageUsed(Date date) {
|
||||
return new FetchResponse(date, 2, null, null);
|
||||
}
|
||||
|
||||
public Date getFetchTime() {
|
||||
return this.fetchTime;
|
||||
}
|
||||
|
||||
public ConfigContainer getFetchedConfigs() {
|
||||
return this.fetchedConfigs;
|
||||
}
|
||||
|
||||
public String getLastFetchETag() {
|
||||
return this.lastFetchETag;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum FetchType {
|
||||
BASE("BASE"),
|
||||
REALTIME("REALTIME");
|
||||
|
||||
private final String value;
|
||||
|
||||
FetchType(String str) {
|
||||
this.value = str;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigFetchHandler(FirebaseInstallationsApi firebaseInstallationsApi, Provider<AnalyticsConnector> provider, Executor executor, Clock clock, Random random, ConfigCacheClient configCacheClient, ConfigFetchHttpClient configFetchHttpClient, ConfigMetadataClient configMetadataClient, Map<String, String> map) {
|
||||
this.firebaseInstallations = firebaseInstallationsApi;
|
||||
this.analyticsConnector = provider;
|
||||
this.executor = executor;
|
||||
this.clock = clock;
|
||||
this.randomGenerator = random;
|
||||
this.fetchedConfigsCache = configCacheClient;
|
||||
this.frcBackendApiClient = configFetchHttpClient;
|
||||
this.frcMetadata = configMetadataClient;
|
||||
this.customHttpHeaders = map;
|
||||
}
|
||||
|
||||
private boolean areCachedFetchConfigsValid(long j4, Date date) {
|
||||
Date lastSuccessfulFetchTime = this.frcMetadata.getLastSuccessfulFetchTime();
|
||||
if (lastSuccessfulFetchTime.equals(ConfigMetadataClient.LAST_FETCH_TIME_NO_FETCH_YET)) {
|
||||
return false;
|
||||
}
|
||||
return date.before(new Date(TimeUnit.SECONDS.toMillis(j4) + lastSuccessfulFetchTime.getTime()));
|
||||
}
|
||||
|
||||
private FirebaseRemoteConfigServerException createExceptionWithGenericMessage(FirebaseRemoteConfigServerException firebaseRemoteConfigServerException) throws FirebaseRemoteConfigClientException {
|
||||
String str;
|
||||
int httpStatusCode = firebaseRemoteConfigServerException.getHttpStatusCode();
|
||||
if (httpStatusCode == 401) {
|
||||
str = "The request did not have the required credentials. Please make sure your google-services.json is valid.";
|
||||
} else if (httpStatusCode == 403) {
|
||||
str = "The user is not authorized to access the project. Please make sure you are using the API key that corresponds to your Firebase project.";
|
||||
} else {
|
||||
if (httpStatusCode == HTTP_TOO_MANY_REQUESTS) {
|
||||
throw new FirebaseRemoteConfigClientException("The throttled response from the server was not handled correctly by the FRC SDK.");
|
||||
}
|
||||
if (httpStatusCode != 500) {
|
||||
switch (httpStatusCode) {
|
||||
case 502:
|
||||
case 503:
|
||||
case 504:
|
||||
str = "The server is unavailable. Please try again later.";
|
||||
break;
|
||||
default:
|
||||
str = "The server returned an unexpected error.";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
str = "There was an internal server error.";
|
||||
}
|
||||
}
|
||||
return new FirebaseRemoteConfigServerException(firebaseRemoteConfigServerException.getHttpStatusCode(), "Fetch failed: ".concat(str), firebaseRemoteConfigServerException);
|
||||
}
|
||||
|
||||
private String createThrottledMessage(long j4) {
|
||||
return w.z("Fetch is throttled. Please wait before calling fetch again: ", DateUtils.formatElapsedTime(TimeUnit.MILLISECONDS.toSeconds(j4)));
|
||||
}
|
||||
|
||||
private FetchResponse fetchFromBackend(String str, String str2, Date date, Map<String, String> map) throws FirebaseRemoteConfigException {
|
||||
Date date2;
|
||||
try {
|
||||
date2 = date;
|
||||
} catch (FirebaseRemoteConfigServerException e4) {
|
||||
e = e4;
|
||||
date2 = date;
|
||||
}
|
||||
try {
|
||||
FetchResponse fetch = this.frcBackendApiClient.fetch(this.frcBackendApiClient.createHttpURLConnection(), str, str2, getUserProperties(), this.frcMetadata.getLastFetchETag(), map, getFirstOpenTime(), date2);
|
||||
if (fetch.getFetchedConfigs() != null) {
|
||||
this.frcMetadata.setLastTemplateVersion(fetch.getFetchedConfigs().getTemplateVersionNumber());
|
||||
}
|
||||
if (fetch.getLastFetchETag() != null) {
|
||||
this.frcMetadata.setLastFetchETag(fetch.getLastFetchETag());
|
||||
}
|
||||
this.frcMetadata.resetBackoff();
|
||||
return fetch;
|
||||
} catch (FirebaseRemoteConfigServerException e5) {
|
||||
e = e5;
|
||||
FirebaseRemoteConfigServerException firebaseRemoteConfigServerException = e;
|
||||
ConfigMetadataClient.BackoffMetadata updateAndReturnBackoffMetadata = updateAndReturnBackoffMetadata(firebaseRemoteConfigServerException.getHttpStatusCode(), date2);
|
||||
if (shouldThrottle(updateAndReturnBackoffMetadata, firebaseRemoteConfigServerException.getHttpStatusCode())) {
|
||||
throw new FirebaseRemoteConfigFetchThrottledException(updateAndReturnBackoffMetadata.getBackoffEndTime().getTime());
|
||||
}
|
||||
throw createExceptionWithGenericMessage(firebaseRemoteConfigServerException);
|
||||
}
|
||||
}
|
||||
|
||||
private Task<FetchResponse> fetchFromBackendAndCacheResponse(String str, String str2, Date date, Map<String, String> map) {
|
||||
try {
|
||||
FetchResponse fetchFromBackend = fetchFromBackend(str, str2, date, map);
|
||||
return fetchFromBackend.getStatus() != 0 ? Tasks.forResult(fetchFromBackend) : this.fetchedConfigsCache.put(fetchFromBackend.getFetchedConfigs()).onSuccessTask(this.executor, new k(fetchFromBackend, 20));
|
||||
} catch (FirebaseRemoteConfigException e4) {
|
||||
return Tasks.forException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: fetchIfCacheExpiredAndNotThrottled, reason: merged with bridge method [inline-methods] */
|
||||
public Task<FetchResponse> lambda$fetch$0(Task<ConfigContainer> task, long j4, final Map<String, String> map) {
|
||||
final ConfigFetchHandler configFetchHandler;
|
||||
Task continueWithTask;
|
||||
final Date date = new Date(this.clock.currentTimeMillis());
|
||||
if (task.isSuccessful() && areCachedFetchConfigsValid(j4, date)) {
|
||||
return Tasks.forResult(FetchResponse.forLocalStorageUsed(date));
|
||||
}
|
||||
Date backoffEndTimeInMillis = getBackoffEndTimeInMillis(date);
|
||||
if (backoffEndTimeInMillis != null) {
|
||||
continueWithTask = Tasks.forException(new FirebaseRemoteConfigFetchThrottledException(createThrottledMessage(backoffEndTimeInMillis.getTime() - date.getTime()), backoffEndTimeInMillis.getTime()));
|
||||
configFetchHandler = this;
|
||||
} else {
|
||||
final Task<String> id = this.firebaseInstallations.getId();
|
||||
final Task<InstallationTokenResult> token = this.firebaseInstallations.getToken(false);
|
||||
configFetchHandler = this;
|
||||
continueWithTask = Tasks.whenAllComplete((Task<?>[]) new Task[]{id, token}).continueWithTask(this.executor, new Continuation() { // from class: com.google.firebase.remoteconfig.internal.c
|
||||
@Override // com.google.android.gms.tasks.Continuation
|
||||
public final Object then(Task task2) {
|
||||
Task lambda$fetchIfCacheExpiredAndNotThrottled$2;
|
||||
lambda$fetchIfCacheExpiredAndNotThrottled$2 = ConfigFetchHandler.this.lambda$fetchIfCacheExpiredAndNotThrottled$2(id, token, date, map, task2);
|
||||
return lambda$fetchIfCacheExpiredAndNotThrottled$2;
|
||||
}
|
||||
});
|
||||
}
|
||||
return continueWithTask.continueWithTask(configFetchHandler.executor, new i(2, configFetchHandler, date));
|
||||
}
|
||||
|
||||
private Date getBackoffEndTimeInMillis(Date date) {
|
||||
Date backoffEndTime = this.frcMetadata.getBackoffMetadata().getBackoffEndTime();
|
||||
if (date.before(backoffEndTime)) {
|
||||
return backoffEndTime;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Long getFirstOpenTime() {
|
||||
AnalyticsConnector analyticsConnector = this.analyticsConnector.get();
|
||||
if (analyticsConnector == null) {
|
||||
return null;
|
||||
}
|
||||
return (Long) analyticsConnector.getUserProperties(true).get(FIRST_OPEN_TIME_KEY);
|
||||
}
|
||||
|
||||
private long getRandomizedBackoffDurationInMillis(int i) {
|
||||
TimeUnit timeUnit = TimeUnit.MINUTES;
|
||||
int[] iArr = BACKOFF_TIME_DURATIONS_IN_MINUTES;
|
||||
return (timeUnit.toMillis(iArr[Math.min(i, iArr.length) - 1]) / 2) + this.randomGenerator.nextInt((int) r0);
|
||||
}
|
||||
|
||||
private Map<String, String> getUserProperties() {
|
||||
HashMap hashMap = new HashMap();
|
||||
AnalyticsConnector analyticsConnector = this.analyticsConnector.get();
|
||||
if (analyticsConnector != null) {
|
||||
for (Map.Entry<String, Object> entry : analyticsConnector.getUserProperties(false).entrySet()) {
|
||||
hashMap.put(entry.getKey(), entry.getValue().toString());
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
private boolean isThrottleableServerError(int i) {
|
||||
return i == HTTP_TOO_MANY_REQUESTS || i == 502 || i == 503 || i == 504;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public /* synthetic */ Task lambda$fetchIfCacheExpiredAndNotThrottled$2(Task task, Task task2, Date date, Map map, Task task3) throws Exception {
|
||||
return !task.isSuccessful() ? Tasks.forException(new FirebaseRemoteConfigClientException("Firebase Installations failed to get installation ID for fetch.", task.getException())) : !task2.isSuccessful() ? Tasks.forException(new FirebaseRemoteConfigClientException("Firebase Installations failed to get installation auth token for fetch.", task2.getException())) : fetchFromBackendAndCacheResponse((String) task.getResult(), ((InstallationTokenResult) task2.getResult()).getToken(), date, map);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public /* synthetic */ Task lambda$fetchIfCacheExpiredAndNotThrottled$3(Date date, Task task) throws Exception {
|
||||
updateLastFetchStatusAndTime(task, date);
|
||||
return task;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public /* synthetic */ Task lambda$fetchNowWithTypeAndAttemptNumber$1(Map map, Task task) throws Exception {
|
||||
return lambda$fetch$0(task, 0L, map);
|
||||
}
|
||||
|
||||
private boolean shouldThrottle(ConfigMetadataClient.BackoffMetadata backoffMetadata, int i) {
|
||||
return backoffMetadata.getNumFailedFetches() > 1 || i == HTTP_TOO_MANY_REQUESTS;
|
||||
}
|
||||
|
||||
private ConfigMetadataClient.BackoffMetadata updateAndReturnBackoffMetadata(int i, Date date) {
|
||||
if (isThrottleableServerError(i)) {
|
||||
updateBackoffMetadataWithLastFailedFetchTime(date);
|
||||
}
|
||||
return this.frcMetadata.getBackoffMetadata();
|
||||
}
|
||||
|
||||
private void updateBackoffMetadataWithLastFailedFetchTime(Date date) {
|
||||
int numFailedFetches = this.frcMetadata.getBackoffMetadata().getNumFailedFetches() + 1;
|
||||
this.frcMetadata.setBackoffMetadata(numFailedFetches, new Date(date.getTime() + getRandomizedBackoffDurationInMillis(numFailedFetches)));
|
||||
}
|
||||
|
||||
private void updateLastFetchStatusAndTime(Task<FetchResponse> task, Date date) {
|
||||
if (task.isSuccessful()) {
|
||||
this.frcMetadata.updateLastFetchAsSuccessfulAt(date);
|
||||
return;
|
||||
}
|
||||
Exception exception = task.getException();
|
||||
if (exception == null) {
|
||||
return;
|
||||
}
|
||||
if (exception instanceof FirebaseRemoteConfigFetchThrottledException) {
|
||||
this.frcMetadata.updateLastFetchAsThrottled();
|
||||
} else {
|
||||
this.frcMetadata.updateLastFetchAsFailed();
|
||||
}
|
||||
}
|
||||
|
||||
public Task<FetchResponse> fetch() {
|
||||
return fetch(this.frcMetadata.getMinimumFetchIntervalInSeconds());
|
||||
}
|
||||
|
||||
public Task<FetchResponse> fetchNowWithTypeAndAttemptNumber(FetchType fetchType, int i) {
|
||||
HashMap hashMap = new HashMap(this.customHttpHeaders);
|
||||
hashMap.put(X_FIREBASE_RC_FETCH_TYPE, fetchType.getValue() + RemoteSettings.FORWARD_SLASH_STRING + i);
|
||||
return this.fetchedConfigsCache.get().continueWithTask(this.executor, new i(3, this, hashMap));
|
||||
}
|
||||
|
||||
public Provider<AnalyticsConnector> getAnalyticsConnector() {
|
||||
return this.analyticsConnector;
|
||||
}
|
||||
|
||||
public long getTemplateVersionNumber() {
|
||||
return this.frcMetadata.getLastTemplateVersion();
|
||||
}
|
||||
|
||||
public Task<FetchResponse> fetch(long j4) {
|
||||
HashMap hashMap = new HashMap(this.customHttpHeaders);
|
||||
hashMap.put(X_FIREBASE_RC_FETCH_TYPE, FetchType.BASE.getValue() + "/1");
|
||||
return this.fetchedConfigsCache.get().continueWithTask(this.executor, new j(this, j4, hashMap));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.android.gms.common.util.AndroidUtilsLight;
|
||||
import com.google.android.gms.common.util.Hex;
|
||||
import com.google.firebase.remoteconfig.BuildConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigFetchHandler;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigFetchHttpClient {
|
||||
private static final String API_KEY_HEADER = "X-Goog-Api-Key";
|
||||
private static final String ETAG_HEADER = "ETag";
|
||||
private static final Pattern GMP_APP_ID_PATTERN = Pattern.compile("^[^:]+:([0-9]+):(android|ios|web):([0-9a-f]+)");
|
||||
private static final String IF_NONE_MATCH_HEADER = "If-None-Match";
|
||||
private static final String INSTALLATIONS_AUTH_TOKEN_HEADER = "X-Goog-Firebase-Installations-Auth";
|
||||
private static final String ISO_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
|
||||
private static final String X_ANDROID_CERT_HEADER = "X-Android-Cert";
|
||||
private static final String X_ANDROID_PACKAGE_HEADER = "X-Android-Package";
|
||||
private static final String X_GOOGLE_GFE_CAN_RETRY = "X-Google-GFE-Can-Retry";
|
||||
private final String apiKey;
|
||||
private final String appId;
|
||||
private final long connectTimeoutInSeconds;
|
||||
private final Context context;
|
||||
private final String namespace;
|
||||
private final String projectNumber;
|
||||
private final long readTimeoutInSeconds;
|
||||
|
||||
public ConfigFetchHttpClient(Context context, String str, String str2, String str3, long j4, long j5) {
|
||||
this.context = context;
|
||||
this.appId = str;
|
||||
this.apiKey = str2;
|
||||
this.projectNumber = extractProjectNumberFromAppId(str);
|
||||
this.namespace = str3;
|
||||
this.connectTimeoutInSeconds = j4;
|
||||
this.readTimeoutInSeconds = j5;
|
||||
}
|
||||
|
||||
private boolean backendHasUpdates(JSONObject jSONObject) {
|
||||
try {
|
||||
return true ^ jSONObject.get(RemoteConfigConstants.ResponseFieldKey.STATE).equals("NO_CHANGE");
|
||||
} catch (JSONException unused) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private String convertToISOString(long j4) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(ISO_DATE_PATTERN, Locale.US);
|
||||
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
return simpleDateFormat.format(Long.valueOf(j4));
|
||||
}
|
||||
|
||||
private JSONObject createFetchRequestBody(String str, String str2, Map<String, String> map, Long l4) throws FirebaseRemoteConfigClientException {
|
||||
HashMap hashMap = new HashMap();
|
||||
if (str == null) {
|
||||
throw new FirebaseRemoteConfigClientException("Fetch failed: Firebase installation id is null.");
|
||||
}
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.INSTANCE_ID, str);
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.INSTANCE_ID_TOKEN, str2);
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.APP_ID, this.appId);
|
||||
Locale locale = this.context.getResources().getConfiguration().locale;
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.COUNTRY_CODE, locale.getCountry());
|
||||
int i = Build.VERSION.SDK_INT;
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.LANGUAGE_CODE, locale.toLanguageTag());
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.PLATFORM_VERSION, Integer.toString(i));
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.TIME_ZONE, TimeZone.getDefault().getID());
|
||||
try {
|
||||
PackageInfo packageInfo = this.context.getPackageManager().getPackageInfo(this.context.getPackageName(), 0);
|
||||
if (packageInfo != null) {
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.APP_VERSION, packageInfo.versionName);
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.APP_BUILD, Long.toString(E.a.b(packageInfo)));
|
||||
}
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
}
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.PACKAGE_NAME, this.context.getPackageName());
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.SDK_VERSION, BuildConfig.VERSION_NAME);
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.ANALYTICS_USER_PROPERTIES, new JSONObject(map));
|
||||
if (l4 != null) {
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.FIRST_OPEN_TIME, convertToISOString(l4.longValue()));
|
||||
}
|
||||
return new JSONObject(hashMap);
|
||||
}
|
||||
|
||||
private static ConfigContainer extractConfigs(JSONObject jSONObject, Date date) throws FirebaseRemoteConfigClientException {
|
||||
JSONObject jSONObject2;
|
||||
JSONArray jSONArray;
|
||||
JSONObject jSONObject3;
|
||||
try {
|
||||
ConfigContainer.Builder withFetchTime = ConfigContainer.newBuilder().withFetchTime(date);
|
||||
JSONArray jSONArray2 = null;
|
||||
try {
|
||||
jSONObject2 = jSONObject.getJSONObject(RemoteConfigConstants.ResponseFieldKey.ENTRIES);
|
||||
} catch (JSONException unused) {
|
||||
jSONObject2 = null;
|
||||
}
|
||||
if (jSONObject2 != null) {
|
||||
withFetchTime = withFetchTime.replaceConfigsWith(jSONObject2);
|
||||
}
|
||||
try {
|
||||
jSONArray = jSONObject.getJSONArray(RemoteConfigConstants.ResponseFieldKey.EXPERIMENT_DESCRIPTIONS);
|
||||
} catch (JSONException unused2) {
|
||||
jSONArray = null;
|
||||
}
|
||||
if (jSONArray != null) {
|
||||
withFetchTime = withFetchTime.withAbtExperiments(jSONArray);
|
||||
}
|
||||
try {
|
||||
jSONObject3 = jSONObject.getJSONObject(RemoteConfigConstants.ResponseFieldKey.PERSONALIZATION_METADATA);
|
||||
} catch (JSONException unused3) {
|
||||
jSONObject3 = null;
|
||||
}
|
||||
if (jSONObject3 != null) {
|
||||
withFetchTime = withFetchTime.withPersonalizationMetadata(jSONObject3);
|
||||
}
|
||||
String string = jSONObject.has(RemoteConfigConstants.ResponseFieldKey.TEMPLATE_VERSION_NUMBER) ? jSONObject.getString(RemoteConfigConstants.ResponseFieldKey.TEMPLATE_VERSION_NUMBER) : null;
|
||||
if (string != null) {
|
||||
withFetchTime.withTemplateVersionNumber(Long.parseLong(string));
|
||||
}
|
||||
try {
|
||||
jSONArray2 = jSONObject.getJSONArray(RemoteConfigConstants.ResponseFieldKey.ROLLOUT_METADATA);
|
||||
} catch (JSONException unused4) {
|
||||
}
|
||||
if (jSONArray2 != null) {
|
||||
withFetchTime = withFetchTime.withRolloutMetadata(jSONArray2);
|
||||
}
|
||||
return withFetchTime.build();
|
||||
} catch (JSONException e4) {
|
||||
throw new FirebaseRemoteConfigClientException("Fetch failed: fetch response could not be parsed.", e4);
|
||||
}
|
||||
}
|
||||
|
||||
private static String extractProjectNumberFromAppId(String str) {
|
||||
Matcher matcher = GMP_APP_ID_PATTERN.matcher(str);
|
||||
if (matcher.matches()) {
|
||||
return matcher.group(1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private JSONObject getFetchResponseBody(URLConnection uRLConnection) throws IOException, JSONException {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream(), "utf-8"));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (true) {
|
||||
int read = bufferedReader.read();
|
||||
if (read == -1) {
|
||||
return new JSONObject(sb.toString());
|
||||
}
|
||||
sb.append((char) read);
|
||||
}
|
||||
}
|
||||
|
||||
private String getFetchUrl(String str, String str2) {
|
||||
return "https://firebaseremoteconfig.googleapis.com/v1/projects/" + str + "/namespaces/" + str2 + ":fetch";
|
||||
}
|
||||
|
||||
private String getFingerprintHashForPackage() {
|
||||
try {
|
||||
Context context = this.context;
|
||||
byte[] packageCertificateHashBytes = AndroidUtilsLight.getPackageCertificateHashBytes(context, context.getPackageName());
|
||||
if (packageCertificateHashBytes != null) {
|
||||
return Hex.bytesToStringUppercase(packageCertificateHashBytes, false);
|
||||
}
|
||||
Log.e(FirebaseRemoteConfig.TAG, "Could not get fingerprint hash for package: " + this.context.getPackageName());
|
||||
return null;
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
Log.e(FirebaseRemoteConfig.TAG, "No such package: " + this.context.getPackageName(), e4);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void setCommonRequestHeaders(HttpURLConnection httpURLConnection, String str) {
|
||||
httpURLConnection.setRequestProperty(API_KEY_HEADER, this.apiKey);
|
||||
httpURLConnection.setRequestProperty(X_ANDROID_PACKAGE_HEADER, this.context.getPackageName());
|
||||
httpURLConnection.setRequestProperty(X_ANDROID_CERT_HEADER, getFingerprintHashForPackage());
|
||||
httpURLConnection.setRequestProperty(X_GOOGLE_GFE_CAN_RETRY, "yes");
|
||||
httpURLConnection.setRequestProperty(INSTALLATIONS_AUTH_TOKEN_HEADER, str);
|
||||
httpURLConnection.setRequestProperty("Content-Type", "application/json");
|
||||
httpURLConnection.setRequestProperty("Accept", "application/json");
|
||||
}
|
||||
|
||||
private void setCustomRequestHeaders(HttpURLConnection httpURLConnection, Map<String, String> map) {
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
httpURLConnection.setRequestProperty(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void setFetchRequestBody(HttpURLConnection httpURLConnection, byte[] bArr) throws IOException {
|
||||
httpURLConnection.setFixedLengthStreamingMode(bArr.length);
|
||||
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(httpURLConnection.getOutputStream());
|
||||
bufferedOutputStream.write(bArr);
|
||||
bufferedOutputStream.flush();
|
||||
bufferedOutputStream.close();
|
||||
}
|
||||
|
||||
private void setUpUrlConnection(HttpURLConnection httpURLConnection, String str, String str2, Map<String, String> map) {
|
||||
httpURLConnection.setDoOutput(true);
|
||||
TimeUnit timeUnit = TimeUnit.SECONDS;
|
||||
httpURLConnection.setConnectTimeout((int) timeUnit.toMillis(this.connectTimeoutInSeconds));
|
||||
httpURLConnection.setReadTimeout((int) timeUnit.toMillis(this.readTimeoutInSeconds));
|
||||
httpURLConnection.setRequestProperty(IF_NONE_MATCH_HEADER, str);
|
||||
setCommonRequestHeaders(httpURLConnection, str2);
|
||||
setCustomRequestHeaders(httpURLConnection, map);
|
||||
}
|
||||
|
||||
public HttpURLConnection createHttpURLConnection() throws FirebaseRemoteConfigException {
|
||||
try {
|
||||
return (HttpURLConnection) new URL(getFetchUrl(this.projectNumber, this.namespace)).openConnection();
|
||||
} catch (IOException e4) {
|
||||
throw new FirebaseRemoteConfigException(e4.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Keep
|
||||
public ConfigFetchHandler.FetchResponse fetch(HttpURLConnection httpURLConnection, String str, String str2, Map<String, String> map, String str3, Map<String, String> map2, Long l4, Date date) throws FirebaseRemoteConfigException {
|
||||
setUpUrlConnection(httpURLConnection, str3, str2, map2);
|
||||
try {
|
||||
try {
|
||||
setFetchRequestBody(httpURLConnection, createFetchRequestBody(str, str2, map, l4).toString().getBytes("utf-8"));
|
||||
httpURLConnection.connect();
|
||||
int responseCode = httpURLConnection.getResponseCode();
|
||||
if (responseCode != 200) {
|
||||
throw new FirebaseRemoteConfigServerException(responseCode, httpURLConnection.getResponseMessage());
|
||||
}
|
||||
String headerField = httpURLConnection.getHeaderField(ETAG_HEADER);
|
||||
JSONObject fetchResponseBody = getFetchResponseBody(httpURLConnection);
|
||||
try {
|
||||
httpURLConnection.getInputStream().close();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
ConfigContainer extractConfigs = extractConfigs(fetchResponseBody, date);
|
||||
return !backendHasUpdates(fetchResponseBody) ? ConfigFetchHandler.FetchResponse.forBackendHasNoUpdates(date, extractConfigs) : ConfigFetchHandler.FetchResponse.forBackendUpdatesFetched(extractConfigs, headerField);
|
||||
} catch (IOException | JSONException e4) {
|
||||
throw new FirebaseRemoteConfigClientException("The client had an error while calling the backend!", e4);
|
||||
}
|
||||
} finally {
|
||||
httpURLConnection.disconnect();
|
||||
try {
|
||||
httpURLConnection.getInputStream().close();
|
||||
} catch (IOException unused2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public long getConnectTimeoutInSeconds() {
|
||||
return this.connectTimeoutInSeconds;
|
||||
}
|
||||
|
||||
public long getReadTimeoutInSeconds() {
|
||||
return this.readTimeoutInSeconds;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.util.Log;
|
||||
import androidx.fragment.app.RunnableC0143e;
|
||||
import com.google.android.gms.common.util.BiConsumer;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.regex.Pattern;
|
||||
import org.json.JSONException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigGetParameterHandler {
|
||||
private final ConfigCacheClient activatedConfigsCache;
|
||||
private final ConfigCacheClient defaultConfigsCache;
|
||||
private final Executor executor;
|
||||
private final Set<BiConsumer<String, ConfigContainer>> listeners = new HashSet();
|
||||
public static final Charset FRC_BYTE_ARRAY_ENCODING = Charset.forName("UTF-8");
|
||||
static final Pattern TRUE_REGEX = Pattern.compile("^(1|true|t|yes|y|on)$", 2);
|
||||
static final Pattern FALSE_REGEX = Pattern.compile("^(0|false|f|no|n|off|)$", 2);
|
||||
|
||||
public ConfigGetParameterHandler(Executor executor, ConfigCacheClient configCacheClient, ConfigCacheClient configCacheClient2) {
|
||||
this.executor = executor;
|
||||
this.activatedConfigsCache = configCacheClient;
|
||||
this.defaultConfigsCache = configCacheClient2;
|
||||
}
|
||||
|
||||
public static /* synthetic */ void a(BiConsumer biConsumer, String str, ConfigContainer configContainer) {
|
||||
biConsumer.accept(str, configContainer);
|
||||
}
|
||||
|
||||
private void callListeners(String str, ConfigContainer configContainer) {
|
||||
if (configContainer == null) {
|
||||
return;
|
||||
}
|
||||
synchronized (this.listeners) {
|
||||
try {
|
||||
Iterator<BiConsumer<String, ConfigContainer>> it = this.listeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
this.executor.execute(new RunnableC0143e(it.next(), str, configContainer, 4));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static ConfigContainer getConfigsFromCache(ConfigCacheClient configCacheClient) {
|
||||
return configCacheClient.getBlocking();
|
||||
}
|
||||
|
||||
private static Double getDoubleFromCache(ConfigCacheClient configCacheClient, String str) {
|
||||
ConfigContainer configsFromCache = getConfigsFromCache(configCacheClient);
|
||||
if (configsFromCache == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Double.valueOf(configsFromCache.getConfigs().getDouble(str));
|
||||
} catch (JSONException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<String> getKeySetFromCache(ConfigCacheClient configCacheClient) {
|
||||
HashSet hashSet = new HashSet();
|
||||
ConfigContainer configsFromCache = getConfigsFromCache(configCacheClient);
|
||||
if (configsFromCache != null) {
|
||||
Iterator<String> keys = configsFromCache.getConfigs().keys();
|
||||
while (keys.hasNext()) {
|
||||
hashSet.add(keys.next());
|
||||
}
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
private static Long getLongFromCache(ConfigCacheClient configCacheClient, String str) {
|
||||
ConfigContainer configsFromCache = getConfigsFromCache(configCacheClient);
|
||||
if (configsFromCache == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Long.valueOf(configsFromCache.getConfigs().getLong(str));
|
||||
} catch (JSONException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String getStringFromCache(ConfigCacheClient configCacheClient, String str) {
|
||||
ConfigContainer configsFromCache = getConfigsFromCache(configCacheClient);
|
||||
if (configsFromCache == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return configsFromCache.getConfigs().getString(str);
|
||||
} catch (JSONException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void logParameterValueDoesNotExist(String str, String str2) {
|
||||
Log.w(FirebaseRemoteConfig.TAG, "No value of type '" + str2 + "' exists for parameter key '" + str + "'.");
|
||||
}
|
||||
|
||||
public void addListener(BiConsumer<String, ConfigContainer> biConsumer) {
|
||||
synchronized (this.listeners) {
|
||||
this.listeners.add(biConsumer);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, FirebaseRemoteConfigValue> getAll() {
|
||||
HashSet hashSet = new HashSet();
|
||||
hashSet.addAll(getKeySetFromCache(this.activatedConfigsCache));
|
||||
hashSet.addAll(getKeySetFromCache(this.defaultConfigsCache));
|
||||
HashMap hashMap = new HashMap();
|
||||
Iterator it = hashSet.iterator();
|
||||
while (it.hasNext()) {
|
||||
String str = (String) it.next();
|
||||
hashMap.put(str, getValue(str));
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
public boolean getBoolean(String str) {
|
||||
String stringFromCache = getStringFromCache(this.activatedConfigsCache, str);
|
||||
if (stringFromCache != null) {
|
||||
if (TRUE_REGEX.matcher(stringFromCache).matches()) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return true;
|
||||
}
|
||||
if (FALSE_REGEX.matcher(stringFromCache).matches()) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
String stringFromCache2 = getStringFromCache(this.defaultConfigsCache, str);
|
||||
if (stringFromCache2 != null) {
|
||||
if (TRUE_REGEX.matcher(stringFromCache2).matches()) {
|
||||
return true;
|
||||
}
|
||||
if (FALSE_REGEX.matcher(stringFromCache2).matches()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "Boolean");
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte[] getByteArray(String str) {
|
||||
String stringFromCache = getStringFromCache(this.activatedConfigsCache, str);
|
||||
if (stringFromCache != null) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return stringFromCache.getBytes(FRC_BYTE_ARRAY_ENCODING);
|
||||
}
|
||||
String stringFromCache2 = getStringFromCache(this.defaultConfigsCache, str);
|
||||
if (stringFromCache2 != null) {
|
||||
return stringFromCache2.getBytes(FRC_BYTE_ARRAY_ENCODING);
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "ByteArray");
|
||||
return FirebaseRemoteConfig.DEFAULT_VALUE_FOR_BYTE_ARRAY;
|
||||
}
|
||||
|
||||
public double getDouble(String str) {
|
||||
Double doubleFromCache = getDoubleFromCache(this.activatedConfigsCache, str);
|
||||
if (doubleFromCache != null) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return doubleFromCache.doubleValue();
|
||||
}
|
||||
Double doubleFromCache2 = getDoubleFromCache(this.defaultConfigsCache, str);
|
||||
if (doubleFromCache2 != null) {
|
||||
return doubleFromCache2.doubleValue();
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "Double");
|
||||
return FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE;
|
||||
}
|
||||
|
||||
public Set<String> getKeysByPrefix(String str) {
|
||||
if (str == null) {
|
||||
str = "";
|
||||
}
|
||||
TreeSet treeSet = new TreeSet();
|
||||
ConfigContainer configsFromCache = getConfigsFromCache(this.activatedConfigsCache);
|
||||
if (configsFromCache != null) {
|
||||
treeSet.addAll(getKeysByPrefix(str, configsFromCache));
|
||||
}
|
||||
ConfigContainer configsFromCache2 = getConfigsFromCache(this.defaultConfigsCache);
|
||||
if (configsFromCache2 != null) {
|
||||
treeSet.addAll(getKeysByPrefix(str, configsFromCache2));
|
||||
}
|
||||
return treeSet;
|
||||
}
|
||||
|
||||
public long getLong(String str) {
|
||||
Long longFromCache = getLongFromCache(this.activatedConfigsCache, str);
|
||||
if (longFromCache != null) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return longFromCache.longValue();
|
||||
}
|
||||
Long longFromCache2 = getLongFromCache(this.defaultConfigsCache, str);
|
||||
if (longFromCache2 != null) {
|
||||
return longFromCache2.longValue();
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "Long");
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public String getString(String str) {
|
||||
String stringFromCache = getStringFromCache(this.activatedConfigsCache, str);
|
||||
if (stringFromCache != null) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return stringFromCache;
|
||||
}
|
||||
String stringFromCache2 = getStringFromCache(this.defaultConfigsCache, str);
|
||||
if (stringFromCache2 != null) {
|
||||
return stringFromCache2;
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "String");
|
||||
return "";
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigValue getValue(String str) {
|
||||
String stringFromCache = getStringFromCache(this.activatedConfigsCache, str);
|
||||
if (stringFromCache != null) {
|
||||
callListeners(str, getConfigsFromCache(this.activatedConfigsCache));
|
||||
return new FirebaseRemoteConfigValueImpl(stringFromCache, 2);
|
||||
}
|
||||
String stringFromCache2 = getStringFromCache(this.defaultConfigsCache, str);
|
||||
if (stringFromCache2 != null) {
|
||||
return new FirebaseRemoteConfigValueImpl(stringFromCache2, 1);
|
||||
}
|
||||
logParameterValueDoesNotExist(str, "FirebaseRemoteConfigValue");
|
||||
return new FirebaseRemoteConfigValueImpl("", 0);
|
||||
}
|
||||
|
||||
private static TreeSet<String> getKeysByPrefix(String str, ConfigContainer configContainer) {
|
||||
TreeSet<String> treeSet = new TreeSet<>();
|
||||
Iterator<String> keys = configContainer.getConfigs().keys();
|
||||
while (keys.hasNext()) {
|
||||
String next = keys.next();
|
||||
if (next.startsWith(str)) {
|
||||
treeSet.add(next);
|
||||
}
|
||||
}
|
||||
return treeSet;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
|
||||
import java.util.Date;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigMetadataClient {
|
||||
private static final String BACKOFF_END_TIME_IN_MILLIS_KEY = "backoff_end_time_in_millis";
|
||||
private static final String FETCH_TIMEOUT_IN_SECONDS_KEY = "fetch_timeout_in_seconds";
|
||||
private static final String LAST_FETCH_ETAG_KEY = "last_fetch_etag";
|
||||
private static final String LAST_FETCH_STATUS_KEY = "last_fetch_status";
|
||||
public static final long LAST_FETCH_TIME_IN_MILLIS_NO_FETCH_YET = -1;
|
||||
private static final String LAST_SUCCESSFUL_FETCH_TIME_IN_MILLIS_KEY = "last_fetch_time_in_millis";
|
||||
private static final String LAST_TEMPLATE_VERSION = "last_template_version";
|
||||
private static final String MINIMUM_FETCH_INTERVAL_IN_SECONDS_KEY = "minimum_fetch_interval_in_seconds";
|
||||
private static final long NO_BACKOFF_TIME_IN_MILLIS = -1;
|
||||
static final int NO_FAILED_FETCHES = 0;
|
||||
static final int NO_FAILED_REALTIME_STREAMS = 0;
|
||||
private static final String NUM_FAILED_FETCHES_KEY = "num_failed_fetches";
|
||||
private static final String NUM_FAILED_REALTIME_STREAMS_KEY = "num_failed_realtime_streams";
|
||||
private static final String REALTIME_BACKOFF_END_TIME_IN_MILLIS_KEY = "realtime_backoff_end_time_in_millis";
|
||||
private final SharedPreferences frcMetadata;
|
||||
static final Date LAST_FETCH_TIME_NO_FETCH_YET = new Date(-1);
|
||||
static final Date NO_BACKOFF_TIME = new Date(-1);
|
||||
private final Object frcInfoLock = new Object();
|
||||
private final Object backoffMetadataLock = new Object();
|
||||
private final Object realtimeBackoffMetadataLock = new Object();
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class BackoffMetadata {
|
||||
private Date backoffEndTime;
|
||||
private int numFailedFetches;
|
||||
|
||||
public BackoffMetadata(int i, Date date) {
|
||||
this.numFailedFetches = i;
|
||||
this.backoffEndTime = date;
|
||||
}
|
||||
|
||||
public Date getBackoffEndTime() {
|
||||
return this.backoffEndTime;
|
||||
}
|
||||
|
||||
public int getNumFailedFetches() {
|
||||
return this.numFailedFetches;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class RealtimeBackoffMetadata {
|
||||
private Date backoffEndTime;
|
||||
private int numFailedStreams;
|
||||
|
||||
public RealtimeBackoffMetadata(int i, Date date) {
|
||||
this.numFailedStreams = i;
|
||||
this.backoffEndTime = date;
|
||||
}
|
||||
|
||||
public Date getBackoffEndTime() {
|
||||
return this.backoffEndTime;
|
||||
}
|
||||
|
||||
public int getNumFailedStreams() {
|
||||
return this.numFailedStreams;
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigMetadataClient(SharedPreferences sharedPreferences) {
|
||||
this.frcMetadata = sharedPreferences;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().clear().commit();
|
||||
}
|
||||
}
|
||||
|
||||
public BackoffMetadata getBackoffMetadata() {
|
||||
BackoffMetadata backoffMetadata;
|
||||
synchronized (this.backoffMetadataLock) {
|
||||
backoffMetadata = new BackoffMetadata(this.frcMetadata.getInt(NUM_FAILED_FETCHES_KEY, 0), new Date(this.frcMetadata.getLong(BACKOFF_END_TIME_IN_MILLIS_KEY, -1L)));
|
||||
}
|
||||
return backoffMetadata;
|
||||
}
|
||||
|
||||
public long getFetchTimeoutInSeconds() {
|
||||
return this.frcMetadata.getLong(FETCH_TIMEOUT_IN_SECONDS_KEY, 60L);
|
||||
}
|
||||
|
||||
public FirebaseRemoteConfigInfo getInfo() {
|
||||
FirebaseRemoteConfigInfoImpl build;
|
||||
synchronized (this.frcInfoLock) {
|
||||
long j4 = this.frcMetadata.getLong(LAST_SUCCESSFUL_FETCH_TIME_IN_MILLIS_KEY, -1L);
|
||||
int i = this.frcMetadata.getInt(LAST_FETCH_STATUS_KEY, 0);
|
||||
build = FirebaseRemoteConfigInfoImpl.newBuilder().withLastFetchStatus(i).withLastSuccessfulFetchTimeInMillis(j4).withConfigSettings(new FirebaseRemoteConfigSettings.Builder().setFetchTimeoutInSeconds(this.frcMetadata.getLong(FETCH_TIMEOUT_IN_SECONDS_KEY, 60L)).setMinimumFetchIntervalInSeconds(this.frcMetadata.getLong(MINIMUM_FETCH_INTERVAL_IN_SECONDS_KEY, ConfigFetchHandler.DEFAULT_MINIMUM_FETCH_INTERVAL_IN_SECONDS)).build()).build();
|
||||
}
|
||||
return build;
|
||||
}
|
||||
|
||||
public String getLastFetchETag() {
|
||||
return this.frcMetadata.getString(LAST_FETCH_ETAG_KEY, null);
|
||||
}
|
||||
|
||||
public int getLastFetchStatus() {
|
||||
return this.frcMetadata.getInt(LAST_FETCH_STATUS_KEY, 0);
|
||||
}
|
||||
|
||||
public Date getLastSuccessfulFetchTime() {
|
||||
return new Date(this.frcMetadata.getLong(LAST_SUCCESSFUL_FETCH_TIME_IN_MILLIS_KEY, -1L));
|
||||
}
|
||||
|
||||
public long getLastTemplateVersion() {
|
||||
return this.frcMetadata.getLong(LAST_TEMPLATE_VERSION, 0L);
|
||||
}
|
||||
|
||||
public long getMinimumFetchIntervalInSeconds() {
|
||||
return this.frcMetadata.getLong(MINIMUM_FETCH_INTERVAL_IN_SECONDS_KEY, ConfigFetchHandler.DEFAULT_MINIMUM_FETCH_INTERVAL_IN_SECONDS);
|
||||
}
|
||||
|
||||
public RealtimeBackoffMetadata getRealtimeBackoffMetadata() {
|
||||
RealtimeBackoffMetadata realtimeBackoffMetadata;
|
||||
synchronized (this.realtimeBackoffMetadataLock) {
|
||||
realtimeBackoffMetadata = new RealtimeBackoffMetadata(this.frcMetadata.getInt(NUM_FAILED_REALTIME_STREAMS_KEY, 0), new Date(this.frcMetadata.getLong(REALTIME_BACKOFF_END_TIME_IN_MILLIS_KEY, -1L)));
|
||||
}
|
||||
return realtimeBackoffMetadata;
|
||||
}
|
||||
|
||||
public void resetBackoff() {
|
||||
setBackoffMetadata(0, NO_BACKOFF_TIME);
|
||||
}
|
||||
|
||||
public void resetRealtimeBackoff() {
|
||||
setRealtimeBackoffMetadata(0, NO_BACKOFF_TIME);
|
||||
}
|
||||
|
||||
public void setBackoffMetadata(int i, Date date) {
|
||||
synchronized (this.backoffMetadataLock) {
|
||||
this.frcMetadata.edit().putInt(NUM_FAILED_FETCHES_KEY, i).putLong(BACKOFF_END_TIME_IN_MILLIS_KEY, date.getTime()).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void setConfigSettings(FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putLong(FETCH_TIMEOUT_IN_SECONDS_KEY, firebaseRemoteConfigSettings.getFetchTimeoutInSeconds()).putLong(MINIMUM_FETCH_INTERVAL_IN_SECONDS_KEY, firebaseRemoteConfigSettings.getMinimumFetchIntervalInSeconds()).commit();
|
||||
}
|
||||
}
|
||||
|
||||
public void setConfigSettingsWithoutWaitingOnDiskWrite(FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putLong(FETCH_TIMEOUT_IN_SECONDS_KEY, firebaseRemoteConfigSettings.getFetchTimeoutInSeconds()).putLong(MINIMUM_FETCH_INTERVAL_IN_SECONDS_KEY, firebaseRemoteConfigSettings.getMinimumFetchIntervalInSeconds()).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void setLastFetchETag(String str) {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putString(LAST_FETCH_ETAG_KEY, str).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void setLastTemplateVersion(long j4) {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putLong(LAST_TEMPLATE_VERSION, j4).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void setRealtimeBackoffMetadata(int i, Date date) {
|
||||
synchronized (this.realtimeBackoffMetadataLock) {
|
||||
this.frcMetadata.edit().putInt(NUM_FAILED_REALTIME_STREAMS_KEY, i).putLong(REALTIME_BACKOFF_END_TIME_IN_MILLIS_KEY, date.getTime()).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLastFetchAsFailed() {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putInt(LAST_FETCH_STATUS_KEY, 1).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLastFetchAsSuccessfulAt(Date date) {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putInt(LAST_FETCH_STATUS_KEY, -1).putLong(LAST_SUCCESSFUL_FETCH_TIME_IN_MILLIS_KEY, date.getTime()).apply();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLastFetchAsThrottled() {
|
||||
synchronized (this.frcInfoLock) {
|
||||
this.frcMetadata.edit().putInt(LAST_FETCH_STATUS_KEY, 2).apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListener;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListenerRegistration;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigRealtimeHandler {
|
||||
private final ConfigCacheClient activatedCacheClient;
|
||||
private final ConfigFetchHandler configFetchHandler;
|
||||
private final ConfigRealtimeHttpClient configRealtimeHttpClient;
|
||||
private final Context context;
|
||||
private final FirebaseApp firebaseApp;
|
||||
private final FirebaseInstallationsApi firebaseInstallations;
|
||||
private final Set<ConfigUpdateListener> listeners;
|
||||
private final ConfigMetadataClient metadataClient;
|
||||
private final String namespace;
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigUpdateListenerRegistrationInternal implements ConfigUpdateListenerRegistration {
|
||||
private final ConfigUpdateListener listener;
|
||||
|
||||
public ConfigUpdateListenerRegistrationInternal(ConfigUpdateListener configUpdateListener) {
|
||||
this.listener = configUpdateListener;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListenerRegistration
|
||||
public void remove() {
|
||||
ConfigRealtimeHandler.this.removeRealtimeConfigUpdateListener(this.listener);
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigRealtimeHandler(FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, ConfigFetchHandler configFetchHandler, ConfigCacheClient configCacheClient, Context context, String str, ConfigMetadataClient configMetadataClient, ScheduledExecutorService scheduledExecutorService) {
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
this.listeners = linkedHashSet;
|
||||
this.configRealtimeHttpClient = new ConfigRealtimeHttpClient(firebaseApp, firebaseInstallationsApi, configFetchHandler, configCacheClient, context, str, linkedHashSet, configMetadataClient, scheduledExecutorService);
|
||||
this.firebaseApp = firebaseApp;
|
||||
this.configFetchHandler = configFetchHandler;
|
||||
this.firebaseInstallations = firebaseInstallationsApi;
|
||||
this.activatedCacheClient = configCacheClient;
|
||||
this.context = context;
|
||||
this.namespace = str;
|
||||
this.metadataClient = configMetadataClient;
|
||||
this.scheduledExecutorService = scheduledExecutorService;
|
||||
}
|
||||
|
||||
private synchronized void beginRealtime() {
|
||||
if (!this.listeners.isEmpty()) {
|
||||
this.configRealtimeHttpClient.startHttpConnection();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public synchronized void removeRealtimeConfigUpdateListener(ConfigUpdateListener configUpdateListener) {
|
||||
this.listeners.remove(configUpdateListener);
|
||||
}
|
||||
|
||||
public synchronized ConfigUpdateListenerRegistration addRealtimeConfigUpdateListener(ConfigUpdateListener configUpdateListener) {
|
||||
this.listeners.add(configUpdateListener);
|
||||
beginRealtime();
|
||||
return new ConfigUpdateListenerRegistrationInternal(configUpdateListener);
|
||||
}
|
||||
|
||||
public synchronized void setBackgroundState(boolean z3) {
|
||||
this.configRealtimeHttpClient.setRealtimeBackgroundState(z3);
|
||||
if (!z3) {
|
||||
beginRealtime();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,469 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import B0.C0031i;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
import c2.i;
|
||||
import com.google.android.gms.common.util.AndroidUtilsLight;
|
||||
import com.google.android.gms.common.util.Clock;
|
||||
import com.google.android.gms.common.util.DefaultClock;
|
||||
import com.google.android.gms.common.util.Hex;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.installations.FirebaseInstallationsApi;
|
||||
import com.google.firebase.installations.InstallationTokenResult;
|
||||
import com.google.firebase.remoteconfig.BuildConfig;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdate;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListener;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigServerException;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigRealtimeHttpClient {
|
||||
private static final String API_KEY_HEADER = "X-Goog-Api-Key";
|
||||
static final int[] BACKOFF_TIME_DURATIONS_IN_MINUTES = {2, 4, 8, 16, 32, 64, 128, 256};
|
||||
private static final Pattern GMP_APP_ID_PATTERN = Pattern.compile("^[^:]+:([0-9]+):(android|ios|web):([0-9a-f]+)");
|
||||
private static final String INSTALLATIONS_AUTH_TOKEN_HEADER = "X-Goog-Firebase-Installations-Auth";
|
||||
private static final String X_ACCEPT_RESPONSE_STREAMING = "X-Accept-Response-Streaming";
|
||||
private static final String X_ANDROID_CERT_HEADER = "X-Android-Cert";
|
||||
private static final String X_ANDROID_PACKAGE_HEADER = "X-Android-Package";
|
||||
private static final String X_GOOGLE_GFE_CAN_RETRY = "X-Google-GFE-Can-Retry";
|
||||
ConfigCacheClient activatedCache;
|
||||
private final ConfigFetchHandler configFetchHandler;
|
||||
private final Context context;
|
||||
private final FirebaseApp firebaseApp;
|
||||
private final FirebaseInstallationsApi firebaseInstallations;
|
||||
private int httpRetriesRemaining;
|
||||
private final Set<ConfigUpdateListener> listeners;
|
||||
private final ConfigMetadataClient metadataClient;
|
||||
private final String namespace;
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
private final int ORIGINAL_RETRIES = 8;
|
||||
private boolean isHttpConnectionRunning = false;
|
||||
private final Random random = new Random();
|
||||
private final Clock clock = DefaultClock.getInstance();
|
||||
private boolean isRealtimeDisabled = false;
|
||||
private boolean isInBackground = false;
|
||||
|
||||
/* renamed from: com.google.firebase.remoteconfig.internal.ConfigRealtimeHttpClient$1 */
|
||||
/* loaded from: classes3.dex */
|
||||
public class AnonymousClass1 implements Runnable {
|
||||
public AnonymousClass1() {
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
ConfigRealtimeHttpClient.this.beginRealtimeHttpStream();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: com.google.firebase.remoteconfig.internal.ConfigRealtimeHttpClient$2 */
|
||||
/* loaded from: classes3.dex */
|
||||
public class AnonymousClass2 implements ConfigUpdateListener {
|
||||
public AnonymousClass2() {
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onError(FirebaseRemoteConfigException firebaseRemoteConfigException) {
|
||||
ConfigRealtimeHttpClient.this.enableBackoff();
|
||||
ConfigRealtimeHttpClient.this.propagateErrors(firebaseRemoteConfigException);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onUpdate(ConfigUpdate configUpdate) {
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigRealtimeHttpClient(FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallationsApi, ConfigFetchHandler configFetchHandler, ConfigCacheClient configCacheClient, Context context, String str, Set<ConfigUpdateListener> set, ConfigMetadataClient configMetadataClient, ScheduledExecutorService scheduledExecutorService) {
|
||||
this.listeners = set;
|
||||
this.scheduledExecutorService = scheduledExecutorService;
|
||||
this.httpRetriesRemaining = Math.max(8 - configMetadataClient.getRealtimeBackoffMetadata().getNumFailedStreams(), 1);
|
||||
this.firebaseApp = firebaseApp;
|
||||
this.configFetchHandler = configFetchHandler;
|
||||
this.firebaseInstallations = firebaseInstallationsApi;
|
||||
this.activatedCache = configCacheClient;
|
||||
this.context = context;
|
||||
this.namespace = str;
|
||||
this.metadataClient = configMetadataClient;
|
||||
}
|
||||
|
||||
private synchronized boolean canMakeHttpStreamConnection() {
|
||||
boolean z3;
|
||||
if (!this.listeners.isEmpty() && !this.isHttpConnectionRunning && !this.isRealtimeDisabled) {
|
||||
z3 = this.isInBackground ? false : true;
|
||||
}
|
||||
return z3;
|
||||
}
|
||||
|
||||
private JSONObject createRequestBody(String str) {
|
||||
HashMap hashMap = new HashMap();
|
||||
hashMap.put("project", extractProjectNumberFromAppId(this.firebaseApp.getOptions().getApplicationId()));
|
||||
hashMap.put("namespace", this.namespace);
|
||||
hashMap.put("lastKnownVersionNumber", Long.toString(this.configFetchHandler.getTemplateVersionNumber()));
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.APP_ID, this.firebaseApp.getOptions().getApplicationId());
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.SDK_VERSION, BuildConfig.VERSION_NAME);
|
||||
hashMap.put(RemoteConfigConstants.RequestFieldKey.INSTANCE_ID, str);
|
||||
return new JSONObject(hashMap);
|
||||
}
|
||||
|
||||
public synchronized void enableBackoff() {
|
||||
this.isRealtimeDisabled = true;
|
||||
}
|
||||
|
||||
private static String extractProjectNumberFromAppId(String str) {
|
||||
Matcher matcher = GMP_APP_ID_PATTERN.matcher(str);
|
||||
if (matcher.matches()) {
|
||||
return matcher.group(1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getFingerprintHashForPackage() {
|
||||
try {
|
||||
Context context = this.context;
|
||||
byte[] packageCertificateHashBytes = AndroidUtilsLight.getPackageCertificateHashBytes(context, context.getPackageName());
|
||||
if (packageCertificateHashBytes != null) {
|
||||
return Hex.bytesToStringUppercase(packageCertificateHashBytes, false);
|
||||
}
|
||||
Log.e(FirebaseRemoteConfig.TAG, "Could not get fingerprint hash for package: " + this.context.getPackageName());
|
||||
return null;
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
Log.i(FirebaseRemoteConfig.TAG, "No such package: " + this.context.getPackageName());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private long getRandomizedBackoffDurationInMillis(int i) {
|
||||
int length = BACKOFF_TIME_DURATIONS_IN_MINUTES.length;
|
||||
if (i >= length) {
|
||||
i = length;
|
||||
}
|
||||
return (TimeUnit.MINUTES.toMillis(r0[i - 1]) / 2) + this.random.nextInt((int) r0);
|
||||
}
|
||||
|
||||
private String getRealtimeURL(String str) {
|
||||
return "https://firebaseremoteconfigrealtime.googleapis.com/v1/projects/" + extractProjectNumberFromAppId(this.firebaseApp.getOptions().getApplicationId()) + "/namespaces/" + str + ":streamFetchInvalidations";
|
||||
}
|
||||
|
||||
private URL getUrl() {
|
||||
try {
|
||||
return new URL(getRealtimeURL(this.namespace));
|
||||
} catch (MalformedURLException unused) {
|
||||
Log.e(FirebaseRemoteConfig.TAG, "URL is malformed");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isStatusCodeRetryable(int i) {
|
||||
return i == 408 || i == 429 || i == 502 || i == 503 || i == 504;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r10v0, types: [com.google.android.gms.tasks.Task] */
|
||||
/* JADX WARN: Type inference failed for: r10v13, types: [java.net.HttpURLConnection] */
|
||||
/* JADX WARN: Type inference failed for: r10v2 */
|
||||
/* JADX WARN: Type inference failed for: r10v3 */
|
||||
/* JADX WARN: Type inference failed for: r10v4, types: [java.net.HttpURLConnection] */
|
||||
/* JADX WARN: Type inference failed for: r10v7, types: [java.net.HttpURLConnection] */
|
||||
/* JADX WARN: Type inference failed for: r9v0, types: [com.google.firebase.remoteconfig.internal.ConfigRealtimeHttpClient] */
|
||||
public /* synthetic */ Task lambda$beginRealtimeHttpStream$1(Task task, Task task2) throws Exception {
|
||||
Integer num;
|
||||
Throwable th;
|
||||
Integer num2;
|
||||
FirebaseRemoteConfigServerException firebaseRemoteConfigServerException;
|
||||
int responseCode;
|
||||
boolean isStatusCodeRetryable;
|
||||
boolean z3 = true;
|
||||
try {
|
||||
try {
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
}
|
||||
} catch (IOException e4) {
|
||||
e = e4;
|
||||
task = 0;
|
||||
num2 = null;
|
||||
} catch (Throwable th3) {
|
||||
num = null;
|
||||
th = th3;
|
||||
task = 0;
|
||||
}
|
||||
if (!task.isSuccessful()) {
|
||||
throw new IOException(task.getException());
|
||||
}
|
||||
setIsHttpConnectionRunning(true);
|
||||
task = (HttpURLConnection) task.getResult();
|
||||
try {
|
||||
responseCode = task.getResponseCode();
|
||||
num2 = Integer.valueOf(responseCode);
|
||||
if (responseCode == 200) {
|
||||
try {
|
||||
resetRetryCount();
|
||||
this.metadataClient.resetRealtimeBackoff();
|
||||
startAutoFetch(task).listenForNotifications();
|
||||
} catch (IOException e5) {
|
||||
e = e5;
|
||||
Log.d(FirebaseRemoteConfig.TAG, "Exception connecting to real-time RC backend. Retrying the connection...", e);
|
||||
closeRealtimeHttpStream(task);
|
||||
setIsHttpConnectionRunning(false);
|
||||
if (num2 != null && !isStatusCodeRetryable(num2.intValue())) {
|
||||
z3 = false;
|
||||
}
|
||||
if (z3) {
|
||||
updateBackoffMetadataWithLastFailedStreamConnectionTime(new Date(this.clock.currentTimeMillis()));
|
||||
}
|
||||
if (!z3 && num2.intValue() != 200) {
|
||||
String format = String.format("Unable to connect to the server. Try again in a few minutes. HTTP status code: %d", num2);
|
||||
if (num2.intValue() == 403) {
|
||||
format = parseForbiddenErrorResponseMessage(task.getErrorStream());
|
||||
}
|
||||
firebaseRemoteConfigServerException = new FirebaseRemoteConfigServerException(num2.intValue(), format, FirebaseRemoteConfigException.Code.CONFIG_UPDATE_STREAM_ERROR);
|
||||
propagateErrors(firebaseRemoteConfigServerException);
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
retryHttpConnectionWhenBackoffEnds();
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
}
|
||||
closeRealtimeHttpStream(task);
|
||||
setIsHttpConnectionRunning(false);
|
||||
isStatusCodeRetryable = isStatusCodeRetryable(responseCode);
|
||||
if (isStatusCodeRetryable) {
|
||||
updateBackoffMetadataWithLastFailedStreamConnectionTime(new Date(this.clock.currentTimeMillis()));
|
||||
}
|
||||
} catch (IOException e6) {
|
||||
e = e6;
|
||||
num2 = null;
|
||||
} catch (Throwable th4) {
|
||||
num = null;
|
||||
th = th4;
|
||||
closeRealtimeHttpStream(task);
|
||||
setIsHttpConnectionRunning(false);
|
||||
if (num != null && !isStatusCodeRetryable(num.intValue())) {
|
||||
z3 = false;
|
||||
}
|
||||
if (z3) {
|
||||
updateBackoffMetadataWithLastFailedStreamConnectionTime(new Date(this.clock.currentTimeMillis()));
|
||||
}
|
||||
if (z3 || num.intValue() == 200) {
|
||||
retryHttpConnectionWhenBackoffEnds();
|
||||
} else {
|
||||
String format2 = String.format("Unable to connect to the server. Try again in a few minutes. HTTP status code: %d", num);
|
||||
if (num.intValue() == 403) {
|
||||
format2 = parseForbiddenErrorResponseMessage(task.getErrorStream());
|
||||
}
|
||||
propagateErrors(new FirebaseRemoteConfigServerException(num.intValue(), format2, FirebaseRemoteConfigException.Code.CONFIG_UPDATE_STREAM_ERROR));
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
if (!isStatusCodeRetryable && responseCode != 200) {
|
||||
String format3 = String.format("Unable to connect to the server. Try again in a few minutes. HTTP status code: %d", num2);
|
||||
if (responseCode == 403) {
|
||||
format3 = parseForbiddenErrorResponseMessage(task.getErrorStream());
|
||||
}
|
||||
firebaseRemoteConfigServerException = new FirebaseRemoteConfigServerException(responseCode, format3, FirebaseRemoteConfigException.Code.CONFIG_UPDATE_STREAM_ERROR);
|
||||
propagateErrors(firebaseRemoteConfigServerException);
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
retryHttpConnectionWhenBackoffEnds();
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
|
||||
public /* synthetic */ Task lambda$createRealtimeConnection$0(Task task, Task task2, Task task3) throws Exception {
|
||||
if (!task.isSuccessful()) {
|
||||
return Tasks.forException(new FirebaseRemoteConfigClientException("Firebase Installations failed to get installation auth token for config update listener connection.", task.getException()));
|
||||
}
|
||||
if (!task2.isSuccessful()) {
|
||||
return Tasks.forException(new FirebaseRemoteConfigClientException("Firebase Installations failed to get installation ID for config update listener connection.", task2.getException()));
|
||||
}
|
||||
try {
|
||||
HttpURLConnection httpURLConnection = (HttpURLConnection) getUrl().openConnection();
|
||||
setRequestParams(httpURLConnection, (String) task2.getResult(), ((InstallationTokenResult) task.getResult()).getToken());
|
||||
return Tasks.forResult(httpURLConnection);
|
||||
} catch (IOException e4) {
|
||||
return Tasks.forException(new FirebaseRemoteConfigClientException("Failed to open HTTP stream connection", e4));
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void makeRealtimeHttpConnection(long j4) {
|
||||
try {
|
||||
if (canMakeHttpStreamConnection()) {
|
||||
int i = this.httpRetriesRemaining;
|
||||
if (i > 0) {
|
||||
this.httpRetriesRemaining = i - 1;
|
||||
this.scheduledExecutorService.schedule(new Runnable() { // from class: com.google.firebase.remoteconfig.internal.ConfigRealtimeHttpClient.1
|
||||
public AnonymousClass1() {
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
ConfigRealtimeHttpClient.this.beginRealtimeHttpStream();
|
||||
}
|
||||
}, j4, TimeUnit.MILLISECONDS);
|
||||
} else if (!this.isInBackground) {
|
||||
propagateErrors(new FirebaseRemoteConfigClientException("Unable to connect to the server. Check your connection and try again.", FirebaseRemoteConfigException.Code.CONFIG_UPDATE_STREAM_ERROR));
|
||||
}
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
private String parseForbiddenErrorResponseMessage(InputStream inputStream) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine == null) {
|
||||
break;
|
||||
}
|
||||
sb.append(readLine);
|
||||
}
|
||||
} catch (IOException unused) {
|
||||
if (sb.length() == 0) {
|
||||
return "Unable to connect to the server, access is forbidden. HTTP status code: 403";
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public synchronized void propagateErrors(FirebaseRemoteConfigException firebaseRemoteConfigException) {
|
||||
Iterator<ConfigUpdateListener> it = this.listeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().onError(firebaseRemoteConfigException);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void resetRetryCount() {
|
||||
this.httpRetriesRemaining = 8;
|
||||
}
|
||||
|
||||
private void setCommonRequestHeaders(HttpURLConnection httpURLConnection, String str) {
|
||||
httpURLConnection.setRequestProperty(INSTALLATIONS_AUTH_TOKEN_HEADER, str);
|
||||
httpURLConnection.setRequestProperty(API_KEY_HEADER, this.firebaseApp.getOptions().getApiKey());
|
||||
httpURLConnection.setRequestProperty(X_ANDROID_PACKAGE_HEADER, this.context.getPackageName());
|
||||
httpURLConnection.setRequestProperty(X_ANDROID_CERT_HEADER, getFingerprintHashForPackage());
|
||||
httpURLConnection.setRequestProperty(X_GOOGLE_GFE_CAN_RETRY, "yes");
|
||||
httpURLConnection.setRequestProperty(X_ACCEPT_RESPONSE_STREAMING, "true");
|
||||
httpURLConnection.setRequestProperty("Content-Type", "application/json");
|
||||
httpURLConnection.setRequestProperty("Accept", "application/json");
|
||||
}
|
||||
|
||||
private synchronized void setIsHttpConnectionRunning(boolean z3) {
|
||||
this.isHttpConnectionRunning = z3;
|
||||
}
|
||||
|
||||
private void updateBackoffMetadataWithLastFailedStreamConnectionTime(Date date) {
|
||||
int numFailedStreams = this.metadataClient.getRealtimeBackoffMetadata().getNumFailedStreams() + 1;
|
||||
this.metadataClient.setRealtimeBackoffMetadata(numFailedStreams, new Date(date.getTime() + getRandomizedBackoffDurationInMillis(numFailedStreams)));
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests", "DefaultLocale"})
|
||||
public void beginRealtimeHttpStream() {
|
||||
if (canMakeHttpStreamConnection()) {
|
||||
if (new Date(this.clock.currentTimeMillis()).before(this.metadataClient.getRealtimeBackoffMetadata().getBackoffEndTime())) {
|
||||
retryHttpConnectionWhenBackoffEnds();
|
||||
} else {
|
||||
Task<HttpURLConnection> createRealtimeConnection = createRealtimeConnection();
|
||||
Tasks.whenAllComplete((Task<?>[]) new Task[]{createRealtimeConnection}).continueWith(this.scheduledExecutorService, new i(4, this, createRealtimeConnection));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void closeRealtimeHttpStream(HttpURLConnection httpURLConnection) {
|
||||
if (httpURLConnection != null) {
|
||||
httpURLConnection.disconnect();
|
||||
try {
|
||||
httpURLConnection.getInputStream().close();
|
||||
if (httpURLConnection.getErrorStream() != null) {
|
||||
httpURLConnection.getErrorStream().close();
|
||||
}
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public Task<HttpURLConnection> createRealtimeConnection() {
|
||||
Task<InstallationTokenResult> token = this.firebaseInstallations.getToken(false);
|
||||
Task<String> id = this.firebaseInstallations.getId();
|
||||
return Tasks.whenAllComplete((Task<?>[]) new Task[]{token, id}).continueWithTask(this.scheduledExecutorService, new C0031i(this, token, id, 3));
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public Date getBackoffEndTime() {
|
||||
return this.metadataClient.getRealtimeBackoffMetadata().getBackoffEndTime();
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public int getNumberOfFailedStreams() {
|
||||
return this.metadataClient.getRealtimeBackoffMetadata().getNumFailedStreams();
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public synchronized void retryHttpConnectionWhenBackoffEnds() {
|
||||
makeRealtimeHttpConnection(Math.max(0L, this.metadataClient.getRealtimeBackoffMetadata().getBackoffEndTime().getTime() - new Date(this.clock.currentTimeMillis()).getTime()));
|
||||
}
|
||||
|
||||
public void setRealtimeBackgroundState(boolean z3) {
|
||||
this.isInBackground = z3;
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public void setRequestParams(HttpURLConnection httpURLConnection, String str, String str2) throws IOException {
|
||||
httpURLConnection.setRequestMethod("POST");
|
||||
setCommonRequestHeaders(httpURLConnection, str2);
|
||||
byte[] bytes = createRequestBody(str).toString().getBytes("utf-8");
|
||||
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(httpURLConnection.getOutputStream());
|
||||
bufferedOutputStream.write(bytes);
|
||||
bufferedOutputStream.flush();
|
||||
bufferedOutputStream.close();
|
||||
}
|
||||
|
||||
@SuppressLint({"VisibleForTests"})
|
||||
public synchronized ConfigAutoFetch startAutoFetch(HttpURLConnection httpURLConnection) {
|
||||
return new ConfigAutoFetch(httpURLConnection, this.configFetchHandler, this.activatedCache, this.listeners, new ConfigUpdateListener() { // from class: com.google.firebase.remoteconfig.internal.ConfigRealtimeHttpClient.2
|
||||
public AnonymousClass2() {
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onError(FirebaseRemoteConfigException firebaseRemoteConfigException) {
|
||||
ConfigRealtimeHttpClient.this.enableBackoff();
|
||||
ConfigRealtimeHttpClient.this.propagateErrors(firebaseRemoteConfigException);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onUpdate(ConfigUpdate configUpdate) {
|
||||
}
|
||||
}, this.scheduledExecutorService);
|
||||
}
|
||||
|
||||
public void startHttpConnection() {
|
||||
makeRealtimeHttpConnection(0L);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ConfigStorageClient {
|
||||
private static final String JSON_STRING_ENCODING = "UTF-8";
|
||||
private static final Map<String, ConfigStorageClient> clientInstances = new HashMap();
|
||||
private final Context context;
|
||||
private final String fileName;
|
||||
|
||||
private ConfigStorageClient(Context context, String str) {
|
||||
this.context = context;
|
||||
this.fileName = str;
|
||||
}
|
||||
|
||||
public static synchronized void clearInstancesForTest() {
|
||||
synchronized (ConfigStorageClient.class) {
|
||||
clientInstances.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized ConfigStorageClient getInstance(Context context, String str) {
|
||||
ConfigStorageClient configStorageClient;
|
||||
synchronized (ConfigStorageClient.class) {
|
||||
try {
|
||||
Map<String, ConfigStorageClient> map = clientInstances;
|
||||
if (!map.containsKey(str)) {
|
||||
map.put(str, new ConfigStorageClient(context, str));
|
||||
}
|
||||
configStorageClient = map.get(str);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return configStorageClient;
|
||||
}
|
||||
|
||||
public synchronized Void clear() {
|
||||
this.context.deleteFile(this.fileName);
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public synchronized ConfigContainer read() throws IOException {
|
||||
FileInputStream fileInputStream;
|
||||
Throwable th;
|
||||
try {
|
||||
fileInputStream = this.context.openFileInput(this.fileName);
|
||||
} catch (FileNotFoundException | JSONException unused) {
|
||||
fileInputStream = null;
|
||||
} catch (Throwable th2) {
|
||||
fileInputStream = null;
|
||||
th = th2;
|
||||
}
|
||||
try {
|
||||
int available = fileInputStream.available();
|
||||
byte[] bArr = new byte[available];
|
||||
fileInputStream.read(bArr, 0, available);
|
||||
ConfigContainer copyOf = ConfigContainer.copyOf(new JSONObject(new String(bArr, JSON_STRING_ENCODING)));
|
||||
fileInputStream.close();
|
||||
return copyOf;
|
||||
} catch (FileNotFoundException | JSONException unused2) {
|
||||
if (fileInputStream != null) {
|
||||
fileInputStream.close();
|
||||
}
|
||||
return null;
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
if (fileInputStream != null) {
|
||||
fileInputStream.close();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized Void write(ConfigContainer configContainer) throws IOException {
|
||||
FileOutputStream openFileOutput = this.context.openFileOutput(this.fileName, 0);
|
||||
try {
|
||||
openFileOutput.write(configContainer.toString().getBytes(JSON_STRING_ENCODING));
|
||||
} finally {
|
||||
openFileOutput.close();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class DefaultsXmlParser {
|
||||
private static final String XML_TAG_ENTRY = "entry";
|
||||
private static final String XML_TAG_KEY = "key";
|
||||
private static final String XML_TAG_VALUE = "value";
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:37:0x0079 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:42:0x0086 A[Catch: IOException | XmlPullParserException -> 0x0013, TryCatch #0 {IOException | XmlPullParserException -> 0x0013, blocks: (B:3:0x0007, B:5:0x000d, B:8:0x0016, B:13:0x0028, B:15:0x008a, B:18:0x0031, B:22:0x0041, B:24:0x0045, B:30:0x0053, B:38:0x007b, B:40:0x0081, B:42:0x0086, B:44:0x0062, B:47:0x006c), top: B:2:0x0007 }] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static java.util.Map<java.lang.String, java.lang.String> getDefaultsFromXml(android.content.Context r8, int r9) {
|
||||
/*
|
||||
java.lang.String r0 = "FirebaseRemoteConfig"
|
||||
java.util.HashMap r1 = new java.util.HashMap
|
||||
r1.<init>()
|
||||
android.content.res.Resources r8 = r8.getResources() // Catch: java.lang.Throwable -> L13
|
||||
if (r8 != 0) goto L16
|
||||
java.lang.String r8 = "Could not find the resources of the current context while trying to set defaults from an XML."
|
||||
android.util.Log.e(r0, r8) // Catch: java.lang.Throwable -> L13
|
||||
return r1
|
||||
L13:
|
||||
r8 = move-exception
|
||||
goto L8f
|
||||
L16:
|
||||
android.content.res.XmlResourceParser r8 = r8.getXml(r9) // Catch: java.lang.Throwable -> L13
|
||||
int r9 = r8.getEventType() // Catch: java.lang.Throwable -> L13
|
||||
r2 = 0
|
||||
r3 = r2
|
||||
r4 = r3
|
||||
r5 = r4
|
||||
L22:
|
||||
r6 = 1
|
||||
if (r9 == r6) goto L94
|
||||
r7 = 2
|
||||
if (r9 != r7) goto L2e
|
||||
java.lang.String r3 = r8.getName() // Catch: java.lang.Throwable -> L13
|
||||
goto L8a
|
||||
L2e:
|
||||
r7 = 3
|
||||
if (r9 != r7) goto L4e
|
||||
java.lang.String r9 = r8.getName() // Catch: java.lang.Throwable -> L13
|
||||
java.lang.String r3 = "entry"
|
||||
boolean r9 = r9.equals(r3) // Catch: java.lang.Throwable -> L13
|
||||
if (r9 == 0) goto L4c
|
||||
if (r4 == 0) goto L45
|
||||
if (r5 == 0) goto L45
|
||||
r1.put(r4, r5) // Catch: java.lang.Throwable -> L13
|
||||
goto L4a
|
||||
L45:
|
||||
java.lang.String r9 = "An entry in the defaults XML has an invalid key and/or value tag."
|
||||
android.util.Log.w(r0, r9) // Catch: java.lang.Throwable -> L13
|
||||
L4a:
|
||||
r4 = r2
|
||||
r5 = r4
|
||||
L4c:
|
||||
r3 = r2
|
||||
goto L8a
|
||||
L4e:
|
||||
r7 = 4
|
||||
if (r9 != r7) goto L8a
|
||||
if (r3 == 0) goto L8a
|
||||
int r9 = r3.hashCode() // Catch: java.lang.Throwable -> L13
|
||||
r7 = 106079(0x19e5f, float:1.48648E-40)
|
||||
if (r9 == r7) goto L6c
|
||||
r7 = 111972721(0x6ac9171, float:6.4912916E-35)
|
||||
if (r9 == r7) goto L62
|
||||
goto L76
|
||||
L62:
|
||||
java.lang.String r9 = "value"
|
||||
boolean r9 = r3.equals(r9) // Catch: java.lang.Throwable -> L13
|
||||
if (r9 == 0) goto L76
|
||||
r9 = r6
|
||||
goto L77
|
||||
L6c:
|
||||
java.lang.String r9 = "key"
|
||||
boolean r9 = r3.equals(r9) // Catch: java.lang.Throwable -> L13
|
||||
if (r9 == 0) goto L76
|
||||
r9 = 0
|
||||
goto L77
|
||||
L76:
|
||||
r9 = -1
|
||||
L77:
|
||||
if (r9 == 0) goto L86
|
||||
if (r9 == r6) goto L81
|
||||
java.lang.String r9 = "Encountered an unexpected tag while parsing the defaults XML."
|
||||
android.util.Log.w(r0, r9) // Catch: java.lang.Throwable -> L13
|
||||
goto L8a
|
||||
L81:
|
||||
java.lang.String r5 = r8.getText() // Catch: java.lang.Throwable -> L13
|
||||
goto L8a
|
||||
L86:
|
||||
java.lang.String r4 = r8.getText() // Catch: java.lang.Throwable -> L13
|
||||
L8a:
|
||||
int r9 = r8.next() // Catch: java.lang.Throwable -> L13
|
||||
goto L22
|
||||
L8f:
|
||||
java.lang.String r9 = "Encountered an error while parsing the defaults XML file."
|
||||
android.util.Log.e(r0, r9, r8)
|
||||
L94:
|
||||
return r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.remoteconfig.internal.DefaultsXmlParser.getDefaultsFromXml(android.content.Context, int):java.util.Map");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigInfoImpl implements FirebaseRemoteConfigInfo {
|
||||
private final FirebaseRemoteConfigSettings configSettings;
|
||||
private final int lastFetchStatus;
|
||||
private final long lastSuccessfulFetchTimeInMillis;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private FirebaseRemoteConfigSettings builderConfigSettings;
|
||||
private int builderLastFetchStatus;
|
||||
private long builderLastSuccessfulFetchTimeInMillis;
|
||||
|
||||
public FirebaseRemoteConfigInfoImpl build() {
|
||||
return new FirebaseRemoteConfigInfoImpl(this.builderLastSuccessfulFetchTimeInMillis, this.builderLastFetchStatus, this.builderConfigSettings);
|
||||
}
|
||||
|
||||
public Builder withConfigSettings(FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) {
|
||||
this.builderConfigSettings = firebaseRemoteConfigSettings;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withLastFetchStatus(int i) {
|
||||
this.builderLastFetchStatus = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withLastSuccessfulFetchTimeInMillis(long j4) {
|
||||
this.builderLastSuccessfulFetchTimeInMillis = j4;
|
||||
return this;
|
||||
}
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo
|
||||
public FirebaseRemoteConfigSettings getConfigSettings() {
|
||||
return this.configSettings;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo
|
||||
public long getFetchTimeMillis() {
|
||||
return this.lastSuccessfulFetchTimeInMillis;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo
|
||||
public int getLastFetchStatus() {
|
||||
return this.lastFetchStatus;
|
||||
}
|
||||
|
||||
private FirebaseRemoteConfigInfoImpl(long j4, int i, FirebaseRemoteConfigSettings firebaseRemoteConfigSettings) {
|
||||
this.lastSuccessfulFetchTimeInMillis = j4;
|
||||
this.lastFetchStatus = i;
|
||||
this.configSettings = firebaseRemoteConfigSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import C.w;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseRemoteConfigValueImpl implements FirebaseRemoteConfigValue {
|
||||
private static final String ILLEGAL_ARGUMENT_STRING_FORMAT = "[Value: %s] cannot be converted to a %s.";
|
||||
private final int source;
|
||||
private final String value;
|
||||
|
||||
public FirebaseRemoteConfigValueImpl(String str, int i) {
|
||||
this.value = str;
|
||||
this.source = i;
|
||||
}
|
||||
|
||||
private String asTrimmedString() {
|
||||
return asString().trim();
|
||||
}
|
||||
|
||||
private void throwIfNullValue() {
|
||||
if (this.value == null) {
|
||||
throw new IllegalArgumentException("Value is null, and cannot be converted to the desired type.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public boolean asBoolean() throws IllegalArgumentException {
|
||||
if (this.source == 0) {
|
||||
return false;
|
||||
}
|
||||
String asTrimmedString = asTrimmedString();
|
||||
if (ConfigGetParameterHandler.TRUE_REGEX.matcher(asTrimmedString).matches()) {
|
||||
return true;
|
||||
}
|
||||
if (ConfigGetParameterHandler.FALSE_REGEX.matcher(asTrimmedString).matches()) {
|
||||
return false;
|
||||
}
|
||||
throw new IllegalArgumentException(w.o("[Value: ", asTrimmedString, "] cannot be converted to a boolean."));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public byte[] asByteArray() {
|
||||
return this.source == 0 ? FirebaseRemoteConfig.DEFAULT_VALUE_FOR_BYTE_ARRAY : this.value.getBytes(ConfigGetParameterHandler.FRC_BYTE_ARRAY_ENCODING);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public double asDouble() {
|
||||
if (this.source == 0) {
|
||||
return FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE;
|
||||
}
|
||||
String asTrimmedString = asTrimmedString();
|
||||
try {
|
||||
return Double.valueOf(asTrimmedString).doubleValue();
|
||||
} catch (NumberFormatException e4) {
|
||||
throw new IllegalArgumentException(w.o("[Value: ", asTrimmedString, "] cannot be converted to a double."), e4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public long asLong() {
|
||||
if (this.source == 0) {
|
||||
return 0L;
|
||||
}
|
||||
String asTrimmedString = asTrimmedString();
|
||||
try {
|
||||
return Long.valueOf(asTrimmedString).longValue();
|
||||
} catch (NumberFormatException e4) {
|
||||
throw new IllegalArgumentException(w.o("[Value: ", asTrimmedString, "] cannot be converted to a long."), e4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public String asString() {
|
||||
if (this.source == 0) {
|
||||
return "";
|
||||
}
|
||||
throwIfNullValue();
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
|
||||
public int getSource() {
|
||||
return this.source;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.firebase.remoteconfig.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.firebase.analytics.connector.AnalyticsConnector;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Personalization {
|
||||
public static final String ANALYTICS_ORIGIN_PERSONALIZATION = "fp";
|
||||
public static final String ARM_INDEX = "armIndex";
|
||||
public static final String CHOICE_ID = "choiceId";
|
||||
public static final String EXTERNAL_ARM_INDEX_PARAM = "arm_index";
|
||||
public static final String EXTERNAL_ARM_VALUE_PARAM = "arm_value";
|
||||
public static final String EXTERNAL_EVENT = "personalization_assignment";
|
||||
public static final String EXTERNAL_GROUP_PARAM = "group";
|
||||
public static final String EXTERNAL_PERSONALIZATION_ID_PARAM = "personalization_id";
|
||||
public static final String EXTERNAL_RC_PARAMETER_PARAM = "arm_key";
|
||||
public static final String GROUP = "group";
|
||||
public static final String INTERNAL_CHOICE_ID_PARAM = "_fpid";
|
||||
public static final String INTERNAL_EVENT = "_fpc";
|
||||
public static final String PERSONALIZATION_ID = "personalizationId";
|
||||
private final Provider<AnalyticsConnector> analyticsConnector;
|
||||
private final Map<String, String> loggedChoiceIds = Collections.synchronizedMap(new HashMap());
|
||||
|
||||
public Personalization(Provider<AnalyticsConnector> provider) {
|
||||
this.analyticsConnector = provider;
|
||||
}
|
||||
|
||||
public void logArmActive(String str, ConfigContainer configContainer) {
|
||||
JSONObject optJSONObject;
|
||||
AnalyticsConnector analyticsConnector = this.analyticsConnector.get();
|
||||
if (analyticsConnector == null) {
|
||||
return;
|
||||
}
|
||||
JSONObject personalizationMetadata = configContainer.getPersonalizationMetadata();
|
||||
if (personalizationMetadata.length() < 1) {
|
||||
return;
|
||||
}
|
||||
JSONObject configs = configContainer.getConfigs();
|
||||
if (configs.length() >= 1 && (optJSONObject = personalizationMetadata.optJSONObject(str)) != null) {
|
||||
String optString = optJSONObject.optString(CHOICE_ID);
|
||||
if (optString.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
synchronized (this.loggedChoiceIds) {
|
||||
try {
|
||||
if (optString.equals(this.loggedChoiceIds.get(str))) {
|
||||
return;
|
||||
}
|
||||
this.loggedChoiceIds.put(str, optString);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EXTERNAL_RC_PARAMETER_PARAM, str);
|
||||
bundle.putString(EXTERNAL_ARM_VALUE_PARAM, configs.optString(str));
|
||||
bundle.putString(EXTERNAL_PERSONALIZATION_ID_PARAM, optJSONObject.optString(PERSONALIZATION_ID));
|
||||
bundle.putInt(EXTERNAL_ARM_INDEX_PARAM, optJSONObject.optInt(ARM_INDEX, -1));
|
||||
bundle.putString("group", optJSONObject.optString("group"));
|
||||
analyticsConnector.logEvent(ANALYTICS_ORIGIN_PERSONALIZATION, EXTERNAL_EVENT, bundle);
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString(INTERNAL_CHOICE_ID_PARAM, optString);
|
||||
analyticsConnector.logEvent(ANALYTICS_ORIGIN_PERSONALIZATION, INTERNAL_EVENT, bundle2);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.google.firebase.remoteconfig.internal.rollouts;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsState;
|
||||
import java.util.HashSet;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class RolloutsStateFactory {
|
||||
ConfigGetParameterHandler getParameterHandler;
|
||||
|
||||
public RolloutsStateFactory(ConfigGetParameterHandler configGetParameterHandler) {
|
||||
this.getParameterHandler = configGetParameterHandler;
|
||||
}
|
||||
|
||||
public static RolloutsStateFactory create(ConfigGetParameterHandler configGetParameterHandler) {
|
||||
return new RolloutsStateFactory(configGetParameterHandler);
|
||||
}
|
||||
|
||||
public RolloutsState getActiveRolloutsState(ConfigContainer configContainer) throws FirebaseRemoteConfigClientException {
|
||||
JSONArray rolloutMetadata = configContainer.getRolloutMetadata();
|
||||
long templateVersionNumber = configContainer.getTemplateVersionNumber();
|
||||
HashSet hashSet = new HashSet();
|
||||
for (int i = 0; i < rolloutMetadata.length(); i++) {
|
||||
try {
|
||||
JSONObject jSONObject = rolloutMetadata.getJSONObject(i);
|
||||
String string = jSONObject.getString(ConfigContainer.ROLLOUT_METADATA_ID);
|
||||
JSONArray jSONArray = jSONObject.getJSONArray(ConfigContainer.ROLLOUT_METADATA_AFFECTED_KEYS);
|
||||
if (jSONArray.length() > 1) {
|
||||
Log.w(FirebaseRemoteConfig.TAG, String.format("Rollout has multiple affected parameter keys.Only the first key will be included in RolloutsState. rolloutId: %s, affectedParameterKeys: %s", string, jSONArray));
|
||||
}
|
||||
String optString = jSONArray.optString(0, "");
|
||||
hashSet.add(RolloutAssignment.builder().setRolloutId(string).setVariantId(jSONObject.getString("variantId")).setParameterKey(optString).setParameterValue(this.getParameterHandler.getString(optString)).setTemplateVersion(templateVersionNumber).build());
|
||||
} catch (JSONException e4) {
|
||||
throw new FirebaseRemoteConfigClientException("Exception parsing rollouts metadata to create RolloutsState.", e4);
|
||||
}
|
||||
}
|
||||
return RolloutsState.create(hashSet);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.google.firebase.remoteconfig.internal.rollouts;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigCacheClient;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsState;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsStateSubscriber;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class RolloutsStateSubscriptionsHandler {
|
||||
private ConfigCacheClient activatedConfigsCache;
|
||||
private Executor executor;
|
||||
private RolloutsStateFactory rolloutsStateFactory;
|
||||
private Set<RolloutsStateSubscriber> subscribers = Collections.newSetFromMap(new ConcurrentHashMap());
|
||||
|
||||
public RolloutsStateSubscriptionsHandler(ConfigCacheClient configCacheClient, RolloutsStateFactory rolloutsStateFactory, Executor executor) {
|
||||
this.activatedConfigsCache = configCacheClient;
|
||||
this.rolloutsStateFactory = rolloutsStateFactory;
|
||||
this.executor = executor;
|
||||
}
|
||||
|
||||
public /* synthetic */ void lambda$registerRolloutsStateSubscriber$1(Task task, RolloutsStateSubscriber rolloutsStateSubscriber, ConfigContainer configContainer) {
|
||||
try {
|
||||
ConfigContainer configContainer2 = (ConfigContainer) task.getResult();
|
||||
if (configContainer2 != null) {
|
||||
this.executor.execute(new b(rolloutsStateSubscriber, this.rolloutsStateFactory.getActiveRolloutsState(configContainer2), 0));
|
||||
}
|
||||
} catch (FirebaseRemoteConfigException e4) {
|
||||
Log.w(FirebaseRemoteConfig.TAG, "Exception publishing RolloutsState to subscriber. Continuing to listen for changes.", e4);
|
||||
}
|
||||
}
|
||||
|
||||
public void publishActiveRolloutsState(ConfigContainer configContainer) {
|
||||
try {
|
||||
RolloutsState activeRolloutsState = this.rolloutsStateFactory.getActiveRolloutsState(configContainer);
|
||||
Iterator<RolloutsStateSubscriber> it = this.subscribers.iterator();
|
||||
while (it.hasNext()) {
|
||||
this.executor.execute(new b(it.next(), activeRolloutsState, 1));
|
||||
}
|
||||
} catch (FirebaseRemoteConfigException e4) {
|
||||
Log.w(FirebaseRemoteConfig.TAG, "Exception publishing RolloutsState to subscribers. Continuing to listen for changes.", e4);
|
||||
}
|
||||
}
|
||||
|
||||
public void registerRolloutsStateSubscriber(final RolloutsStateSubscriber rolloutsStateSubscriber) {
|
||||
this.subscribers.add(rolloutsStateSubscriber);
|
||||
final Task<ConfigContainer> task = this.activatedConfigsCache.get();
|
||||
task.addOnSuccessListener(this.executor, new OnSuccessListener() { // from class: com.google.firebase.remoteconfig.internal.rollouts.a
|
||||
@Override // com.google.android.gms.tasks.OnSuccessListener
|
||||
public final void onSuccess(Object obj) {
|
||||
RolloutsStateSubscriptionsHandler.this.lambda$registerRolloutsStateSubscriber$1(task, rolloutsStateSubscriber, (ConfigContainer) obj);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.google.firebase.remoteconfig.internal.rollouts;
|
||||
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsState;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsStateSubscriber;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class b implements Runnable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f6055a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ RolloutsStateSubscriber f6056b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ RolloutsState f6057c;
|
||||
|
||||
public /* synthetic */ b(RolloutsStateSubscriber rolloutsStateSubscriber, RolloutsState rolloutsState, int i) {
|
||||
this.f6055a = i;
|
||||
this.f6056b = rolloutsStateSubscriber;
|
||||
this.f6057c = rolloutsState;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
switch (this.f6055a) {
|
||||
case 0:
|
||||
RolloutsStateSubscriptionsHandler.b(this.f6056b, this.f6057c);
|
||||
return;
|
||||
default:
|
||||
RolloutsStateSubscriptionsHandler.c(this.f6056b, this.f6057c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.firebase.remoteconfig.interop;
|
||||
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutsStateSubscriber;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FirebaseRemoteConfigInterop {
|
||||
void registerRolloutsStateSubscriber(String str, RolloutsStateSubscriber rolloutsStateSubscriber);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
import com.google.firebase.encoders.FieldDescriptor;
|
||||
import com.google.firebase.encoders.ObjectEncoder;
|
||||
import com.google.firebase.encoders.ObjectEncoderContext;
|
||||
import com.google.firebase.encoders.config.Configurator;
|
||||
import com.google.firebase.encoders.config.EncoderConfig;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigContainer;
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AutoRolloutAssignmentEncoder implements Configurator {
|
||||
public static final int CODEGEN_VERSION = 2;
|
||||
public static final Configurator CONFIG = new AutoRolloutAssignmentEncoder();
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class RolloutAssignmentEncoder implements ObjectEncoder<RolloutAssignment> {
|
||||
static final RolloutAssignmentEncoder INSTANCE = new RolloutAssignmentEncoder();
|
||||
private static final FieldDescriptor ROLLOUTID_DESCRIPTOR = FieldDescriptor.of(ConfigContainer.ROLLOUT_METADATA_ID);
|
||||
private static final FieldDescriptor VARIANTID_DESCRIPTOR = FieldDescriptor.of("variantId");
|
||||
private static final FieldDescriptor PARAMETERKEY_DESCRIPTOR = FieldDescriptor.of("parameterKey");
|
||||
private static final FieldDescriptor PARAMETERVALUE_DESCRIPTOR = FieldDescriptor.of("parameterValue");
|
||||
private static final FieldDescriptor TEMPLATEVERSION_DESCRIPTOR = FieldDescriptor.of(RemoteConfigConstants.ResponseFieldKey.TEMPLATE_VERSION_NUMBER);
|
||||
|
||||
private RolloutAssignmentEncoder() {
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.encoders.Encoder
|
||||
public void encode(RolloutAssignment rolloutAssignment, ObjectEncoderContext objectEncoderContext) throws IOException {
|
||||
objectEncoderContext.add(ROLLOUTID_DESCRIPTOR, rolloutAssignment.getRolloutId());
|
||||
objectEncoderContext.add(VARIANTID_DESCRIPTOR, rolloutAssignment.getVariantId());
|
||||
objectEncoderContext.add(PARAMETERKEY_DESCRIPTOR, rolloutAssignment.getParameterKey());
|
||||
objectEncoderContext.add(PARAMETERVALUE_DESCRIPTOR, rolloutAssignment.getParameterValue());
|
||||
objectEncoderContext.add(TEMPLATEVERSION_DESCRIPTOR, rolloutAssignment.getTemplateVersion());
|
||||
}
|
||||
}
|
||||
|
||||
private AutoRolloutAssignmentEncoder() {
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.encoders.config.Configurator
|
||||
public void configure(EncoderConfig<?> encoderConfig) {
|
||||
RolloutAssignmentEncoder rolloutAssignmentEncoder = RolloutAssignmentEncoder.INSTANCE;
|
||||
encoderConfig.registerEncoder(RolloutAssignment.class, rolloutAssignmentEncoder);
|
||||
encoderConfig.registerEncoder(AutoValue_RolloutAssignment.class, rolloutAssignmentEncoder);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
import C.w;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_RolloutAssignment extends RolloutAssignment {
|
||||
private final String parameterKey;
|
||||
private final String parameterValue;
|
||||
private final String rolloutId;
|
||||
private final long templateVersion;
|
||||
private final String variantId;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder extends RolloutAssignment.Builder {
|
||||
private String parameterKey;
|
||||
private String parameterValue;
|
||||
private String rolloutId;
|
||||
private byte set$0;
|
||||
private long templateVersion;
|
||||
private String variantId;
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment build() {
|
||||
if (this.set$0 == 1 && this.rolloutId != null && this.variantId != null && this.parameterKey != null && this.parameterValue != null) {
|
||||
return new AutoValue_RolloutAssignment(this.rolloutId, this.variantId, this.parameterKey, this.parameterValue, this.templateVersion);
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (this.rolloutId == null) {
|
||||
sb.append(" rolloutId");
|
||||
}
|
||||
if (this.variantId == null) {
|
||||
sb.append(" variantId");
|
||||
}
|
||||
if (this.parameterKey == null) {
|
||||
sb.append(" parameterKey");
|
||||
}
|
||||
if (this.parameterValue == null) {
|
||||
sb.append(" parameterValue");
|
||||
}
|
||||
if ((this.set$0 & 1) == 0) {
|
||||
sb.append(" templateVersion");
|
||||
}
|
||||
throw new IllegalStateException("Missing required properties:" + ((Object) sb));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment.Builder setParameterKey(String str) {
|
||||
if (str == null) {
|
||||
throw new NullPointerException("Null parameterKey");
|
||||
}
|
||||
this.parameterKey = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment.Builder setParameterValue(String str) {
|
||||
if (str == null) {
|
||||
throw new NullPointerException("Null parameterValue");
|
||||
}
|
||||
this.parameterValue = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment.Builder setRolloutId(String str) {
|
||||
if (str == null) {
|
||||
throw new NullPointerException("Null rolloutId");
|
||||
}
|
||||
this.rolloutId = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment.Builder setTemplateVersion(long j4) {
|
||||
this.templateVersion = j4;
|
||||
this.set$0 = (byte) (this.set$0 | 1);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment.Builder
|
||||
public RolloutAssignment.Builder setVariantId(String str) {
|
||||
if (str == null) {
|
||||
throw new NullPointerException("Null variantId");
|
||||
}
|
||||
this.variantId = str;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof RolloutAssignment) {
|
||||
RolloutAssignment rolloutAssignment = (RolloutAssignment) obj;
|
||||
if (this.rolloutId.equals(rolloutAssignment.getRolloutId()) && this.variantId.equals(rolloutAssignment.getVariantId()) && this.parameterKey.equals(rolloutAssignment.getParameterKey()) && this.parameterValue.equals(rolloutAssignment.getParameterValue()) && this.templateVersion == rolloutAssignment.getTemplateVersion()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment
|
||||
public String getParameterKey() {
|
||||
return this.parameterKey;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment
|
||||
public String getParameterValue() {
|
||||
return this.parameterValue;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment
|
||||
public String getRolloutId() {
|
||||
return this.rolloutId;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment
|
||||
public long getTemplateVersion() {
|
||||
return this.templateVersion;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutAssignment
|
||||
public String getVariantId() {
|
||||
return this.variantId;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = (((((((this.rolloutId.hashCode() ^ 1000003) * 1000003) ^ this.variantId.hashCode()) * 1000003) ^ this.parameterKey.hashCode()) * 1000003) ^ this.parameterValue.hashCode()) * 1000003;
|
||||
long j4 = this.templateVersion;
|
||||
return ((int) (j4 ^ (j4 >>> 32))) ^ hashCode;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("RolloutAssignment{rolloutId=");
|
||||
sb.append(this.rolloutId);
|
||||
sb.append(", variantId=");
|
||||
sb.append(this.variantId);
|
||||
sb.append(", parameterKey=");
|
||||
sb.append(this.parameterKey);
|
||||
sb.append(", parameterValue=");
|
||||
sb.append(this.parameterValue);
|
||||
sb.append(", templateVersion=");
|
||||
return w.q(sb, this.templateVersion, "}");
|
||||
}
|
||||
|
||||
private AutoValue_RolloutAssignment(String str, String str2, String str3, String str4, long j4) {
|
||||
this.rolloutId = str;
|
||||
this.variantId = str2;
|
||||
this.parameterKey = str3;
|
||||
this.parameterValue = str4;
|
||||
this.templateVersion = j4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AutoValue_RolloutsState extends RolloutsState {
|
||||
private final Set<RolloutAssignment> rolloutAssignments;
|
||||
|
||||
public AutoValue_RolloutsState(Set<RolloutAssignment> set) {
|
||||
if (set == null) {
|
||||
throw new NullPointerException("Null rolloutAssignments");
|
||||
}
|
||||
this.rolloutAssignments = set;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof RolloutsState) {
|
||||
return this.rolloutAssignments.equals(((RolloutsState) obj).getRolloutAssignments());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.interop.rollouts.RolloutsState
|
||||
public Set<RolloutAssignment> getRolloutAssignments() {
|
||||
return this.rolloutAssignments;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.rolloutAssignments.hashCode() ^ 1000003;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "RolloutsState{rolloutAssignments=" + this.rolloutAssignments + "}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.firebase.encoders.DataEncoder;
|
||||
import com.google.firebase.encoders.annotations.Encodable;
|
||||
import com.google.firebase.encoders.json.JsonDataEncoderBuilder;
|
||||
import com.google.firebase.remoteconfig.interop.rollouts.AutoValue_RolloutAssignment;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@AutoValue
|
||||
@Encodable
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class RolloutAssignment {
|
||||
private static final String PARAMETER_KEY = "parameterKey";
|
||||
private static final String PARAMETER_VALUE = "parameterValue";
|
||||
public static final DataEncoder ROLLOUT_ASSIGNMENT_JSON_ENCODER = new JsonDataEncoderBuilder().configureWith(AutoRolloutAssignmentEncoder.CONFIG).build();
|
||||
private static final String ROLLOUT_ID = "rolloutId";
|
||||
private static final String TEMPLATE_VERSION = "templateVersion";
|
||||
private static final String VARIANT_ID = "variantId";
|
||||
|
||||
@AutoValue.Builder
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder {
|
||||
public abstract RolloutAssignment build();
|
||||
|
||||
public abstract Builder setParameterKey(String str);
|
||||
|
||||
public abstract Builder setParameterValue(String str);
|
||||
|
||||
public abstract Builder setRolloutId(String str);
|
||||
|
||||
public abstract Builder setTemplateVersion(long j4);
|
||||
|
||||
public abstract Builder setVariantId(String str);
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new AutoValue_RolloutAssignment.Builder();
|
||||
}
|
||||
|
||||
public static RolloutAssignment create(JSONObject jSONObject) throws JSONException {
|
||||
return builder().setRolloutId(jSONObject.getString("rolloutId")).setVariantId(jSONObject.getString("variantId")).setParameterKey(jSONObject.getString(PARAMETER_KEY)).setParameterValue(jSONObject.getString(PARAMETER_VALUE)).setTemplateVersion(jSONObject.getLong("templateVersion")).build();
|
||||
}
|
||||
|
||||
public abstract String getParameterKey();
|
||||
|
||||
public abstract String getParameterValue();
|
||||
|
||||
public abstract String getRolloutId();
|
||||
|
||||
public abstract long getTemplateVersion();
|
||||
|
||||
public abstract String getVariantId();
|
||||
|
||||
public static RolloutAssignment create(String str) throws JSONException {
|
||||
return create(new JSONObject(str));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import java.util.Set;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class RolloutsState {
|
||||
public static RolloutsState create(Set<RolloutAssignment> set) {
|
||||
return new AutoValue_RolloutsState(set);
|
||||
}
|
||||
|
||||
public abstract Set<RolloutAssignment> getRolloutAssignments();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.remoteconfig.interop.rollouts;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface RolloutsStateSubscriber {
|
||||
void onRolloutsStateChanged(RolloutsState rolloutsState);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuildConfig {
|
||||
public static final String BUILD_TYPE = "release";
|
||||
public static final boolean DEBUG = false;
|
||||
public static final String LIBRARY_PACKAGE_NAME = "com.google.firebase.remoteconfig.ktx";
|
||||
public static final String VERSION_NAME = "unspecified";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.firebase.components.Component;
|
||||
import com.google.firebase.components.ComponentRegistrar;
|
||||
import com.google.firebase.platforminfo.LibraryVersionComponent;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
|
||||
@Keep
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u00050\u0004H\u0016¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/remoteconfig/ktx/FirebaseConfigLegacyRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "com.google.firebase-firebase-config-ktx"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FirebaseConfigLegacyRegistrar implements ComponentRegistrar {
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return CollectionsKt.listOf(LibraryVersionComponent.create(LoggingKt.LIBRARY_NAME, com.google.firebase.remoteconfig.BuildConfig.VERSION_NAME));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.firebase.components.Component;
|
||||
import com.google.firebase.components.ComponentRegistrar;
|
||||
import java.util.List;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
|
||||
@Deprecated(message = "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.", replaceWith = @ReplaceWith(expression = "", imports = {}))
|
||||
@Keep
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u00050\u0004H\u0016¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/remoteconfig/ktx/FirebaseRemoteConfigKtxRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "com.google.firebase-firebase-config"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FirebaseRemoteConfigKtxRegistrar implements ComponentRegistrar {
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0002"}, d2 = {"LIBRARY_NAME", "", "com.google.firebase-firebase-config-ktx"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LoggingKt {
|
||||
public static final String LIBRARY_NAME = "fire-cfg-ktx";
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class attr {
|
||||
public static final int alpha = 0x7f030031;
|
||||
public static final int coordinatorLayoutStyle = 0x7f03016c;
|
||||
public static final int font = 0x7f03022d;
|
||||
public static final int fontProviderAuthority = 0x7f03022f;
|
||||
public static final int fontProviderCerts = 0x7f030230;
|
||||
public static final int fontProviderFetchStrategy = 0x7f030231;
|
||||
public static final int fontProviderFetchTimeout = 0x7f030232;
|
||||
public static final int fontProviderPackage = 0x7f030233;
|
||||
public static final int fontProviderQuery = 0x7f030234;
|
||||
public static final int fontStyle = 0x7f030236;
|
||||
public static final int fontVariationSettings = 0x7f030237;
|
||||
public static final int fontWeight = 0x7f030238;
|
||||
public static final int keylines = 0x7f0302b5;
|
||||
public static final int layout_anchor = 0x7f0302c6;
|
||||
public static final int layout_anchorGravity = 0x7f0302c7;
|
||||
public static final int layout_behavior = 0x7f0302c9;
|
||||
public static final int layout_dodgeInsetEdges = 0x7f0302fa;
|
||||
public static final int layout_insetEdge = 0x7f030305;
|
||||
public static final int layout_keyline = 0x7f030306;
|
||||
public static final int statusBarBackground = 0x7f030488;
|
||||
public static final int ttcIndex = 0x7f030559;
|
||||
|
||||
private attr() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class color {
|
||||
public static final int notification_action_color_filter = 0x7f050315;
|
||||
public static final int notification_icon_bg_color = 0x7f050316;
|
||||
public static final int ripple_material_light = 0x7f050322;
|
||||
public static final int secondary_text_default_material_light = 0x7f050324;
|
||||
|
||||
private color() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class dimen {
|
||||
public static final int compat_button_inset_horizontal_material = 0x7f06006d;
|
||||
public static final int compat_button_inset_vertical_material = 0x7f06006e;
|
||||
public static final int compat_button_padding_horizontal_material = 0x7f06006f;
|
||||
public static final int compat_button_padding_vertical_material = 0x7f060070;
|
||||
public static final int compat_control_corner_material = 0x7f060071;
|
||||
public static final int compat_notification_large_icon_max_height = 0x7f060072;
|
||||
public static final int compat_notification_large_icon_max_width = 0x7f060073;
|
||||
public static final int notification_action_icon_size = 0x7f060385;
|
||||
public static final int notification_action_text_size = 0x7f060386;
|
||||
public static final int notification_big_circle_margin = 0x7f060387;
|
||||
public static final int notification_content_margin_start = 0x7f060388;
|
||||
public static final int notification_large_icon_height = 0x7f06038d;
|
||||
public static final int notification_large_icon_width = 0x7f06038e;
|
||||
public static final int notification_main_column_padding_top = 0x7f06038f;
|
||||
public static final int notification_media_narrow_margin = 0x7f060391;
|
||||
public static final int notification_right_icon_size = 0x7f060393;
|
||||
public static final int notification_right_side_padding_top = 0x7f060394;
|
||||
public static final int notification_small_icon_background_padding = 0x7f060395;
|
||||
public static final int notification_small_icon_size_as_large = 0x7f060396;
|
||||
public static final int notification_subtext_size = 0x7f060397;
|
||||
public static final int notification_top_pad = 0x7f06039b;
|
||||
public static final int notification_top_pad_large_text = 0x7f06039c;
|
||||
|
||||
private dimen() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class drawable {
|
||||
public static final int notification_action_background = 0x7f070181;
|
||||
public static final int notification_bg = 0x7f070182;
|
||||
public static final int notification_bg_low = 0x7f070183;
|
||||
public static final int notification_bg_low_normal = 0x7f070184;
|
||||
public static final int notification_bg_low_pressed = 0x7f070185;
|
||||
public static final int notification_bg_normal = 0x7f070186;
|
||||
public static final int notification_bg_normal_pressed = 0x7f070187;
|
||||
public static final int notification_icon_background = 0x7f070188;
|
||||
public static final int notification_template_icon_bg = 0x7f07018a;
|
||||
public static final int notification_template_icon_low_bg = 0x7f07018b;
|
||||
public static final int notification_tile_bg = 0x7f07018c;
|
||||
public static final int notify_panel_notification_icon_bg = 0x7f07018d;
|
||||
|
||||
private drawable() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class id {
|
||||
public static final int accessibility_action_clickable_span = 0x7f090013;
|
||||
public static final int accessibility_custom_action_0 = 0x7f090014;
|
||||
public static final int accessibility_custom_action_1 = 0x7f090015;
|
||||
public static final int accessibility_custom_action_10 = 0x7f090016;
|
||||
public static final int accessibility_custom_action_11 = 0x7f090017;
|
||||
public static final int accessibility_custom_action_12 = 0x7f090018;
|
||||
public static final int accessibility_custom_action_13 = 0x7f090019;
|
||||
public static final int accessibility_custom_action_14 = 0x7f09001a;
|
||||
public static final int accessibility_custom_action_15 = 0x7f09001b;
|
||||
public static final int accessibility_custom_action_16 = 0x7f09001c;
|
||||
public static final int accessibility_custom_action_17 = 0x7f09001d;
|
||||
public static final int accessibility_custom_action_18 = 0x7f09001e;
|
||||
public static final int accessibility_custom_action_19 = 0x7f09001f;
|
||||
public static final int accessibility_custom_action_2 = 0x7f090020;
|
||||
public static final int accessibility_custom_action_20 = 0x7f090021;
|
||||
public static final int accessibility_custom_action_21 = 0x7f090022;
|
||||
public static final int accessibility_custom_action_22 = 0x7f090023;
|
||||
public static final int accessibility_custom_action_23 = 0x7f090024;
|
||||
public static final int accessibility_custom_action_24 = 0x7f090025;
|
||||
public static final int accessibility_custom_action_25 = 0x7f090026;
|
||||
public static final int accessibility_custom_action_26 = 0x7f090027;
|
||||
public static final int accessibility_custom_action_27 = 0x7f090028;
|
||||
public static final int accessibility_custom_action_28 = 0x7f090029;
|
||||
public static final int accessibility_custom_action_29 = 0x7f09002a;
|
||||
public static final int accessibility_custom_action_3 = 0x7f09002b;
|
||||
public static final int accessibility_custom_action_30 = 0x7f09002c;
|
||||
public static final int accessibility_custom_action_31 = 0x7f09002d;
|
||||
public static final int accessibility_custom_action_4 = 0x7f09002e;
|
||||
public static final int accessibility_custom_action_5 = 0x7f09002f;
|
||||
public static final int accessibility_custom_action_6 = 0x7f090030;
|
||||
public static final int accessibility_custom_action_7 = 0x7f090031;
|
||||
public static final int accessibility_custom_action_8 = 0x7f090032;
|
||||
public static final int accessibility_custom_action_9 = 0x7f090033;
|
||||
public static final int action_container = 0x7f090045;
|
||||
public static final int action_divider = 0x7f090048;
|
||||
public static final int action_image = 0x7f09004a;
|
||||
public static final int action_text = 0x7f090051;
|
||||
public static final int actions = 0x7f090052;
|
||||
public static final int async = 0x7f090071;
|
||||
public static final int blocking = 0x7f090082;
|
||||
public static final int bottom = 0x7f090083;
|
||||
public static final int chronometer = 0x7f0900a9;
|
||||
public static final int dialog_button = 0x7f09010b;
|
||||
public static final int end = 0x7f090133;
|
||||
public static final int forever = 0x7f090152;
|
||||
public static final int icon = 0x7f090195;
|
||||
public static final int icon_group = 0x7f090196;
|
||||
public static final int info = 0x7f0901a9;
|
||||
public static final int italic = 0x7f0901be;
|
||||
public static final int left = 0x7f0901e2;
|
||||
public static final int line1 = 0x7f0901e9;
|
||||
public static final int line3 = 0x7f0901ea;
|
||||
public static final int none = 0x7f090264;
|
||||
public static final int normal = 0x7f090265;
|
||||
public static final int notification_background = 0x7f090269;
|
||||
public static final int notification_main_column = 0x7f09026a;
|
||||
public static final int notification_main_column_container = 0x7f09026b;
|
||||
public static final int right = 0x7f0902cd;
|
||||
public static final int right_icon = 0x7f0902cf;
|
||||
public static final int right_side = 0x7f0902d0;
|
||||
public static final int start = 0x7f090322;
|
||||
public static final int tag_accessibility_actions = 0x7f09035c;
|
||||
public static final int tag_accessibility_clickable_spans = 0x7f09035d;
|
||||
public static final int tag_accessibility_heading = 0x7f09035e;
|
||||
public static final int tag_accessibility_pane_title = 0x7f09035f;
|
||||
public static final int tag_screen_reader_focusable = 0x7f090363;
|
||||
public static final int tag_transition_group = 0x7f090365;
|
||||
public static final int tag_unhandled_key_event_manager = 0x7f090366;
|
||||
public static final int tag_unhandled_key_listeners = 0x7f090367;
|
||||
public static final int text = 0x7f09036d;
|
||||
public static final int text2 = 0x7f09036e;
|
||||
public static final int time = 0x7f09038e;
|
||||
public static final int title = 0x7f090393;
|
||||
public static final int top = 0x7f0903ac;
|
||||
|
||||
private id() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class integer {
|
||||
public static final int google_play_services_version = 0x7f0a0009;
|
||||
public static final int status_bar_notification_info_maxnum = 0x7f0a0045;
|
||||
|
||||
private integer() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class layout {
|
||||
public static final int custom_dialog = 0x7f0c0026;
|
||||
public static final int notification_action = 0x7f0c00a8;
|
||||
public static final int notification_action_tombstone = 0x7f0c00a9;
|
||||
public static final int notification_template_custom_big = 0x7f0c00aa;
|
||||
public static final int notification_template_icon_group = 0x7f0c00ab;
|
||||
public static final int notification_template_part_chronometer = 0x7f0c00ac;
|
||||
public static final int notification_template_part_time = 0x7f0c00ad;
|
||||
|
||||
private layout() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class raw {
|
||||
public static final int firebase_common_keep = 0x7f120000;
|
||||
|
||||
private raw() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class string {
|
||||
public static final int common_google_play_services_unknown_issue = 0x7f1300bc;
|
||||
public static final int status_bar_notification_info_overflow = 0x7f13023b;
|
||||
|
||||
private string() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class style {
|
||||
public static final int TextAppearance_Compat_Notification = 0x7f1401fb;
|
||||
public static final int TextAppearance_Compat_Notification_Info = 0x7f1401fc;
|
||||
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f1401fd;
|
||||
public static final int TextAppearance_Compat_Notification_Time = 0x7f1401fe;
|
||||
public static final int TextAppearance_Compat_Notification_Title = 0x7f1401ff;
|
||||
public static final int Widget_Compat_NotificationActionContainer = 0x7f1403a1;
|
||||
public static final int Widget_Compat_NotificationActionText = 0x7f1403a2;
|
||||
public static final int Widget_Support_CoordinatorLayout = 0x7f1404d7;
|
||||
|
||||
private style() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class styleable {
|
||||
public static final int ColorStateListItem_alpha = 0x00000003;
|
||||
public static final int ColorStateListItem_android_alpha = 0x00000001;
|
||||
public static final int ColorStateListItem_android_color = 0x00000000;
|
||||
public static final int ColorStateListItem_android_lStar = 0x00000002;
|
||||
public static final int ColorStateListItem_lStar = 0x00000004;
|
||||
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0x00000000;
|
||||
public static final int CoordinatorLayout_Layout_layout_anchor = 0x00000001;
|
||||
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 0x00000002;
|
||||
public static final int CoordinatorLayout_Layout_layout_behavior = 0x00000003;
|
||||
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 0x00000004;
|
||||
public static final int CoordinatorLayout_Layout_layout_insetEdge = 0x00000005;
|
||||
public static final int CoordinatorLayout_Layout_layout_keyline = 0x00000006;
|
||||
public static final int CoordinatorLayout_keylines = 0x00000000;
|
||||
public static final int CoordinatorLayout_statusBarBackground = 0x00000001;
|
||||
public static final int FontFamilyFont_android_font = 0x00000000;
|
||||
public static final int FontFamilyFont_android_fontStyle = 0x00000002;
|
||||
public static final int FontFamilyFont_android_fontVariationSettings = 0x00000004;
|
||||
public static final int FontFamilyFont_android_fontWeight = 0x00000001;
|
||||
public static final int FontFamilyFont_android_ttcIndex = 0x00000003;
|
||||
public static final int FontFamilyFont_font = 0x00000005;
|
||||
public static final int FontFamilyFont_fontStyle = 0x00000006;
|
||||
public static final int FontFamilyFont_fontVariationSettings = 0x00000007;
|
||||
public static final int FontFamilyFont_fontWeight = 0x00000008;
|
||||
public static final int FontFamilyFont_ttcIndex = 0x00000009;
|
||||
public static final int FontFamily_fontProviderAuthority = 0x00000000;
|
||||
public static final int FontFamily_fontProviderCerts = 0x00000001;
|
||||
public static final int FontFamily_fontProviderFetchStrategy = 0x00000002;
|
||||
public static final int FontFamily_fontProviderFetchTimeout = 0x00000003;
|
||||
public static final int FontFamily_fontProviderPackage = 0x00000004;
|
||||
public static final int FontFamily_fontProviderQuery = 0x00000005;
|
||||
public static final int FontFamily_fontProviderSystemFontFamily = 0x00000006;
|
||||
public static final int GradientColorItem_android_color = 0x00000000;
|
||||
public static final int GradientColorItem_android_offset = 0x00000001;
|
||||
public static final int GradientColor_android_centerColor = 0x00000007;
|
||||
public static final int GradientColor_android_centerX = 0x00000003;
|
||||
public static final int GradientColor_android_centerY = 0x00000004;
|
||||
public static final int GradientColor_android_endColor = 0x00000001;
|
||||
public static final int GradientColor_android_endX = 0x0000000a;
|
||||
public static final int GradientColor_android_endY = 0x0000000b;
|
||||
public static final int GradientColor_android_gradientRadius = 0x00000005;
|
||||
public static final int GradientColor_android_startColor = 0x00000000;
|
||||
public static final int GradientColor_android_startX = 0x00000008;
|
||||
public static final int GradientColor_android_startY = 0x00000009;
|
||||
public static final int GradientColor_android_tileMode = 0x00000006;
|
||||
public static final int GradientColor_android_type = 0x00000002;
|
||||
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, 16844359, com.adif.elcanomovil.R.attr.alpha, com.adif.elcanomovil.R.attr.lStar};
|
||||
public static final int[] CoordinatorLayout = {com.adif.elcanomovil.R.attr.keylines, com.adif.elcanomovil.R.attr.statusBarBackground};
|
||||
public static final int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, com.adif.elcanomovil.R.attr.layout_anchor, com.adif.elcanomovil.R.attr.layout_anchorGravity, com.adif.elcanomovil.R.attr.layout_behavior, com.adif.elcanomovil.R.attr.layout_dodgeInsetEdges, com.adif.elcanomovil.R.attr.layout_insetEdge, com.adif.elcanomovil.R.attr.layout_keyline};
|
||||
public static final int[] FontFamily = {com.adif.elcanomovil.R.attr.fontProviderAuthority, com.adif.elcanomovil.R.attr.fontProviderCerts, com.adif.elcanomovil.R.attr.fontProviderFetchStrategy, com.adif.elcanomovil.R.attr.fontProviderFetchTimeout, com.adif.elcanomovil.R.attr.fontProviderPackage, com.adif.elcanomovil.R.attr.fontProviderQuery, com.adif.elcanomovil.R.attr.fontProviderSystemFontFamily};
|
||||
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.font, com.adif.elcanomovil.R.attr.fontStyle, com.adif.elcanomovil.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.fontWeight, com.adif.elcanomovil.R.attr.ttcIndex};
|
||||
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
|
||||
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
|
||||
|
||||
private styleable() {
|
||||
}
|
||||
}
|
||||
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdate;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListener;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigException;
|
||||
import com.google.firebase.remoteconfig.d;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import kotlinx.coroutines.channels.ChannelsKt;
|
||||
import kotlinx.coroutines.channels.ProducerScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001f\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\u0010\u0010\u0006\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t"}, d2 = {"com/google/firebase/remoteconfig/ktx/RemoteConfigKt$configUpdates$1$registration$1", "Lcom/google/firebase/remoteconfig/ConfigUpdateListener;", "onError", "", Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigException;", "onUpdate", "configUpdate", "Lcom/google/firebase/remoteconfig/ConfigUpdate;", "com.google.firebase-firebase-config"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt$configUpdates$1$registration$1 implements ConfigUpdateListener {
|
||||
final /* synthetic */ ProducerScope<ConfigUpdate> $$this$callbackFlow;
|
||||
final /* synthetic */ FirebaseRemoteConfig $this_configUpdates;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public RemoteConfigKt$configUpdates$1$registration$1(FirebaseRemoteConfig firebaseRemoteConfig, ProducerScope<? super ConfigUpdate> producerScope) {
|
||||
this.$this_configUpdates = firebaseRemoteConfig;
|
||||
this.$$this$callbackFlow = producerScope;
|
||||
}
|
||||
|
||||
/* renamed from: onUpdate$lambda-0 */
|
||||
public static final void m95onUpdate$lambda0(ProducerScope $this$callbackFlow, ConfigUpdate configUpdate) {
|
||||
Intrinsics.checkNotNullParameter($this$callbackFlow, "$$this$callbackFlow");
|
||||
Intrinsics.checkNotNullParameter(configUpdate, "$configUpdate");
|
||||
ChannelsKt.trySendBlocking($this$callbackFlow, configUpdate);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onError(FirebaseRemoteConfigException r22) {
|
||||
Intrinsics.checkNotNullParameter(r22, "error");
|
||||
CoroutineScopeKt.cancel(this.$$this$callbackFlow, "Error listening for config updates.", r22);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.remoteconfig.ConfigUpdateListener
|
||||
public void onUpdate(ConfigUpdate configUpdate) {
|
||||
Intrinsics.checkNotNullParameter(configUpdate, "configUpdate");
|
||||
this.$this_configUpdates.schedule(new d(this.$$this$callbackFlow, configUpdate, 1));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import com.google.firebase.remoteconfig.ConfigUpdate;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdateListenerRegistration;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.channels.ProduceKt;
|
||||
import kotlinx.coroutines.channels.ProducerScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/channels/ProducerScope;", "Lcom/google/firebase/remoteconfig/ConfigUpdate;"}, k = 3, mv = {1, 7, 1}, xi = 48)
|
||||
@DebugMetadata(c = "com.google.firebase.remoteconfig.ktx.RemoteConfigKt$configUpdates$1", f = "RemoteConfig.kt", i = {}, l = {117}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt$configUpdates$1 extends SuspendLambda implements Function2<ProducerScope<? super ConfigUpdate>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ FirebaseRemoteConfig $this_configUpdates;
|
||||
private /* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public RemoteConfigKt$configUpdates$1(FirebaseRemoteConfig firebaseRemoteConfig, Continuation<? super RemoteConfigKt$configUpdates$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_configUpdates = firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
RemoteConfigKt$configUpdates$1 remoteConfigKt$configUpdates$1 = new RemoteConfigKt$configUpdates$1(this.$this_configUpdates, continuation);
|
||||
remoteConfigKt$configUpdates$1.L$0 = obj;
|
||||
return remoteConfigKt$configUpdates$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
ProducerScope producerScope = (ProducerScope) this.L$0;
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = this.$this_configUpdates;
|
||||
final ConfigUpdateListenerRegistration addOnConfigUpdateListener = firebaseRemoteConfig.addOnConfigUpdateListener(new RemoteConfigKt$configUpdates$1$registration$1(firebaseRemoteConfig, producerScope));
|
||||
Intrinsics.checkNotNullExpressionValue(addOnConfigUpdateListener, "FirebaseRemoteConfig.con… }\n }\n )");
|
||||
Function0<Unit> function0 = new Function0<Unit>() { // from class: com.google.firebase.remoteconfig.ktx.RemoteConfigKt$configUpdates$1.1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public /* bridge */ /* synthetic */ Unit invoke() {
|
||||
invoke2();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2() {
|
||||
ConfigUpdateListenerRegistration.this.remove();
|
||||
}
|
||||
};
|
||||
this.label = 1;
|
||||
if (ProduceKt.awaitClose(producerScope, function0, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super ConfigUpdate> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((RemoteConfigKt$configUpdates$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.google.firebase.remoteconfig.ktx;
|
||||
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.ktx.Firebase;
|
||||
import com.google.firebase.remoteconfig.ConfigUpdate;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
@Metadata(d1 = {"\u0000D\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u001f\u0010\f\u001a\u00020\r2\u0017\u0010\u000e\u001a\u0013\u0012\u0004\u0012\u00020\u0010\u0012\u0004\u0012\u00020\u00110\u000f¢\u0006\u0002\b\u0012\u001a\u0015\u0010\u0013\u001a\u00020\u0014*\u00020\u00032\u0006\u0010\u0015\u001a\u00020\u0016H\u0087\u0002\u001a\u0012\u0010\b\u001a\u00020\u0003*\u00020\t2\u0006\u0010\u0017\u001a\u00020\u0018\"$\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u00038FX\u0087\u0004¢\u0006\f\u0012\u0004\b\u0004\u0010\u0005\u001a\u0004\b\u0006\u0010\u0007\"\u0015\u0010\b\u001a\u00020\u0003*\u00020\t8F¢\u0006\u0006\u001a\u0004\b\n\u0010\u000b¨\u0006\u0019"}, d2 = {"configUpdates", "Lkotlinx/coroutines/flow/Flow;", "Lcom/google/firebase/remoteconfig/ConfigUpdate;", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;", "getConfigUpdates$annotations", "(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;)V", "getConfigUpdates", "(Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;)Lkotlinx/coroutines/flow/Flow;", "remoteConfig", "Lcom/google/firebase/ktx/Firebase;", "getRemoteConfig", "(Lcom/google/firebase/ktx/Firebase;)Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;", "remoteConfigSettings", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings;", "init", "Lkotlin/Function1;", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings$Builder;", "", "Lkotlin/ExtensionFunctionType;", "get", "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigValue;", "key", "", "app", "Lcom/google/firebase/FirebaseApp;", "com.google.firebase-firebase-config"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RemoteConfigKt {
|
||||
@Deprecated(message = "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.", replaceWith = @ReplaceWith(expression = "", imports = {}))
|
||||
public static final FirebaseRemoteConfigValue get(FirebaseRemoteConfig firebaseRemoteConfig, String key) {
|
||||
Intrinsics.checkNotNullParameter(firebaseRemoteConfig, "<this>");
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
FirebaseRemoteConfigValue value = firebaseRemoteConfig.getValue(key);
|
||||
Intrinsics.checkNotNullExpressionValue(value, "this.getValue(key)");
|
||||
return value;
|
||||
}
|
||||
|
||||
public static final Flow<ConfigUpdate> getConfigUpdates(FirebaseRemoteConfig firebaseRemoteConfig) {
|
||||
Intrinsics.checkNotNullParameter(firebaseRemoteConfig, "<this>");
|
||||
return FlowKt.callbackFlow(new RemoteConfigKt$configUpdates$1(firebaseRemoteConfig, null));
|
||||
}
|
||||
|
||||
@Deprecated(message = "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.", replaceWith = @ReplaceWith(expression = "", imports = {}))
|
||||
public static /* synthetic */ void getConfigUpdates$annotations(FirebaseRemoteConfig firebaseRemoteConfig) {
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfig getRemoteConfig(Firebase firebase) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseRemoteConfig, "getInstance()");
|
||||
return firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfig remoteConfig(Firebase firebase, FirebaseApp app) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
Intrinsics.checkNotNullParameter(app, "app");
|
||||
FirebaseRemoteConfig firebaseRemoteConfig = FirebaseRemoteConfig.getInstance(app);
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseRemoteConfig, "getInstance(app)");
|
||||
return firebaseRemoteConfig;
|
||||
}
|
||||
|
||||
public static final FirebaseRemoteConfigSettings remoteConfigSettings(Function1<? super FirebaseRemoteConfigSettings.Builder, Unit> init) {
|
||||
Intrinsics.checkNotNullParameter(init, "init");
|
||||
FirebaseRemoteConfigSettings.Builder builder = new FirebaseRemoteConfigSettings.Builder();
|
||||
init.invoke(builder);
|
||||
FirebaseRemoteConfigSettings build = builder.build();
|
||||
Intrinsics.checkNotNullExpressionValue(build, "builder.build()");
|
||||
return build;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user