Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,483 @@
package com.google.firebase.perf.config;
import android.content.Context;
import com.google.firebase.perf.BuildConfig;
import com.google.firebase.perf.logging.AndroidLogger;
import com.google.firebase.perf.util.ImmutableBundle;
import com.google.firebase.perf.util.Optional;
import com.google.firebase.perf.util.Utils;
/* loaded from: classes3.dex */
public class ConfigResolver {
public static volatile ConfigResolver instance;
public static final AndroidLogger logger = AndroidLogger.getInstance();
public DeviceCacheManager deviceCacheManager;
public ImmutableBundle metadataBundle;
public final RemoteConfigManager remoteConfigManager;
public final boolean isEventCountValid(long j) {
return j >= 0;
}
public final boolean isGaugeCaptureFrequencyMsValid(long j) {
return j >= 0;
}
public final boolean isSamplingRateValid(double d) {
return 0.0d <= d && d <= 1.0d;
}
public final boolean isSessionsMaxDurationMinutesValid(long j) {
return j > 0;
}
public final boolean isTimeRangeSecValid(long j) {
return j > 0;
}
public void setMetadataBundle(ImmutableBundle immutableBundle) {
this.metadataBundle = immutableBundle;
}
public ConfigResolver(RemoteConfigManager remoteConfigManager, ImmutableBundle immutableBundle, DeviceCacheManager deviceCacheManager) {
this.remoteConfigManager = remoteConfigManager == null ? RemoteConfigManager.getInstance() : remoteConfigManager;
this.metadataBundle = immutableBundle == null ? new ImmutableBundle() : immutableBundle;
this.deviceCacheManager = deviceCacheManager == null ? DeviceCacheManager.getInstance() : deviceCacheManager;
}
public static synchronized ConfigResolver getInstance() {
ConfigResolver configResolver;
synchronized (ConfigResolver.class) {
try {
if (instance == null) {
instance = new ConfigResolver(null, null, null);
}
configResolver = instance;
} catch (Throwable th) {
throw th;
}
}
return configResolver;
}
public void setApplicationContext(Context context) {
logger.setLogcatEnabled(Utils.isDebugLoggingEnabled(context));
this.deviceCacheManager.setContext(context);
}
public boolean isPerformanceMonitoringEnabled() {
Boolean isPerformanceCollectionEnabled = getIsPerformanceCollectionEnabled();
return (isPerformanceCollectionEnabled == null || isPerformanceCollectionEnabled.booleanValue()) && getIsServiceCollectionEnabled();
}
public Boolean getIsPerformanceCollectionEnabled() {
if (getIsPerformanceCollectionDeactivated().booleanValue()) {
return Boolean.FALSE;
}
ConfigurationConstants$CollectionEnabled configurationConstants$CollectionEnabled = ConfigurationConstants$CollectionEnabled.getInstance();
Optional deviceCacheBoolean = getDeviceCacheBoolean(configurationConstants$CollectionEnabled);
if (deviceCacheBoolean.isAvailable()) {
return (Boolean) deviceCacheBoolean.get();
}
Optional metadataBoolean = getMetadataBoolean(configurationConstants$CollectionEnabled);
if (metadataBoolean.isAvailable()) {
return (Boolean) metadataBoolean.get();
}
return null;
}
public Boolean getIsPerformanceCollectionDeactivated() {
ConfigurationConstants$CollectionDeactivated configurationConstants$CollectionDeactivated = ConfigurationConstants$CollectionDeactivated.getInstance();
Optional metadataBoolean = getMetadataBoolean(configurationConstants$CollectionDeactivated);
if (metadataBoolean.isAvailable()) {
return (Boolean) metadataBoolean.get();
}
return configurationConstants$CollectionDeactivated.getDefault();
}
public void setIsPerformanceCollectionEnabled(Boolean bool) {
String deviceCacheFlag;
if (getIsPerformanceCollectionDeactivated().booleanValue() || (deviceCacheFlag = ConfigurationConstants$CollectionEnabled.getInstance().getDeviceCacheFlag()) == null) {
return;
}
if (bool != null) {
this.deviceCacheManager.setValue(deviceCacheFlag, Boolean.TRUE.equals(bool));
} else {
this.deviceCacheManager.clear(deviceCacheFlag);
}
}
public boolean getIsServiceCollectionEnabled() {
return getIsSdkEnabled() && !getIsSdkVersionDisabled();
}
public final boolean getIsSdkEnabled() {
ConfigurationConstants$SdkEnabled configurationConstants$SdkEnabled = ConfigurationConstants$SdkEnabled.getInstance();
Optional remoteConfigBoolean = getRemoteConfigBoolean(configurationConstants$SdkEnabled);
if (remoteConfigBoolean.isAvailable()) {
if (this.remoteConfigManager.isLastFetchFailed()) {
return false;
}
this.deviceCacheManager.setValue(configurationConstants$SdkEnabled.getDeviceCacheFlag(), ((Boolean) remoteConfigBoolean.get()).booleanValue());
return ((Boolean) remoteConfigBoolean.get()).booleanValue();
}
Optional deviceCacheBoolean = getDeviceCacheBoolean(configurationConstants$SdkEnabled);
if (deviceCacheBoolean.isAvailable()) {
return ((Boolean) deviceCacheBoolean.get()).booleanValue();
}
return configurationConstants$SdkEnabled.getDefault().booleanValue();
}
public final boolean getIsSdkVersionDisabled() {
ConfigurationConstants$SdkDisabledVersions configurationConstants$SdkDisabledVersions = ConfigurationConstants$SdkDisabledVersions.getInstance();
Optional remoteConfigString = getRemoteConfigString(configurationConstants$SdkDisabledVersions);
if (remoteConfigString.isAvailable()) {
this.deviceCacheManager.setValue(configurationConstants$SdkDisabledVersions.getDeviceCacheFlag(), (String) remoteConfigString.get());
return isFireperfSdkVersionInList((String) remoteConfigString.get());
}
Optional deviceCacheString = getDeviceCacheString(configurationConstants$SdkDisabledVersions);
if (deviceCacheString.isAvailable()) {
return isFireperfSdkVersionInList((String) deviceCacheString.get());
}
return isFireperfSdkVersionInList(configurationConstants$SdkDisabledVersions.getDefault());
}
public final boolean isFireperfSdkVersionInList(String str) {
if (str.trim().isEmpty()) {
return false;
}
for (String str2 : str.split(";")) {
if (str2.trim().equals(BuildConfig.FIREPERF_VERSION_NAME)) {
return true;
}
}
return false;
}
public double getTraceSamplingRate() {
ConfigurationConstants$TraceSamplingRate configurationConstants$TraceSamplingRate = ConfigurationConstants$TraceSamplingRate.getInstance();
Optional remoteConfigDouble = getRemoteConfigDouble(configurationConstants$TraceSamplingRate);
if (remoteConfigDouble.isAvailable() && isSamplingRateValid(((Double) remoteConfigDouble.get()).doubleValue())) {
this.deviceCacheManager.setValue(configurationConstants$TraceSamplingRate.getDeviceCacheFlag(), ((Double) remoteConfigDouble.get()).doubleValue());
return ((Double) remoteConfigDouble.get()).doubleValue();
}
Optional deviceCacheDouble = getDeviceCacheDouble(configurationConstants$TraceSamplingRate);
if (deviceCacheDouble.isAvailable() && isSamplingRateValid(((Double) deviceCacheDouble.get()).doubleValue())) {
return ((Double) deviceCacheDouble.get()).doubleValue();
}
if (this.remoteConfigManager.isLastFetchFailed()) {
return configurationConstants$TraceSamplingRate.getDefaultOnRcFetchFail().doubleValue();
}
return configurationConstants$TraceSamplingRate.getDefault().doubleValue();
}
public double getNetworkRequestSamplingRate() {
ConfigurationConstants$NetworkRequestSamplingRate configurationConstants$NetworkRequestSamplingRate = ConfigurationConstants$NetworkRequestSamplingRate.getInstance();
Optional remoteConfigDouble = getRemoteConfigDouble(configurationConstants$NetworkRequestSamplingRate);
if (remoteConfigDouble.isAvailable() && isSamplingRateValid(((Double) remoteConfigDouble.get()).doubleValue())) {
this.deviceCacheManager.setValue(configurationConstants$NetworkRequestSamplingRate.getDeviceCacheFlag(), ((Double) remoteConfigDouble.get()).doubleValue());
return ((Double) remoteConfigDouble.get()).doubleValue();
}
Optional deviceCacheDouble = getDeviceCacheDouble(configurationConstants$NetworkRequestSamplingRate);
if (deviceCacheDouble.isAvailable() && isSamplingRateValid(((Double) deviceCacheDouble.get()).doubleValue())) {
return ((Double) deviceCacheDouble.get()).doubleValue();
}
if (this.remoteConfigManager.isLastFetchFailed()) {
return configurationConstants$NetworkRequestSamplingRate.getDefaultOnRcFetchFail().doubleValue();
}
return configurationConstants$NetworkRequestSamplingRate.getDefault().doubleValue();
}
public double getSessionsSamplingRate() {
ConfigurationConstants$SessionsSamplingRate configurationConstants$SessionsSamplingRate = ConfigurationConstants$SessionsSamplingRate.getInstance();
Optional metadataDouble = getMetadataDouble(configurationConstants$SessionsSamplingRate);
if (metadataDouble.isAvailable()) {
double doubleValue = ((Double) metadataDouble.get()).doubleValue() / 100.0d;
if (isSamplingRateValid(doubleValue)) {
return doubleValue;
}
}
Optional remoteConfigDouble = getRemoteConfigDouble(configurationConstants$SessionsSamplingRate);
if (remoteConfigDouble.isAvailable() && isSamplingRateValid(((Double) remoteConfigDouble.get()).doubleValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsSamplingRate.getDeviceCacheFlag(), ((Double) remoteConfigDouble.get()).doubleValue());
return ((Double) remoteConfigDouble.get()).doubleValue();
}
Optional deviceCacheDouble = getDeviceCacheDouble(configurationConstants$SessionsSamplingRate);
if (deviceCacheDouble.isAvailable() && isSamplingRateValid(((Double) deviceCacheDouble.get()).doubleValue())) {
return ((Double) deviceCacheDouble.get()).doubleValue();
}
if (this.remoteConfigManager.isLastFetchFailed()) {
return configurationConstants$SessionsSamplingRate.getDefaultOnRcFetchFail().doubleValue();
}
return configurationConstants$SessionsSamplingRate.getDefault().doubleValue();
}
public long getSessionsCpuCaptureFrequencyForegroundMs() {
ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs configurationConstants$SessionsCpuCaptureFrequencyForegroundMs = ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs.getInstance();
Optional metadataLong = getMetadataLong(configurationConstants$SessionsCpuCaptureFrequencyForegroundMs);
if (metadataLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) metadataLong.get()).longValue())) {
return ((Long) metadataLong.get()).longValue();
}
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$SessionsCpuCaptureFrequencyForegroundMs);
if (remoteConfigLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsCpuCaptureFrequencyForegroundMs.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$SessionsCpuCaptureFrequencyForegroundMs);
if (deviceCacheLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
if (this.remoteConfigManager.isLastFetchFailed()) {
return configurationConstants$SessionsCpuCaptureFrequencyForegroundMs.getDefaultOnRcFetchFail().longValue();
}
return configurationConstants$SessionsCpuCaptureFrequencyForegroundMs.getDefault().longValue();
}
public long getSessionsCpuCaptureFrequencyBackgroundMs() {
ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs = ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs.getInstance();
Optional metadataLong = getMetadataLong(configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs);
if (metadataLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) metadataLong.get()).longValue())) {
return ((Long) metadataLong.get()).longValue();
}
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs);
if (remoteConfigLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs);
if (deviceCacheLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs.getDefault().longValue();
}
public long getSessionsMemoryCaptureFrequencyForegroundMs() {
ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs = ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs.getInstance();
Optional metadataLong = getMetadataLong(configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs);
if (metadataLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) metadataLong.get()).longValue())) {
return ((Long) metadataLong.get()).longValue();
}
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs);
if (remoteConfigLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs);
if (deviceCacheLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
if (this.remoteConfigManager.isLastFetchFailed()) {
return configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs.getDefaultOnRcFetchFail().longValue();
}
return configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs.getDefault().longValue();
}
public long getSessionsMemoryCaptureFrequencyBackgroundMs() {
ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs = ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs.getInstance();
Optional metadataLong = getMetadataLong(configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs);
if (metadataLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) metadataLong.get()).longValue())) {
return ((Long) metadataLong.get()).longValue();
}
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs);
if (remoteConfigLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs);
if (deviceCacheLong.isAvailable() && isGaugeCaptureFrequencyMsValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs.getDefault().longValue();
}
public long getSessionsMaxDurationMinutes() {
ConfigurationConstants$SessionsMaxDurationMinutes configurationConstants$SessionsMaxDurationMinutes = ConfigurationConstants$SessionsMaxDurationMinutes.getInstance();
Optional metadataLong = getMetadataLong(configurationConstants$SessionsMaxDurationMinutes);
if (metadataLong.isAvailable() && isSessionsMaxDurationMinutesValid(((Long) metadataLong.get()).longValue())) {
return ((Long) metadataLong.get()).longValue();
}
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$SessionsMaxDurationMinutes);
if (remoteConfigLong.isAvailable() && isSessionsMaxDurationMinutesValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$SessionsMaxDurationMinutes.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$SessionsMaxDurationMinutes);
if (deviceCacheLong.isAvailable() && isSessionsMaxDurationMinutesValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$SessionsMaxDurationMinutes.getDefault().longValue();
}
public long getTraceEventCountForeground() {
ConfigurationConstants$TraceEventCountForeground configurationConstants$TraceEventCountForeground = ConfigurationConstants$TraceEventCountForeground.getInstance();
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$TraceEventCountForeground);
if (remoteConfigLong.isAvailable() && isEventCountValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$TraceEventCountForeground.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$TraceEventCountForeground);
if (deviceCacheLong.isAvailable() && isEventCountValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$TraceEventCountForeground.getDefault().longValue();
}
public long getTraceEventCountBackground() {
ConfigurationConstants$TraceEventCountBackground configurationConstants$TraceEventCountBackground = ConfigurationConstants$TraceEventCountBackground.getInstance();
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$TraceEventCountBackground);
if (remoteConfigLong.isAvailable() && isEventCountValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$TraceEventCountBackground.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$TraceEventCountBackground);
if (deviceCacheLong.isAvailable() && isEventCountValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$TraceEventCountBackground.getDefault().longValue();
}
public long getNetworkEventCountForeground() {
ConfigurationConstants$NetworkEventCountForeground configurationConstants$NetworkEventCountForeground = ConfigurationConstants$NetworkEventCountForeground.getInstance();
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$NetworkEventCountForeground);
if (remoteConfigLong.isAvailable() && isEventCountValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$NetworkEventCountForeground.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$NetworkEventCountForeground);
if (deviceCacheLong.isAvailable() && isEventCountValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$NetworkEventCountForeground.getDefault().longValue();
}
public long getNetworkEventCountBackground() {
ConfigurationConstants$NetworkEventCountBackground configurationConstants$NetworkEventCountBackground = ConfigurationConstants$NetworkEventCountBackground.getInstance();
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$NetworkEventCountBackground);
if (remoteConfigLong.isAvailable() && isEventCountValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$NetworkEventCountBackground.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$NetworkEventCountBackground);
if (deviceCacheLong.isAvailable() && isEventCountValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$NetworkEventCountBackground.getDefault().longValue();
}
public long getRateLimitSec() {
ConfigurationConstants$RateLimitSec configurationConstants$RateLimitSec = ConfigurationConstants$RateLimitSec.getInstance();
Optional remoteConfigLong = getRemoteConfigLong(configurationConstants$RateLimitSec);
if (remoteConfigLong.isAvailable() && isTimeRangeSecValid(((Long) remoteConfigLong.get()).longValue())) {
this.deviceCacheManager.setValue(configurationConstants$RateLimitSec.getDeviceCacheFlag(), ((Long) remoteConfigLong.get()).longValue());
return ((Long) remoteConfigLong.get()).longValue();
}
Optional deviceCacheLong = getDeviceCacheLong(configurationConstants$RateLimitSec);
if (deviceCacheLong.isAvailable() && isTimeRangeSecValid(((Long) deviceCacheLong.get()).longValue())) {
return ((Long) deviceCacheLong.get()).longValue();
}
return configurationConstants$RateLimitSec.getDefault().longValue();
}
public String getAndCacheLogSourceName() {
String logSourceName;
ConfigurationConstants$LogSourceName configurationConstants$LogSourceName = ConfigurationConstants$LogSourceName.getInstance();
if (BuildConfig.ENFORCE_DEFAULT_LOG_SRC.booleanValue()) {
return configurationConstants$LogSourceName.getDefault();
}
String remoteConfigFlag = configurationConstants$LogSourceName.getRemoteConfigFlag();
long longValue = remoteConfigFlag != null ? ((Long) this.remoteConfigManager.getRemoteConfigValueOrDefault(remoteConfigFlag, -1L)).longValue() : -1L;
String deviceCacheFlag = configurationConstants$LogSourceName.getDeviceCacheFlag();
if (ConfigurationConstants$LogSourceName.isLogSourceKnown(longValue) && (logSourceName = ConfigurationConstants$LogSourceName.getLogSourceName(longValue)) != null) {
this.deviceCacheManager.setValue(deviceCacheFlag, logSourceName);
return logSourceName;
}
Optional deviceCacheString = getDeviceCacheString(configurationConstants$LogSourceName);
if (deviceCacheString.isAvailable()) {
return (String) deviceCacheString.get();
}
return configurationConstants$LogSourceName.getDefault();
}
public double getFragmentSamplingRate() {
ConfigurationConstants$FragmentSamplingRate configurationConstants$FragmentSamplingRate = ConfigurationConstants$FragmentSamplingRate.getInstance();
Optional metadataDouble = getMetadataDouble(configurationConstants$FragmentSamplingRate);
if (metadataDouble.isAvailable()) {
double doubleValue = ((Double) metadataDouble.get()).doubleValue() / 100.0d;
if (isSamplingRateValid(doubleValue)) {
return doubleValue;
}
}
Optional remoteConfigDouble = getRemoteConfigDouble(configurationConstants$FragmentSamplingRate);
if (remoteConfigDouble.isAvailable() && isSamplingRateValid(((Double) remoteConfigDouble.get()).doubleValue())) {
this.deviceCacheManager.setValue(configurationConstants$FragmentSamplingRate.getDeviceCacheFlag(), ((Double) remoteConfigDouble.get()).doubleValue());
return ((Double) remoteConfigDouble.get()).doubleValue();
}
Optional deviceCacheDouble = getDeviceCacheDouble(configurationConstants$FragmentSamplingRate);
if (deviceCacheDouble.isAvailable() && isSamplingRateValid(((Double) deviceCacheDouble.get()).doubleValue())) {
return ((Double) deviceCacheDouble.get()).doubleValue();
}
return configurationConstants$FragmentSamplingRate.getDefault().doubleValue();
}
public boolean getIsExperimentTTIDEnabled() {
ConfigurationConstants$ExperimentTTID configurationConstants$ExperimentTTID = ConfigurationConstants$ExperimentTTID.getInstance();
Optional metadataBoolean = getMetadataBoolean(configurationConstants$ExperimentTTID);
if (metadataBoolean.isAvailable()) {
return ((Boolean) metadataBoolean.get()).booleanValue();
}
Optional remoteConfigBoolean = getRemoteConfigBoolean(configurationConstants$ExperimentTTID);
if (remoteConfigBoolean.isAvailable()) {
this.deviceCacheManager.setValue(configurationConstants$ExperimentTTID.getDeviceCacheFlag(), ((Boolean) remoteConfigBoolean.get()).booleanValue());
return ((Boolean) remoteConfigBoolean.get()).booleanValue();
}
Optional deviceCacheBoolean = getDeviceCacheBoolean(configurationConstants$ExperimentTTID);
if (deviceCacheBoolean.isAvailable()) {
return ((Boolean) deviceCacheBoolean.get()).booleanValue();
}
return configurationConstants$ExperimentTTID.getDefault().booleanValue();
}
public final Optional getMetadataBoolean(ConfigurationFlag configurationFlag) {
return this.metadataBundle.getBoolean(configurationFlag.getMetadataFlag());
}
public final Optional getMetadataDouble(ConfigurationFlag configurationFlag) {
return this.metadataBundle.getDouble(configurationFlag.getMetadataFlag());
}
public final Optional getMetadataLong(ConfigurationFlag configurationFlag) {
return this.metadataBundle.getLong(configurationFlag.getMetadataFlag());
}
public final Optional getRemoteConfigDouble(ConfigurationFlag configurationFlag) {
return this.remoteConfigManager.getDouble(configurationFlag.getRemoteConfigFlag());
}
public final Optional getRemoteConfigLong(ConfigurationFlag configurationFlag) {
return this.remoteConfigManager.getLong(configurationFlag.getRemoteConfigFlag());
}
public final Optional getRemoteConfigBoolean(ConfigurationFlag configurationFlag) {
return this.remoteConfigManager.getBoolean(configurationFlag.getRemoteConfigFlag());
}
public final Optional getRemoteConfigString(ConfigurationFlag configurationFlag) {
return this.remoteConfigManager.getString(configurationFlag.getRemoteConfigFlag());
}
public final Optional getDeviceCacheDouble(ConfigurationFlag configurationFlag) {
return this.deviceCacheManager.getDouble(configurationFlag.getDeviceCacheFlag());
}
public final Optional getDeviceCacheLong(ConfigurationFlag configurationFlag) {
return this.deviceCacheManager.getLong(configurationFlag.getDeviceCacheFlag());
}
public final Optional getDeviceCacheBoolean(ConfigurationFlag configurationFlag) {
return this.deviceCacheManager.getBoolean(configurationFlag.getDeviceCacheFlag());
}
public final Optional getDeviceCacheString(ConfigurationFlag configurationFlag) {
return this.deviceCacheManager.getString(configurationFlag.getDeviceCacheFlag());
}
}

View File

@@ -0,0 +1,30 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$CollectionDeactivated extends ConfigurationFlag {
public static ConfigurationConstants$CollectionDeactivated instance;
public Boolean getDefault() {
return Boolean.FALSE;
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "firebase_performance_collection_deactivated";
}
public static synchronized ConfigurationConstants$CollectionDeactivated getInstance() {
ConfigurationConstants$CollectionDeactivated configurationConstants$CollectionDeactivated;
synchronized (ConfigurationConstants$CollectionDeactivated.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$CollectionDeactivated();
}
configurationConstants$CollectionDeactivated = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$CollectionDeactivated;
}
}

View File

@@ -0,0 +1,31 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$CollectionEnabled extends ConfigurationFlag {
public static ConfigurationConstants$CollectionEnabled instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "isEnabled";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "firebase_performance_collection_enabled";
}
public static synchronized ConfigurationConstants$CollectionEnabled getInstance() {
ConfigurationConstants$CollectionEnabled configurationConstants$CollectionEnabled;
synchronized (ConfigurationConstants$CollectionEnabled.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$CollectionEnabled();
}
configurationConstants$CollectionEnabled = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$CollectionEnabled;
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$ExperimentTTID extends ConfigurationFlag {
public static ConfigurationConstants$ExperimentTTID instance;
public Boolean getDefault() {
return Boolean.FALSE;
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.ExperimentTTID";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "experiment_app_start_ttid";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_experiment_app_start_ttid";
}
public static synchronized ConfigurationConstants$ExperimentTTID getInstance() {
ConfigurationConstants$ExperimentTTID configurationConstants$ExperimentTTID;
synchronized (ConfigurationConstants$ExperimentTTID.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$ExperimentTTID();
}
configurationConstants$ExperimentTTID = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$ExperimentTTID;
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$FragmentSamplingRate extends ConfigurationFlag {
public static ConfigurationConstants$FragmentSamplingRate instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.FragmentSamplingRate";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "fragment_sampling_percentage";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_vc_fragment_sampling_rate";
}
public static synchronized ConfigurationConstants$FragmentSamplingRate getInstance() {
ConfigurationConstants$FragmentSamplingRate configurationConstants$FragmentSamplingRate;
synchronized (ConfigurationConstants$FragmentSamplingRate.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$FragmentSamplingRate();
}
configurationConstants$FragmentSamplingRate = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$FragmentSamplingRate;
}
public Double getDefault() {
return Double.valueOf(0.0d);
}
}

View File

@@ -0,0 +1,56 @@
package com.google.firebase.perf.config;
import com.google.firebase.perf.BuildConfig;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$LogSourceName extends ConfigurationFlag {
public static final Map LOG_SOURCE_MAP = Collections.unmodifiableMap(new HashMap() { // from class: com.google.firebase.perf.config.ConfigurationConstants$LogSourceName.1
{
put(461L, "FIREPERF_AUTOPUSH");
put(462L, "FIREPERF");
put(675L, "FIREPERF_INTERNAL_LOW");
put(676L, "FIREPERF_INTERNAL_HIGH");
}
});
public static ConfigurationConstants$LogSourceName instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.LogSourceName";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_log_source";
}
public static synchronized ConfigurationConstants$LogSourceName getInstance() {
ConfigurationConstants$LogSourceName configurationConstants$LogSourceName;
synchronized (ConfigurationConstants$LogSourceName.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$LogSourceName();
}
configurationConstants$LogSourceName = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$LogSourceName;
}
public static String getLogSourceName(long j) {
return (String) LOG_SOURCE_MAP.get(Long.valueOf(j));
}
public static boolean isLogSourceKnown(long j) {
return LOG_SOURCE_MAP.containsKey(Long.valueOf(j));
}
public String getDefault() {
return BuildConfig.TRANSPORT_LOG_SRC;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$NetworkEventCountBackground extends ConfigurationFlag {
public static ConfigurationConstants$NetworkEventCountBackground instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.NetworkEventCountBackground";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_rl_network_event_count_bg";
}
public static synchronized ConfigurationConstants$NetworkEventCountBackground getInstance() {
ConfigurationConstants$NetworkEventCountBackground configurationConstants$NetworkEventCountBackground;
synchronized (ConfigurationConstants$NetworkEventCountBackground.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$NetworkEventCountBackground();
}
configurationConstants$NetworkEventCountBackground = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$NetworkEventCountBackground;
}
public Long getDefault() {
return 70L;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$NetworkEventCountForeground extends ConfigurationFlag {
public static ConfigurationConstants$NetworkEventCountForeground instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.NetworkEventCountForeground";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_rl_network_event_count_fg";
}
public static synchronized ConfigurationConstants$NetworkEventCountForeground getInstance() {
ConfigurationConstants$NetworkEventCountForeground configurationConstants$NetworkEventCountForeground;
synchronized (ConfigurationConstants$NetworkEventCountForeground.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$NetworkEventCountForeground();
}
configurationConstants$NetworkEventCountForeground = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$NetworkEventCountForeground;
}
public Long getDefault() {
return 700L;
}
}

View File

@@ -0,0 +1,39 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$NetworkRequestSamplingRate extends ConfigurationFlag {
public static ConfigurationConstants$NetworkRequestSamplingRate instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.NetworkRequestSamplingRate";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_vc_network_request_sampling_rate";
}
public static synchronized ConfigurationConstants$NetworkRequestSamplingRate getInstance() {
ConfigurationConstants$NetworkRequestSamplingRate configurationConstants$NetworkRequestSamplingRate;
synchronized (ConfigurationConstants$NetworkRequestSamplingRate.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$NetworkRequestSamplingRate();
}
configurationConstants$NetworkRequestSamplingRate = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$NetworkRequestSamplingRate;
}
public Double getDefault() {
return Double.valueOf(1.0d);
}
public Double getDefaultOnRcFetchFail() {
return Double.valueOf(getDefault().doubleValue() / 1000.0d);
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$RateLimitSec extends ConfigurationFlag {
public static ConfigurationConstants$RateLimitSec instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.TimeLimitSec";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_rl_time_limit_sec";
}
public static synchronized ConfigurationConstants$RateLimitSec getInstance() {
ConfigurationConstants$RateLimitSec configurationConstants$RateLimitSec;
synchronized (ConfigurationConstants$RateLimitSec.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$RateLimitSec();
}
configurationConstants$RateLimitSec = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$RateLimitSec;
}
public Long getDefault() {
return 600L;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SdkDisabledVersions extends ConfigurationFlag {
public static ConfigurationConstants$SdkDisabledVersions instance;
public String getDefault() {
return "";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SdkDisabledVersions";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_disabled_android_versions";
}
public static synchronized ConfigurationConstants$SdkDisabledVersions getInstance() {
ConfigurationConstants$SdkDisabledVersions configurationConstants$SdkDisabledVersions;
synchronized (ConfigurationConstants$SdkDisabledVersions.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SdkDisabledVersions();
}
configurationConstants$SdkDisabledVersions = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SdkDisabledVersions;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SdkEnabled extends ConfigurationFlag {
public static ConfigurationConstants$SdkEnabled instance;
public Boolean getDefault() {
return Boolean.TRUE;
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SdkEnabled";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_enabled";
}
public static synchronized ConfigurationConstants$SdkEnabled getInstance() {
ConfigurationConstants$SdkEnabled configurationConstants$SdkEnabled;
synchronized (ConfigurationConstants$SdkEnabled.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SdkEnabled();
}
configurationConstants$SdkEnabled = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SdkEnabled;
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs extends ConfigurationFlag {
public static ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionsCpuCaptureFrequencyBackgroundMs";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_cpu_capture_frequency_bg_ms";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_session_gauge_cpu_capture_frequency_bg_ms";
}
public static synchronized ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs getInstance() {
ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs;
synchronized (ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsCpuCaptureFrequencyBackgroundMs();
}
configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsCpuCaptureFrequencyBackgroundMs;
}
public Long getDefault() {
return 0L;
}
}

View File

@@ -0,0 +1,44 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs extends ConfigurationFlag {
public static ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionsCpuCaptureFrequencyForegroundMs";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_cpu_capture_frequency_fg_ms";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_session_gauge_cpu_capture_frequency_fg_ms";
}
public static synchronized ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs getInstance() {
ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs configurationConstants$SessionsCpuCaptureFrequencyForegroundMs;
synchronized (ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsCpuCaptureFrequencyForegroundMs();
}
configurationConstants$SessionsCpuCaptureFrequencyForegroundMs = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsCpuCaptureFrequencyForegroundMs;
}
public Long getDefault() {
return 100L;
}
public Long getDefaultOnRcFetchFail() {
return Long.valueOf(getDefault().longValue() * 3);
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsMaxDurationMinutes extends ConfigurationFlag {
public static ConfigurationConstants$SessionsMaxDurationMinutes instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionsMaxDurationMinutes";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_max_length_minutes";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_session_max_duration_min";
}
public static synchronized ConfigurationConstants$SessionsMaxDurationMinutes getInstance() {
ConfigurationConstants$SessionsMaxDurationMinutes configurationConstants$SessionsMaxDurationMinutes;
synchronized (ConfigurationConstants$SessionsMaxDurationMinutes.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsMaxDurationMinutes();
}
configurationConstants$SessionsMaxDurationMinutes = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsMaxDurationMinutes;
}
public Long getDefault() {
return 240L;
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs extends ConfigurationFlag {
public static ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionsMemoryCaptureFrequencyBackgroundMs";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_memory_capture_frequency_bg_ms";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_session_gauge_memory_capture_frequency_bg_ms";
}
public static synchronized ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs getInstance() {
ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs;
synchronized (ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs();
}
configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsMemoryCaptureFrequencyBackgroundMs;
}
public Long getDefault() {
return 0L;
}
}

View File

@@ -0,0 +1,44 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs extends ConfigurationFlag {
public static ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionsMemoryCaptureFrequencyForegroundMs";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_memory_capture_frequency_fg_ms";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_session_gauge_memory_capture_frequency_fg_ms";
}
public static synchronized ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs getInstance() {
ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs;
synchronized (ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsMemoryCaptureFrequencyForegroundMs();
}
configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsMemoryCaptureFrequencyForegroundMs;
}
public Long getDefault() {
return 100L;
}
public Long getDefaultOnRcFetchFail() {
return Long.valueOf(getDefault().longValue() * 3);
}
}

View File

@@ -0,0 +1,44 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$SessionsSamplingRate extends ConfigurationFlag {
public static ConfigurationConstants$SessionsSamplingRate instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.SessionSamplingRate";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getMetadataFlag() {
return "sessions_sampling_percentage";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_vc_session_sampling_rate";
}
public static synchronized ConfigurationConstants$SessionsSamplingRate getInstance() {
ConfigurationConstants$SessionsSamplingRate configurationConstants$SessionsSamplingRate;
synchronized (ConfigurationConstants$SessionsSamplingRate.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$SessionsSamplingRate();
}
configurationConstants$SessionsSamplingRate = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$SessionsSamplingRate;
}
public Double getDefault() {
return Double.valueOf(0.01d);
}
public Double getDefaultOnRcFetchFail() {
return Double.valueOf(getDefault().doubleValue() / 1000.0d);
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$TraceEventCountBackground extends ConfigurationFlag {
public static ConfigurationConstants$TraceEventCountBackground instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.TraceEventCountBackground";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_rl_trace_event_count_bg";
}
public static synchronized ConfigurationConstants$TraceEventCountBackground getInstance() {
ConfigurationConstants$TraceEventCountBackground configurationConstants$TraceEventCountBackground;
synchronized (ConfigurationConstants$TraceEventCountBackground.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$TraceEventCountBackground();
}
configurationConstants$TraceEventCountBackground = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$TraceEventCountBackground;
}
public Long getDefault() {
return 30L;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$TraceEventCountForeground extends ConfigurationFlag {
public static ConfigurationConstants$TraceEventCountForeground instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.TraceEventCountForeground";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_rl_trace_event_count_fg";
}
public static synchronized ConfigurationConstants$TraceEventCountForeground getInstance() {
ConfigurationConstants$TraceEventCountForeground configurationConstants$TraceEventCountForeground;
synchronized (ConfigurationConstants$TraceEventCountForeground.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$TraceEventCountForeground();
}
configurationConstants$TraceEventCountForeground = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$TraceEventCountForeground;
}
public Long getDefault() {
return 300L;
}
}

View File

@@ -0,0 +1,39 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public final class ConfigurationConstants$TraceSamplingRate extends ConfigurationFlag {
public static ConfigurationConstants$TraceSamplingRate instance;
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getDeviceCacheFlag() {
return "com.google.firebase.perf.TraceSamplingRate";
}
@Override // com.google.firebase.perf.config.ConfigurationFlag
public String getRemoteConfigFlag() {
return "fpr_vc_trace_sampling_rate";
}
public static synchronized ConfigurationConstants$TraceSamplingRate getInstance() {
ConfigurationConstants$TraceSamplingRate configurationConstants$TraceSamplingRate;
synchronized (ConfigurationConstants$TraceSamplingRate.class) {
try {
if (instance == null) {
instance = new ConfigurationConstants$TraceSamplingRate();
}
configurationConstants$TraceSamplingRate = instance;
} catch (Throwable th) {
throw th;
}
}
return configurationConstants$TraceSamplingRate;
}
public Double getDefault() {
return Double.valueOf(1.0d);
}
public Double getDefaultOnRcFetchFail() {
return Double.valueOf(getDefault().doubleValue() / 1000.0d);
}
}

View File

@@ -0,0 +1,16 @@
package com.google.firebase.perf.config;
/* loaded from: classes3.dex */
public abstract class ConfigurationFlag {
public String getDeviceCacheFlag() {
return null;
}
public String getMetadataFlag() {
return null;
}
public String getRemoteConfigFlag() {
return null;
}
}

View File

@@ -0,0 +1,227 @@
package com.google.firebase.perf.config;
import android.content.Context;
import android.content.SharedPreferences;
import com.google.firebase.FirebaseApp;
import com.google.firebase.perf.logging.AndroidLogger;
import com.google.firebase.perf.util.Optional;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/* loaded from: classes3.dex */
public class DeviceCacheManager {
public static DeviceCacheManager instance;
public static final AndroidLogger logger = AndroidLogger.getInstance();
public final ExecutorService serialExecutor;
public volatile SharedPreferences sharedPref;
public DeviceCacheManager(ExecutorService executorService) {
this.serialExecutor = executorService;
}
public static synchronized DeviceCacheManager getInstance() {
DeviceCacheManager deviceCacheManager;
synchronized (DeviceCacheManager.class) {
try {
if (instance == null) {
instance = new DeviceCacheManager(Executors.newSingleThreadExecutor());
}
deviceCacheManager = instance;
} catch (Throwable th) {
throw th;
}
}
return deviceCacheManager;
}
public synchronized void setContext(final Context context) {
if (this.sharedPref == null && context != null) {
this.serialExecutor.execute(new Runnable() { // from class: com.google.firebase.perf.config.DeviceCacheManager$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
DeviceCacheManager.this.lambda$setContext$0(context);
}
});
}
}
public final /* synthetic */ void lambda$setContext$0(Context context) {
if (this.sharedPref != null || context == null) {
return;
}
this.sharedPref = context.getSharedPreferences("FirebasePerfSharedPrefs", 0);
}
public Optional getBoolean(String str) {
if (str == null) {
logger.debug("Key is null when getting boolean value on device cache.");
return Optional.absent();
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return Optional.absent();
}
}
if (!this.sharedPref.contains(str)) {
return Optional.absent();
}
try {
return Optional.of(Boolean.valueOf(this.sharedPref.getBoolean(str, false)));
} catch (ClassCastException e) {
logger.debug("Key %s from sharedPreferences has type other than long: %s", str, e.getMessage());
return Optional.absent();
}
}
public void clear(String str) {
if (str == null) {
logger.debug("Key is null. Cannot clear nullable key");
} else {
this.sharedPref.edit().remove(str).apply();
}
}
public boolean setValue(String str, boolean z) {
if (str == null) {
logger.debug("Key is null when setting boolean value on device cache.");
return false;
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return false;
}
}
this.sharedPref.edit().putBoolean(str, z).apply();
return true;
}
public Optional getString(String str) {
if (str == null) {
logger.debug("Key is null when getting String value on device cache.");
return Optional.absent();
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return Optional.absent();
}
}
if (!this.sharedPref.contains(str)) {
return Optional.absent();
}
try {
return Optional.of(this.sharedPref.getString(str, ""));
} catch (ClassCastException e) {
logger.debug("Key %s from sharedPreferences has type other than String: %s", str, e.getMessage());
return Optional.absent();
}
}
public boolean setValue(String str, String str2) {
if (str == null) {
logger.debug("Key is null when setting String value on device cache.");
return false;
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return false;
}
}
if (str2 == null) {
this.sharedPref.edit().remove(str).apply();
return true;
}
this.sharedPref.edit().putString(str, str2).apply();
return true;
}
public Optional getDouble(String str) {
if (str == null) {
logger.debug("Key is null when getting double value on device cache.");
return Optional.absent();
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return Optional.absent();
}
}
if (!this.sharedPref.contains(str)) {
return Optional.absent();
}
try {
try {
return Optional.of(Double.valueOf(Double.longBitsToDouble(this.sharedPref.getLong(str, 0L))));
} catch (ClassCastException unused) {
return Optional.of(Double.valueOf(Float.valueOf(this.sharedPref.getFloat(str, 0.0f)).doubleValue()));
}
} catch (ClassCastException e) {
logger.debug("Key %s from sharedPreferences has type other than double: %s", str, e.getMessage());
return Optional.absent();
}
}
public boolean setValue(String str, double d) {
if (str == null) {
logger.debug("Key is null when setting double value on device cache.");
return false;
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return false;
}
}
this.sharedPref.edit().putLong(str, Double.doubleToRawLongBits(d)).apply();
return true;
}
public Optional getLong(String str) {
if (str == null) {
logger.debug("Key is null when getting long value on device cache.");
return Optional.absent();
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return Optional.absent();
}
}
if (!this.sharedPref.contains(str)) {
return Optional.absent();
}
try {
return Optional.of(Long.valueOf(this.sharedPref.getLong(str, 0L)));
} catch (ClassCastException e) {
logger.debug("Key %s from sharedPreferences has type other than long: %s", str, e.getMessage());
return Optional.absent();
}
}
public boolean setValue(String str, long j) {
if (str == null) {
logger.debug("Key is null when setting long value on device cache.");
return false;
}
if (this.sharedPref == null) {
setContext(getFirebaseApplicationContext());
if (this.sharedPref == null) {
return false;
}
}
this.sharedPref.edit().putLong(str, j).apply();
return true;
}
public final Context getFirebaseApplicationContext() {
try {
FirebaseApp.getInstance();
return FirebaseApp.getInstance().getApplicationContext();
} catch (IllegalStateException unused) {
return null;
}
}
}

View File

@@ -0,0 +1,305 @@
package com.google.firebase.perf.config;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.FirebaseApp;
import com.google.firebase.StartupTime;
import com.google.firebase.inject.Provider;
import com.google.firebase.perf.logging.AndroidLogger;
import com.google.firebase.perf.util.Optional;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
import com.google.firebase.remoteconfig.RemoteConfigComponent;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@Keep
/* loaded from: classes3.dex */
public class RemoteConfigManager {
private static final long FETCH_NEVER_HAPPENED_TIMESTAMP_MS = 0;
private static final String FIREPERF_FRC_NAMESPACE_NAME = "fireperf";
private static final long MIN_APP_START_CONFIG_FETCH_DELAY_MS = 5000;
private static final int RANDOM_APP_START_CONFIG_FETCH_DELAY_MS = 25000;
private final ConcurrentHashMap<String, FirebaseRemoteConfigValue> allRcConfigMap;
private final long appStartConfigFetchDelayInMs;
private final long appStartTimeInMs;
private final DeviceCacheManager cache;
private final Executor executor;
@Nullable
private FirebaseRemoteConfig firebaseRemoteConfig;
private long firebaseRemoteConfigLastFetchTimestampMs;
@Nullable
private Provider firebaseRemoteConfigProvider;
private static final AndroidLogger logger = AndroidLogger.getInstance();
private static final RemoteConfigManager instance = new RemoteConfigManager();
private static final long TIME_AFTER_WHICH_A_FETCH_IS_CONSIDERED_STALE_MS = TimeUnit.HOURS.toMillis(12);
public static RemoteConfigManager getInstance() {
return instance;
}
private boolean hasAppStartConfigFetchDelayElapsed(long j) {
return j - this.appStartTimeInMs >= this.appStartConfigFetchDelayInMs;
}
private boolean hasLastFetchBecomeStale(long j) {
return j - this.firebaseRemoteConfigLastFetchTimestampMs > TIME_AFTER_WHICH_A_FETCH_IS_CONSIDERED_STALE_MS;
}
public void setFirebaseRemoteConfigProvider(@Nullable Provider provider) {
this.firebaseRemoteConfigProvider = provider;
}
@SuppressLint({"ThreadPoolCreation"})
private RemoteConfigManager() {
this(DeviceCacheManager.getInstance(), new ThreadPoolExecutor(0, 1, 0L, TimeUnit.SECONDS, new LinkedBlockingQueue()), null, new Random().nextInt(25000) + 5000, getInitialStartupMillis());
}
@VisibleForTesting
public static long getInitialStartupMillis() {
StartupTime startupTime = (StartupTime) FirebaseApp.getInstance().get(StartupTime.class);
if (startupTime != null) {
return startupTime.getEpochMillis();
}
return System.currentTimeMillis();
}
@VisibleForTesting
public RemoteConfigManager(DeviceCacheManager deviceCacheManager, Executor executor, FirebaseRemoteConfig firebaseRemoteConfig, long j, long j2) {
ConcurrentHashMap<String, FirebaseRemoteConfigValue> concurrentHashMap;
this.firebaseRemoteConfigLastFetchTimestampMs = 0L;
this.cache = deviceCacheManager;
this.executor = executor;
this.firebaseRemoteConfig = firebaseRemoteConfig;
if (firebaseRemoteConfig == null) {
concurrentHashMap = new ConcurrentHashMap<>();
} else {
concurrentHashMap = new ConcurrentHashMap<>((Map<? extends String, ? extends FirebaseRemoteConfigValue>) firebaseRemoteConfig.getAll());
}
this.allRcConfigMap = concurrentHashMap;
this.appStartTimeInMs = j2;
this.appStartConfigFetchDelayInMs = j;
}
public Optional getDouble(String str) {
if (str == null) {
logger.debug("The key to get Remote Config double value is null.");
return Optional.absent();
}
FirebaseRemoteConfigValue remoteConfigValue = getRemoteConfigValue(str);
if (remoteConfigValue != null) {
try {
return Optional.of(Double.valueOf(remoteConfigValue.asDouble()));
} catch (IllegalArgumentException unused) {
if (!remoteConfigValue.asString().isEmpty()) {
logger.debug("Could not parse value: '%s' for key: '%s'.", remoteConfigValue.asString(), str);
}
}
}
return Optional.absent();
}
public Optional getLong(String str) {
if (str == null) {
logger.debug("The key to get Remote Config long value is null.");
return Optional.absent();
}
FirebaseRemoteConfigValue remoteConfigValue = getRemoteConfigValue(str);
if (remoteConfigValue != null) {
try {
return Optional.of(Long.valueOf(remoteConfigValue.asLong()));
} catch (IllegalArgumentException unused) {
if (!remoteConfigValue.asString().isEmpty()) {
logger.debug("Could not parse value: '%s' for key: '%s'.", remoteConfigValue.asString(), str);
}
}
}
return Optional.absent();
}
public Optional getBoolean(String str) {
if (str == null) {
logger.debug("The key to get Remote Config boolean value is null.");
return Optional.absent();
}
FirebaseRemoteConfigValue remoteConfigValue = getRemoteConfigValue(str);
if (remoteConfigValue != null) {
try {
return Optional.of(Boolean.valueOf(remoteConfigValue.asBoolean()));
} catch (IllegalArgumentException unused) {
if (!remoteConfigValue.asString().isEmpty()) {
logger.debug("Could not parse value: '%s' for key: '%s'.", remoteConfigValue.asString(), str);
}
}
}
return Optional.absent();
}
public Optional getString(String str) {
if (str == null) {
logger.debug("The key to get Remote Config String value is null.");
return Optional.absent();
}
FirebaseRemoteConfigValue remoteConfigValue = getRemoteConfigValue(str);
if (remoteConfigValue != null) {
return Optional.of(remoteConfigValue.asString());
}
return Optional.absent();
}
/* JADX WARN: Multi-variable type inference failed */
public <T> T getRemoteConfigValueOrDefault(String str, T t) {
Object obj;
FirebaseRemoteConfigValue remoteConfigValue = getRemoteConfigValue(str);
if (remoteConfigValue == null) {
return t;
}
try {
if (t instanceof Boolean) {
obj = Boolean.valueOf(remoteConfigValue.asBoolean());
} else if (t instanceof Double) {
obj = Double.valueOf(remoteConfigValue.asDouble());
} else {
if (!(t instanceof Long) && !(t instanceof Integer)) {
if (t instanceof String) {
obj = remoteConfigValue.asString();
} else {
T t2 = (T) remoteConfigValue.asString();
try {
logger.debug("No matching type found for the defaultValue: '%s', using String.", t);
return t2;
} catch (IllegalArgumentException unused) {
t = t2;
if (remoteConfigValue.asString().isEmpty()) {
return t;
}
logger.debug("Could not parse value: '%s' for key: '%s'.", remoteConfigValue.asString(), str);
return t;
}
}
}
obj = Long.valueOf(remoteConfigValue.asLong());
}
return obj;
} catch (IllegalArgumentException unused2) {
}
}
private FirebaseRemoteConfigValue getRemoteConfigValue(String str) {
triggerRemoteConfigFetchIfNecessary();
if (!isFirebaseRemoteConfigAvailable() || !this.allRcConfigMap.containsKey(str)) {
return null;
}
FirebaseRemoteConfigValue firebaseRemoteConfigValue = this.allRcConfigMap.get(str);
if (firebaseRemoteConfigValue.getSource() != 2) {
return null;
}
logger.debug("Fetched value: '%s' for key: '%s' from Firebase Remote Config.", firebaseRemoteConfigValue.asString(), str);
return firebaseRemoteConfigValue;
}
public boolean isLastFetchFailed() {
FirebaseRemoteConfig firebaseRemoteConfig = this.firebaseRemoteConfig;
return firebaseRemoteConfig == null || firebaseRemoteConfig.getInfo().getLastFetchStatus() == 1 || this.firebaseRemoteConfig.getInfo().getLastFetchStatus() == 2;
}
private void triggerRemoteConfigFetchIfNecessary() {
if (isFirebaseRemoteConfigAvailable()) {
if (this.allRcConfigMap.isEmpty()) {
this.allRcConfigMap.putAll(this.firebaseRemoteConfig.getAll());
}
if (shouldFetchAndActivateRemoteConfigValues()) {
triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch();
}
}
}
private void triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch() {
this.firebaseRemoteConfigLastFetchTimestampMs = getCurrentSystemTimeMillis();
this.firebaseRemoteConfig.fetchAndActivate().addOnSuccessListener(this.executor, new OnSuccessListener() { // from class: com.google.firebase.perf.config.RemoteConfigManager$$ExternalSyntheticLambda0
@Override // com.google.android.gms.tasks.OnSuccessListener
public final void onSuccess(Object obj) {
RemoteConfigManager.this.lambda$triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch$0((Boolean) obj);
}
}).addOnFailureListener(this.executor, new OnFailureListener() { // from class: com.google.firebase.perf.config.RemoteConfigManager$$ExternalSyntheticLambda1
@Override // com.google.android.gms.tasks.OnFailureListener
public final void onFailure(Exception exc) {
RemoteConfigManager.this.lambda$triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch$1(exc);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void lambda$triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch$0(Boolean bool) {
syncConfigValues(this.firebaseRemoteConfig.getAll());
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void lambda$triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch$1(Exception exc) {
logger.warn("Call to Remote Config failed: %s. This may cause a degraded experience with Firebase Performance. Please reach out to Firebase Support https://firebase.google.com/support/", exc);
this.firebaseRemoteConfigLastFetchTimestampMs = 0L;
}
@VisibleForTesting
public void syncConfigValues(Map<String, FirebaseRemoteConfigValue> map) {
this.allRcConfigMap.putAll(map);
for (String str : this.allRcConfigMap.keySet()) {
if (!map.containsKey(str)) {
this.allRcConfigMap.remove(str);
}
}
ConfigurationConstants$ExperimentTTID configurationConstants$ExperimentTTID = ConfigurationConstants$ExperimentTTID.getInstance();
FirebaseRemoteConfigValue firebaseRemoteConfigValue = this.allRcConfigMap.get(configurationConstants$ExperimentTTID.getRemoteConfigFlag());
if (firebaseRemoteConfigValue != null) {
try {
this.cache.setValue(configurationConstants$ExperimentTTID.getDeviceCacheFlag(), firebaseRemoteConfigValue.asBoolean());
return;
} catch (Exception unused) {
logger.debug("ExperimentTTID remote config flag has invalid value, expected boolean.");
return;
}
}
logger.debug("ExperimentTTID remote config flag does not exist.");
}
@VisibleForTesting
public long getCurrentSystemTimeMillis() {
return System.currentTimeMillis();
}
public boolean isFirebaseRemoteConfigAvailable() {
Provider provider;
RemoteConfigComponent remoteConfigComponent;
if (this.firebaseRemoteConfig == null && (provider = this.firebaseRemoteConfigProvider) != null && (remoteConfigComponent = (RemoteConfigComponent) provider.get()) != null) {
this.firebaseRemoteConfig = remoteConfigComponent.get(FIREPERF_FRC_NAMESPACE_NAME);
}
return this.firebaseRemoteConfig != null;
}
private boolean shouldFetchAndActivateRemoteConfigValues() {
long currentSystemTimeMillis = getCurrentSystemTimeMillis();
return hasAppStartConfigFetchDelayElapsed(currentSystemTimeMillis) && hasLastFetchBecomeStale(currentSystemTimeMillis);
}
@VisibleForTesting
public static int getVersionCode(Context context) {
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;
} catch (PackageManager.NameNotFoundException unused) {
return 0;
}
}
}