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,118 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import C.w;
|
||||
import com.google.firebase.installations.InstallationTokenResult;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_InstallationTokenResult extends InstallationTokenResult {
|
||||
private final String token;
|
||||
private final long tokenCreationTimestamp;
|
||||
private final long tokenExpirationTimestamp;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder extends InstallationTokenResult.Builder {
|
||||
private String token;
|
||||
private Long tokenCreationTimestamp;
|
||||
private Long tokenExpirationTimestamp;
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
|
||||
public InstallationTokenResult build() {
|
||||
String str = this.token == null ? " token" : "";
|
||||
if (this.tokenExpirationTimestamp == null) {
|
||||
str = w.n(str, " tokenExpirationTimestamp");
|
||||
}
|
||||
if (this.tokenCreationTimestamp == null) {
|
||||
str = w.n(str, " tokenCreationTimestamp");
|
||||
}
|
||||
if (str.isEmpty()) {
|
||||
return new AutoValue_InstallationTokenResult(this.token, this.tokenExpirationTimestamp.longValue(), this.tokenCreationTimestamp.longValue());
|
||||
}
|
||||
throw new IllegalStateException("Missing required properties:".concat(str));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
|
||||
public InstallationTokenResult.Builder setToken(String str) {
|
||||
if (str == null) {
|
||||
throw new NullPointerException("Null token");
|
||||
}
|
||||
this.token = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
|
||||
public InstallationTokenResult.Builder setTokenCreationTimestamp(long j4) {
|
||||
this.tokenCreationTimestamp = Long.valueOf(j4);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
|
||||
public InstallationTokenResult.Builder setTokenExpirationTimestamp(long j4) {
|
||||
this.tokenExpirationTimestamp = Long.valueOf(j4);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
private Builder(InstallationTokenResult installationTokenResult) {
|
||||
this.token = installationTokenResult.getToken();
|
||||
this.tokenExpirationTimestamp = Long.valueOf(installationTokenResult.getTokenExpirationTimestamp());
|
||||
this.tokenCreationTimestamp = Long.valueOf(installationTokenResult.getTokenCreationTimestamp());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof InstallationTokenResult) {
|
||||
InstallationTokenResult installationTokenResult = (InstallationTokenResult) obj;
|
||||
if (this.token.equals(installationTokenResult.getToken()) && this.tokenExpirationTimestamp == installationTokenResult.getTokenExpirationTimestamp() && this.tokenCreationTimestamp == installationTokenResult.getTokenCreationTimestamp()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult
|
||||
public String getToken() {
|
||||
return this.token;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult
|
||||
public long getTokenCreationTimestamp() {
|
||||
return this.tokenCreationTimestamp;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult
|
||||
public long getTokenExpirationTimestamp() {
|
||||
return this.tokenExpirationTimestamp;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = (this.token.hashCode() ^ 1000003) * 1000003;
|
||||
long j4 = this.tokenExpirationTimestamp;
|
||||
long j5 = this.tokenCreationTimestamp;
|
||||
return ((int) (j5 ^ (j5 >>> 32))) ^ ((hashCode ^ ((int) (j4 ^ (j4 >>> 32)))) * 1000003);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.InstallationTokenResult
|
||||
public InstallationTokenResult.Builder toBuilder() {
|
||||
return new Builder(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("InstallationTokenResult{token=");
|
||||
sb.append(this.token);
|
||||
sb.append(", tokenExpirationTimestamp=");
|
||||
sb.append(this.tokenExpirationTimestamp);
|
||||
sb.append(", tokenCreationTimestamp=");
|
||||
return w.q(sb, this.tokenCreationTimestamp, "}");
|
||||
}
|
||||
|
||||
private AutoValue_InstallationTokenResult(String str, long j4, long j5) {
|
||||
this.token = str;
|
||||
this.tokenExpirationTimestamp = j4;
|
||||
this.tokenCreationTimestamp = j5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AwaitListener implements OnCompleteListener<Void> {
|
||||
private final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
public boolean await(long j4, TimeUnit timeUnit) throws InterruptedException {
|
||||
return this.latch.await(j4, timeUnit);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public void onComplete(Task<Void> task) {
|
||||
this.latch.countDown();
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
this.latch.countDown();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
/* 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.installations";
|
||||
public static final String VERSION_NAME = "17.2.0";
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.FileLock;
|
||||
import java.nio.channels.OverlappingFileLockException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
class CrossProcessLock {
|
||||
private static final String TAG = "CrossProcessLock";
|
||||
private final FileChannel channel;
|
||||
private final FileLock lock;
|
||||
|
||||
private CrossProcessLock(FileChannel fileChannel, FileLock fileLock) {
|
||||
this.channel = fileChannel;
|
||||
this.lock = fileLock;
|
||||
}
|
||||
|
||||
public static CrossProcessLock acquire(Context context, String str) {
|
||||
FileChannel fileChannel;
|
||||
FileLock fileLock;
|
||||
try {
|
||||
fileChannel = new RandomAccessFile(new File(context.getFilesDir(), str), "rw").getChannel();
|
||||
try {
|
||||
fileLock = fileChannel.lock();
|
||||
} catch (IOException | Error | OverlappingFileLockException e4) {
|
||||
e = e4;
|
||||
fileLock = null;
|
||||
}
|
||||
} catch (IOException | Error | OverlappingFileLockException e5) {
|
||||
e = e5;
|
||||
fileChannel = null;
|
||||
fileLock = null;
|
||||
}
|
||||
try {
|
||||
return new CrossProcessLock(fileChannel, fileLock);
|
||||
} catch (IOException | Error | OverlappingFileLockException e6) {
|
||||
e = e6;
|
||||
Log.e(TAG, "encountered error while creating and acquiring the lock, ignoring", e);
|
||||
if (fileLock != null) {
|
||||
try {
|
||||
fileLock.release();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
}
|
||||
if (fileChannel != null) {
|
||||
try {
|
||||
fileChannel.close();
|
||||
} catch (IOException unused2) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void releaseAndClose() {
|
||||
try {
|
||||
this.lock.release();
|
||||
this.channel.close();
|
||||
} catch (IOException e4) {
|
||||
Log.e(TAG, "encountered error while releasing, ignoring", e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,468 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import F2.f;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.components.Lazy;
|
||||
import com.google.firebase.heartbeatinfo.HeartBeatController;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import com.google.firebase.installations.FirebaseInstallationsException;
|
||||
import com.google.firebase.installations.internal.FidListener;
|
||||
import com.google.firebase.installations.internal.FidListenerHandle;
|
||||
import com.google.firebase.installations.local.IidStore;
|
||||
import com.google.firebase.installations.local.PersistedInstallation;
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
import com.google.firebase.installations.remote.FirebaseInstallationServiceClient;
|
||||
import com.google.firebase.installations.remote.InstallationResponse;
|
||||
import com.google.firebase.installations.remote.TokenResult;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseInstallations implements FirebaseInstallationsApi {
|
||||
private static final String API_KEY_VALIDATION_MSG = "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.";
|
||||
private static final String APP_ID_VALIDATION_MSG = "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.";
|
||||
private static final String AUTH_ERROR_MSG = "Installation ID could not be validated with the Firebase servers (maybe it was deleted). Firebase Installations will need to create a new Installation ID and auth token. Please retry your last request.";
|
||||
private static final String CHIME_FIREBASE_APP_NAME = "CHIME_ANDROID_SDK";
|
||||
private static final int CORE_POOL_SIZE = 0;
|
||||
private static final long KEEP_ALIVE_TIME_IN_SECONDS = 30;
|
||||
private static final String LOCKFILE_NAME_GENERATE_FID = "generatefid.lock";
|
||||
private static final int MAXIMUM_POOL_SIZE = 1;
|
||||
private static final String PROJECT_ID_VALIDATION_MSG = "Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.";
|
||||
private final ExecutorService backgroundExecutor;
|
||||
private String cachedFid;
|
||||
private final RandomFidGenerator fidGenerator;
|
||||
private Set<FidListener> fidListeners;
|
||||
private final FirebaseApp firebaseApp;
|
||||
private final Lazy<IidStore> iidStore;
|
||||
private final List<StateListener> listeners;
|
||||
private final Object lock;
|
||||
private final Executor networkExecutor;
|
||||
private final PersistedInstallation persistedInstallation;
|
||||
private final FirebaseInstallationServiceClient serviceClient;
|
||||
private final Utils utils;
|
||||
private static final Object lockGenerateFid = new Object();
|
||||
private static final ThreadFactory THREAD_FACTORY = new ThreadFactory() { // from class: com.google.firebase.installations.FirebaseInstallations.1
|
||||
private final AtomicInteger mCount = new AtomicInteger(1);
|
||||
|
||||
@Override // java.util.concurrent.ThreadFactory
|
||||
@SuppressLint({"ThreadPoolCreation"})
|
||||
public Thread newThread(Runnable runnable) {
|
||||
return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.mCount.getAndIncrement())));
|
||||
}
|
||||
};
|
||||
|
||||
/* renamed from: com.google.firebase.installations.FirebaseInstallations$3, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static /* synthetic */ class AnonymousClass3 {
|
||||
static final /* synthetic */ int[] $SwitchMap$com$google$firebase$installations$remote$InstallationResponse$ResponseCode;
|
||||
static final /* synthetic */ int[] $SwitchMap$com$google$firebase$installations$remote$TokenResult$ResponseCode;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[TokenResult.ResponseCode.values().length];
|
||||
$SwitchMap$com$google$firebase$installations$remote$TokenResult$ResponseCode = iArr;
|
||||
try {
|
||||
iArr[TokenResult.ResponseCode.OK.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$firebase$installations$remote$TokenResult$ResponseCode[TokenResult.ResponseCode.BAD_CONFIG.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$firebase$installations$remote$TokenResult$ResponseCode[TokenResult.ResponseCode.AUTH_ERROR.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
int[] iArr2 = new int[InstallationResponse.ResponseCode.values().length];
|
||||
$SwitchMap$com$google$firebase$installations$remote$InstallationResponse$ResponseCode = iArr2;
|
||||
try {
|
||||
iArr2[InstallationResponse.ResponseCode.OK.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$firebase$installations$remote$InstallationResponse$ResponseCode[InstallationResponse.ResponseCode.BAD_CONFIG.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused5) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({"ThreadPoolCreation"})
|
||||
public FirebaseInstallations(FirebaseApp firebaseApp, Provider<HeartBeatController> provider, ExecutorService executorService, Executor executor) {
|
||||
this(executorService, executor, firebaseApp, new FirebaseInstallationServiceClient(firebaseApp.getApplicationContext(), provider), new PersistedInstallation(firebaseApp), Utils.getInstance(), new Lazy((Provider) new com.google.firebase.components.b(firebaseApp, 1)), new RandomFidGenerator());
|
||||
}
|
||||
|
||||
private Task<InstallationTokenResult> addGetAuthTokenListener() {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
addStateListeners(new GetAuthTokenListener(this.utils, taskCompletionSource));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
private Task<String> addGetIdListener() {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
addStateListeners(new GetIdListener(taskCompletionSource));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
private void addStateListeners(StateListener stateListener) {
|
||||
synchronized (this.lock) {
|
||||
this.listeners.add(stateListener);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public Void deleteFirebaseInstallationId() throws FirebaseInstallationsException {
|
||||
updateCacheFid(null);
|
||||
PersistedInstallationEntry multiProcessSafePrefs = getMultiProcessSafePrefs();
|
||||
if (multiProcessSafePrefs.isRegistered()) {
|
||||
this.serviceClient.deleteFirebaseInstallation(getApiKey(), multiProcessSafePrefs.getFirebaseInstallationId(), getProjectIdentifier(), multiProcessSafePrefs.getRefreshToken());
|
||||
}
|
||||
insertOrUpdatePrefs(multiProcessSafePrefs.withNoGeneratedFid());
|
||||
return null;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x0034 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0041 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x004c */
|
||||
/* renamed from: doNetworkCallIfNecessary, reason: merged with bridge method [inline-methods] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public void lambda$doRegistrationOrRefresh$3(boolean r3) {
|
||||
/*
|
||||
r2 = this;
|
||||
com.google.firebase.installations.local.PersistedInstallationEntry r0 = r2.getMultiProcessSafePrefs()
|
||||
boolean r1 = r0.isErrored() // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
if (r1 != 0) goto L24
|
||||
boolean r1 = r0.isUnregistered() // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
if (r1 == 0) goto L11
|
||||
goto L24
|
||||
L11:
|
||||
if (r3 != 0) goto L1f
|
||||
com.google.firebase.installations.Utils r3 = r2.utils // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
boolean r3 = r3.isAuthTokenExpired(r0) // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
if (r3 == 0) goto L1c
|
||||
goto L1f
|
||||
L1c:
|
||||
return
|
||||
L1d:
|
||||
r3 = move-exception
|
||||
goto L61
|
||||
L1f:
|
||||
com.google.firebase.installations.local.PersistedInstallationEntry r3 = r2.fetchAuthTokenFromServer(r0) // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
goto L28
|
||||
L24:
|
||||
com.google.firebase.installations.local.PersistedInstallationEntry r3 = r2.registerFidWithServer(r0) // Catch: com.google.firebase.installations.FirebaseInstallationsException -> L1d
|
||||
L28:
|
||||
r2.insertOrUpdatePrefs(r3)
|
||||
r2.updateFidListener(r0, r3)
|
||||
boolean r0 = r3.isRegistered()
|
||||
if (r0 == 0) goto L3b
|
||||
java.lang.String r0 = r3.getFirebaseInstallationId()
|
||||
r2.updateCacheFid(r0)
|
||||
L3b:
|
||||
boolean r0 = r3.isErrored()
|
||||
if (r0 == 0) goto L4c
|
||||
com.google.firebase.installations.FirebaseInstallationsException r3 = new com.google.firebase.installations.FirebaseInstallationsException
|
||||
com.google.firebase.installations.FirebaseInstallationsException$Status r0 = com.google.firebase.installations.FirebaseInstallationsException.Status.BAD_CONFIG
|
||||
r3.<init>(r0)
|
||||
r2.triggerOnException(r3)
|
||||
return
|
||||
L4c:
|
||||
boolean r0 = r3.isNotGenerated()
|
||||
if (r0 == 0) goto L5d
|
||||
java.io.IOException r3 = new java.io.IOException
|
||||
java.lang.String r0 = "Installation ID could not be validated with the Firebase servers (maybe it was deleted). Firebase Installations will need to create a new Installation ID and auth token. Please retry your last request."
|
||||
r3.<init>(r0)
|
||||
r2.triggerOnException(r3)
|
||||
return
|
||||
L5d:
|
||||
r2.triggerOnStateReached(r3)
|
||||
return
|
||||
L61:
|
||||
r2.triggerOnException(r3)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$3(boolean):void");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: doRegistrationOrRefresh, reason: merged with bridge method [inline-methods] */
|
||||
public final void lambda$getToken$2(boolean z3) {
|
||||
PersistedInstallationEntry prefsWithGeneratedIdMultiProcessSafe = getPrefsWithGeneratedIdMultiProcessSafe();
|
||||
if (z3) {
|
||||
prefsWithGeneratedIdMultiProcessSafe = prefsWithGeneratedIdMultiProcessSafe.withClearedAuthToken();
|
||||
}
|
||||
triggerOnStateReached(prefsWithGeneratedIdMultiProcessSafe);
|
||||
this.networkExecutor.execute(new a(z3, 0, this));
|
||||
}
|
||||
|
||||
private PersistedInstallationEntry fetchAuthTokenFromServer(PersistedInstallationEntry persistedInstallationEntry) throws FirebaseInstallationsException {
|
||||
TokenResult generateAuthToken = this.serviceClient.generateAuthToken(getApiKey(), persistedInstallationEntry.getFirebaseInstallationId(), getProjectIdentifier(), persistedInstallationEntry.getRefreshToken());
|
||||
int i = AnonymousClass3.$SwitchMap$com$google$firebase$installations$remote$TokenResult$ResponseCode[generateAuthToken.getResponseCode().ordinal()];
|
||||
if (i == 1) {
|
||||
return persistedInstallationEntry.withAuthToken(generateAuthToken.getToken(), generateAuthToken.getTokenExpirationTimestamp(), this.utils.currentTimeInSecs());
|
||||
}
|
||||
if (i == 2) {
|
||||
return persistedInstallationEntry.withFisError("BAD CONFIG");
|
||||
}
|
||||
if (i != 3) {
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
updateCacheFid(null);
|
||||
return persistedInstallationEntry.withNoGeneratedFid();
|
||||
}
|
||||
|
||||
private synchronized String getCacheFid() {
|
||||
return this.cachedFid;
|
||||
}
|
||||
|
||||
private IidStore getIidStore() {
|
||||
return this.iidStore.get();
|
||||
}
|
||||
|
||||
public static FirebaseInstallations getInstance() {
|
||||
return getInstance(FirebaseApp.getInstance());
|
||||
}
|
||||
|
||||
/* JADX WARN: Finally extract failed */
|
||||
private PersistedInstallationEntry getMultiProcessSafePrefs() {
|
||||
PersistedInstallationEntry readPersistedInstallationEntryValue;
|
||||
synchronized (lockGenerateFid) {
|
||||
try {
|
||||
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), LOCKFILE_NAME_GENERATE_FID);
|
||||
try {
|
||||
readPersistedInstallationEntryValue = this.persistedInstallation.readPersistedInstallationEntryValue();
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
return readPersistedInstallationEntryValue;
|
||||
}
|
||||
|
||||
/* JADX WARN: Finally extract failed */
|
||||
private PersistedInstallationEntry getPrefsWithGeneratedIdMultiProcessSafe() {
|
||||
PersistedInstallationEntry readPersistedInstallationEntryValue;
|
||||
synchronized (lockGenerateFid) {
|
||||
try {
|
||||
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), LOCKFILE_NAME_GENERATE_FID);
|
||||
try {
|
||||
readPersistedInstallationEntryValue = this.persistedInstallation.readPersistedInstallationEntryValue();
|
||||
if (readPersistedInstallationEntryValue.isNotGenerated()) {
|
||||
readPersistedInstallationEntryValue = this.persistedInstallation.insertOrUpdatePersistedInstallationEntry(readPersistedInstallationEntryValue.withUnregisteredFid(readExistingIidOrCreateFid(readPersistedInstallationEntryValue)));
|
||||
}
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
return readPersistedInstallationEntryValue;
|
||||
}
|
||||
|
||||
/* JADX WARN: Finally extract failed */
|
||||
private void insertOrUpdatePrefs(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
synchronized (lockGenerateFid) {
|
||||
try {
|
||||
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), LOCKFILE_NAME_GENERATE_FID);
|
||||
try {
|
||||
this.persistedInstallation.insertOrUpdatePersistedInstallationEntry(persistedInstallationEntry);
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
if (acquire != null) {
|
||||
acquire.releaseAndClose();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
} catch (Throwable th2) {
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public /* synthetic */ void lambda$getId$1() {
|
||||
lambda$getToken$2(false);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ IidStore lambda$new$0(FirebaseApp firebaseApp) {
|
||||
return new IidStore(firebaseApp);
|
||||
}
|
||||
|
||||
private void preConditionChecks() {
|
||||
Preconditions.checkNotEmpty(getApplicationId(), APP_ID_VALIDATION_MSG);
|
||||
Preconditions.checkNotEmpty(getProjectIdentifier(), PROJECT_ID_VALIDATION_MSG);
|
||||
Preconditions.checkNotEmpty(getApiKey(), API_KEY_VALIDATION_MSG);
|
||||
Preconditions.checkArgument(Utils.isValidAppIdFormat(getApplicationId()), APP_ID_VALIDATION_MSG);
|
||||
Preconditions.checkArgument(Utils.isValidApiKeyFormat(getApiKey()), API_KEY_VALIDATION_MSG);
|
||||
}
|
||||
|
||||
private String readExistingIidOrCreateFid(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
if ((!this.firebaseApp.getName().equals(CHIME_FIREBASE_APP_NAME) && !this.firebaseApp.isDefaultApp()) || !persistedInstallationEntry.shouldAttemptMigration()) {
|
||||
return this.fidGenerator.createRandomFid();
|
||||
}
|
||||
String readIid = getIidStore().readIid();
|
||||
return TextUtils.isEmpty(readIid) ? this.fidGenerator.createRandomFid() : readIid;
|
||||
}
|
||||
|
||||
private PersistedInstallationEntry registerFidWithServer(PersistedInstallationEntry persistedInstallationEntry) throws FirebaseInstallationsException {
|
||||
InstallationResponse createFirebaseInstallation = this.serviceClient.createFirebaseInstallation(getApiKey(), persistedInstallationEntry.getFirebaseInstallationId(), getProjectIdentifier(), getApplicationId(), (persistedInstallationEntry.getFirebaseInstallationId() == null || persistedInstallationEntry.getFirebaseInstallationId().length() != 11) ? null : getIidStore().readToken());
|
||||
int i = AnonymousClass3.$SwitchMap$com$google$firebase$installations$remote$InstallationResponse$ResponseCode[createFirebaseInstallation.getResponseCode().ordinal()];
|
||||
if (i == 1) {
|
||||
return persistedInstallationEntry.withRegisteredFid(createFirebaseInstallation.getFid(), createFirebaseInstallation.getRefreshToken(), this.utils.currentTimeInSecs(), createFirebaseInstallation.getAuthToken().getToken(), createFirebaseInstallation.getAuthToken().getTokenExpirationTimestamp());
|
||||
}
|
||||
if (i == 2) {
|
||||
return persistedInstallationEntry.withFisError("BAD CONFIG");
|
||||
}
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
|
||||
private void triggerOnException(Exception exc) {
|
||||
synchronized (this.lock) {
|
||||
try {
|
||||
Iterator<StateListener> it = this.listeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (it.next().onException(exc)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerOnStateReached(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
synchronized (this.lock) {
|
||||
try {
|
||||
Iterator<StateListener> it = this.listeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (it.next().onStateReached(persistedInstallationEntry)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void updateCacheFid(String str) {
|
||||
this.cachedFid = str;
|
||||
}
|
||||
|
||||
private synchronized void updateFidListener(PersistedInstallationEntry persistedInstallationEntry, PersistedInstallationEntry persistedInstallationEntry2) {
|
||||
if (this.fidListeners.size() != 0 && !TextUtils.equals(persistedInstallationEntry.getFirebaseInstallationId(), persistedInstallationEntry2.getFirebaseInstallationId())) {
|
||||
Iterator<FidListener> it = this.fidListeners.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().onFidChanged(persistedInstallationEntry2.getFirebaseInstallationId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.FirebaseInstallationsApi
|
||||
public Task<Void> delete() {
|
||||
return Tasks.call(this.backgroundExecutor, new b(this, 0));
|
||||
}
|
||||
|
||||
public String getApiKey() {
|
||||
return this.firebaseApp.getOptions().getApiKey();
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return this.firebaseApp.getOptions().getApplicationId();
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.FirebaseInstallationsApi
|
||||
public Task<String> getId() {
|
||||
preConditionChecks();
|
||||
String cacheFid = getCacheFid();
|
||||
if (cacheFid != null) {
|
||||
return Tasks.forResult(cacheFid);
|
||||
}
|
||||
Task<String> addGetIdListener = addGetIdListener();
|
||||
this.backgroundExecutor.execute(new f(this, 9));
|
||||
return addGetIdListener;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.firebaseApp.getName();
|
||||
}
|
||||
|
||||
public String getProjectIdentifier() {
|
||||
return this.firebaseApp.getOptions().getProjectId();
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.FirebaseInstallationsApi
|
||||
public Task<InstallationTokenResult> getToken(boolean z3) {
|
||||
preConditionChecks();
|
||||
Task<InstallationTokenResult> addGetAuthTokenListener = addGetAuthTokenListener();
|
||||
this.backgroundExecutor.execute(new a(z3, 1, this));
|
||||
return addGetAuthTokenListener;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.FirebaseInstallationsApi
|
||||
public synchronized FidListenerHandle registerFidListener(final FidListener fidListener) {
|
||||
this.fidListeners.add(fidListener);
|
||||
return new FidListenerHandle() { // from class: com.google.firebase.installations.FirebaseInstallations.2
|
||||
@Override // com.google.firebase.installations.internal.FidListenerHandle
|
||||
public void unregister() {
|
||||
synchronized (FirebaseInstallations.this) {
|
||||
FirebaseInstallations.this.fidListeners.remove(fidListener);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static FirebaseInstallations getInstance(FirebaseApp firebaseApp) {
|
||||
Preconditions.checkArgument(firebaseApp != null, "Null is not a valid value of FirebaseApp.");
|
||||
return (FirebaseInstallations) firebaseApp.get(FirebaseInstallationsApi.class);
|
||||
}
|
||||
|
||||
@SuppressLint({"ThreadPoolCreation"})
|
||||
public FirebaseInstallations(ExecutorService executorService, Executor executor, FirebaseApp firebaseApp, FirebaseInstallationServiceClient firebaseInstallationServiceClient, PersistedInstallation persistedInstallation, Utils utils, Lazy<IidStore> lazy, RandomFidGenerator randomFidGenerator) {
|
||||
this.lock = new Object();
|
||||
this.fidListeners = new HashSet();
|
||||
this.listeners = new ArrayList();
|
||||
this.firebaseApp = firebaseApp;
|
||||
this.serviceClient = firebaseInstallationServiceClient;
|
||||
this.persistedInstallation = persistedInstallation;
|
||||
this.utils = utils;
|
||||
this.iidStore = lazy;
|
||||
this.fidGenerator = randomFidGenerator;
|
||||
this.backgroundExecutor = executorService;
|
||||
this.networkExecutor = executor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.annotations.DeferredApi;
|
||||
import com.google.firebase.installations.internal.FidListener;
|
||||
import com.google.firebase.installations.internal.FidListenerHandle;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FirebaseInstallationsApi {
|
||||
Task<Void> delete();
|
||||
|
||||
Task<String> getId();
|
||||
|
||||
Task<InstallationTokenResult> getToken(boolean z3);
|
||||
|
||||
@DeferredApi
|
||||
FidListenerHandle registerFidListener(FidListener fidListener);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.firebase.FirebaseException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseInstallationsException extends FirebaseException {
|
||||
private final Status status;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum Status {
|
||||
BAD_CONFIG,
|
||||
UNAVAILABLE,
|
||||
TOO_MANY_REQUESTS
|
||||
}
|
||||
|
||||
public FirebaseInstallationsException(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Status getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public FirebaseInstallationsException(String str, Status status) {
|
||||
super(str);
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public FirebaseInstallationsException(String str, Status status, Throwable th) {
|
||||
super(str, th);
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.firebase.components.Component;
|
||||
import com.google.firebase.components.ComponentRegistrar;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
|
||||
@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\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/installations/FirebaseInstallationsKtxRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "com.google.firebase-firebase-installations"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FirebaseInstallationsKtxRegistrar implements ComponentRegistrar {
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.annotations.concurrent.Background;
|
||||
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.concurrent.FirebaseExecutors;
|
||||
import com.google.firebase.heartbeatinfo.HeartBeatConsumerComponent;
|
||||
import com.google.firebase.heartbeatinfo.HeartBeatController;
|
||||
import com.google.firebase.platforminfo.LibraryVersionComponent;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@Keep
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseInstallationsRegistrar implements ComponentRegistrar {
|
||||
private static final String LIBRARY_NAME = "fire-installations";
|
||||
|
||||
public static /* synthetic */ FirebaseInstallationsApi lambda$getComponents$0(ComponentContainer componentContainer) {
|
||||
return new FirebaseInstallations((FirebaseApp) componentContainer.get(FirebaseApp.class), componentContainer.getProvider(HeartBeatController.class), (ExecutorService) componentContainer.get(Qualified.qualified(Background.class, ExecutorService.class)), FirebaseExecutors.newSequentialExecutor((Executor) componentContainer.get(Qualified.qualified(Blocking.class, Executor.class))));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return Arrays.asList(Component.builder(FirebaseInstallationsApi.class).name(LIBRARY_NAME).add(Dependency.required((Class<?>) FirebaseApp.class)).add(Dependency.optionalProvider((Class<?>) HeartBeatController.class)).add(Dependency.required((Qualified<?>) Qualified.qualified(Background.class, ExecutorService.class))).add(Dependency.required((Qualified<?>) Qualified.qualified(Blocking.class, Executor.class))).factory(new M2.a(7)).build(), HeartBeatConsumerComponent.create(), LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class GetAuthTokenListener implements StateListener {
|
||||
private final TaskCompletionSource<InstallationTokenResult> resultTaskCompletionSource;
|
||||
private final Utils utils;
|
||||
|
||||
public GetAuthTokenListener(Utils utils, TaskCompletionSource<InstallationTokenResult> taskCompletionSource) {
|
||||
this.utils = utils;
|
||||
this.resultTaskCompletionSource = taskCompletionSource;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.StateListener
|
||||
public boolean onException(Exception exc) {
|
||||
this.resultTaskCompletionSource.trySetException(exc);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.StateListener
|
||||
public boolean onStateReached(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
if (!persistedInstallationEntry.isRegistered() || this.utils.isAuthTokenExpired(persistedInstallationEntry)) {
|
||||
return false;
|
||||
}
|
||||
this.resultTaskCompletionSource.setResult(InstallationTokenResult.builder().setToken(persistedInstallationEntry.getAuthToken()).setTokenExpirationTimestamp(persistedInstallationEntry.getExpiresInSecs()).setTokenCreationTimestamp(persistedInstallationEntry.getTokenCreationEpochInSecs()).build());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class GetIdListener implements StateListener {
|
||||
final TaskCompletionSource<String> taskCompletionSource;
|
||||
|
||||
public GetIdListener(TaskCompletionSource<String> taskCompletionSource) {
|
||||
this.taskCompletionSource = taskCompletionSource;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.StateListener
|
||||
public boolean onException(Exception exc) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.StateListener
|
||||
public boolean onStateReached(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
if (!persistedInstallationEntry.isUnregistered() && !persistedInstallationEntry.isRegistered() && !persistedInstallationEntry.isErrored()) {
|
||||
return false;
|
||||
}
|
||||
this.taskCompletionSource.trySetResult(persistedInstallationEntry.getFirebaseInstallationId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.firebase.installations.AutoValue_InstallationTokenResult;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class InstallationTokenResult {
|
||||
|
||||
@AutoValue.Builder
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder {
|
||||
public abstract InstallationTokenResult build();
|
||||
|
||||
public abstract Builder setToken(String str);
|
||||
|
||||
public abstract Builder setTokenCreationTimestamp(long j4);
|
||||
|
||||
public abstract Builder setTokenExpirationTimestamp(long j4);
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new AutoValue_InstallationTokenResult.Builder();
|
||||
}
|
||||
|
||||
public abstract String getToken();
|
||||
|
||||
public abstract long getTokenCreationTimestamp();
|
||||
|
||||
public abstract long getTokenExpirationTimestamp();
|
||||
|
||||
public abstract Builder toBuilder();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.firebase.Firebase;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\u001a\u0012\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0006\"\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0003\u0010\u0004¨\u0006\u0007"}, d2 = {"installations", "Lcom/google/firebase/installations/FirebaseInstallations;", "Lcom/google/firebase/Firebase;", "getInstallations", "(Lcom/google/firebase/Firebase;)Lcom/google/firebase/installations/FirebaseInstallations;", "app", "Lcom/google/firebase/FirebaseApp;", "com.google.firebase-firebase-installations"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class InstallationsKt {
|
||||
public static final FirebaseInstallations getInstallations(Firebase firebase) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
FirebaseInstallations firebaseInstallations = FirebaseInstallations.getInstance();
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseInstallations, "getInstance()");
|
||||
return firebaseInstallations;
|
||||
}
|
||||
|
||||
public static final FirebaseInstallations installations(Firebase firebase, FirebaseApp app) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
Intrinsics.checkNotNullParameter(app, "app");
|
||||
FirebaseInstallations firebaseInstallations = FirebaseInstallations.getInstance(app);
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseInstallations, "getInstance(app)");
|
||||
return firebaseInstallations;
|
||||
}
|
||||
}
|
||||
290
apk_decompiled/sources/com/google/firebase/installations/R.java
Normal file
290
apk_decompiled/sources/com/google/firebase/installations/R.java
Normal file
@@ -0,0 +1,290 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
/* 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,32 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import android.util.Base64;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.UUID;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class RandomFidGenerator {
|
||||
private static final int FID_LENGTH = 22;
|
||||
private static final byte FID_4BIT_PREFIX = Byte.parseByte("01110000", 2);
|
||||
private static final byte REMOVE_PREFIX_MASK = Byte.parseByte("00001111", 2);
|
||||
|
||||
private static String encodeFidBase64UrlSafe(byte[] bArr) {
|
||||
return new String(Base64.encode(bArr, 11), Charset.defaultCharset()).substring(0, 22);
|
||||
}
|
||||
|
||||
private static byte[] getBytesFromUUID(UUID uuid, byte[] bArr) {
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
wrap.putLong(uuid.getMostSignificantBits());
|
||||
wrap.putLong(uuid.getLeastSignificantBits());
|
||||
return wrap.array();
|
||||
}
|
||||
|
||||
public String createRandomFid() {
|
||||
byte[] bytesFromUUID = getBytesFromUUID(UUID.randomUUID(), new byte[17]);
|
||||
byte b4 = bytesFromUUID[0];
|
||||
bytesFromUUID[16] = b4;
|
||||
bytesFromUUID[0] = (byte) ((b4 & REMOVE_PREFIX_MASK) | FID_4BIT_PREFIX);
|
||||
return encodeFidBase64UrlSafe(bytesFromUUID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
interface StateListener {
|
||||
boolean onException(Exception exc);
|
||||
|
||||
boolean onStateReached(PersistedInstallationEntry persistedInstallationEntry);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
import com.google.firebase.installations.time.Clock;
|
||||
import com.google.firebase.installations.time.SystemClock;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Utils {
|
||||
private static final String APP_ID_IDENTIFICATION_SUBSTRING = ":";
|
||||
private static Utils singleton;
|
||||
private final Clock clock;
|
||||
public static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = TimeUnit.HOURS.toSeconds(1);
|
||||
private static final Pattern API_KEY_FORMAT = Pattern.compile("\\AA[\\w-]{38}\\z");
|
||||
|
||||
private Utils(Clock clock) {
|
||||
this.clock = clock;
|
||||
}
|
||||
|
||||
public static Utils getInstance() {
|
||||
return getInstance(SystemClock.getInstance());
|
||||
}
|
||||
|
||||
public static boolean isValidApiKeyFormat(String str) {
|
||||
return API_KEY_FORMAT.matcher(str).matches();
|
||||
}
|
||||
|
||||
public static boolean isValidAppIdFormat(String str) {
|
||||
return str.contains(APP_ID_IDENTIFICATION_SUBSTRING);
|
||||
}
|
||||
|
||||
public long currentTimeInMillis() {
|
||||
return this.clock.currentTimeMillis();
|
||||
}
|
||||
|
||||
public long currentTimeInSecs() {
|
||||
return TimeUnit.MILLISECONDS.toSeconds(currentTimeInMillis());
|
||||
}
|
||||
|
||||
public long getRandomDelayForSyncPrevention() {
|
||||
return (long) (Math.random() * 1000.0d);
|
||||
}
|
||||
|
||||
public boolean isAuthTokenExpired(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
if (TextUtils.isEmpty(persistedInstallationEntry.getAuthToken())) {
|
||||
return true;
|
||||
}
|
||||
return persistedInstallationEntry.getExpiresInSecs() + persistedInstallationEntry.getTokenCreationEpochInSecs() < currentTimeInSecs() + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS;
|
||||
}
|
||||
|
||||
public static Utils getInstance(Clock clock) {
|
||||
if (singleton == null) {
|
||||
singleton = new Utils(clock);
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.adif.elcanomovil.uiAvisa.components.create.y;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class a implements Runnable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5990a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5991b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ boolean f5992c;
|
||||
|
||||
public /* synthetic */ a(boolean z3, int i, Object obj) {
|
||||
this.f5990a = i;
|
||||
this.f5991b = obj;
|
||||
this.f5992c = z3;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
switch (this.f5990a) {
|
||||
case 0:
|
||||
((FirebaseInstallations) this.f5991b).lambda$doRegistrationOrRefresh$3(this.f5992c);
|
||||
return;
|
||||
case 1:
|
||||
((FirebaseInstallations) this.f5991b).lambda$getToken$2(this.f5992c);
|
||||
return;
|
||||
default:
|
||||
y yVar = (y) this.f5991b;
|
||||
if (yVar != null) {
|
||||
yVar.invoke(Boolean.valueOf(this.f5992c));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.google.firebase.installations;
|
||||
|
||||
import com.google.firebase.remoteconfig.RemoteConfigComponent;
|
||||
import com.google.firebase.remoteconfig.internal.ConfigStorageClient;
|
||||
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 f5993a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5994b;
|
||||
|
||||
public /* synthetic */ b(Object obj, int i) {
|
||||
this.f5993a = i;
|
||||
this.f5994b = obj;
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.Callable
|
||||
public final Object call() {
|
||||
Void deleteFirebaseInstallationId;
|
||||
int i = this.f5993a;
|
||||
Object obj = this.f5994b;
|
||||
switch (i) {
|
||||
case 0:
|
||||
deleteFirebaseInstallationId = ((FirebaseInstallations) obj).deleteFirebaseInstallationId();
|
||||
return deleteFirebaseInstallationId;
|
||||
case 1:
|
||||
return ((RemoteConfigComponent) obj).getDefault();
|
||||
default:
|
||||
return ((ConfigStorageClient) obj).read();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.installations.internal;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FidListener {
|
||||
void onFidChanged(String str);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.installations.internal;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FidListenerHandle {
|
||||
void unregister();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.firebase.installations.interop;
|
||||
|
||||
/* 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.installations.interop";
|
||||
public static final String VERSION_NAME = "17.1.1";
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
package com.google.firebase.installations.interop;
|
||||
|
||||
/* 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 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,19 @@
|
||||
package com.google.firebase.installations.ktx;
|
||||
|
||||
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 = "com.google.firebase.installations.FirebaseInstallationsKtxRegistrar has been deprecated. Use `com.google.firebase.installationsFirebaseInstallationsKtxRegistrar` instead.", replaceWith = @ReplaceWith(expression = "", imports = {}))
|
||||
@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/installations/ktx/FirebaseInstallationsKtxRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "com.google.firebase-firebase-installations"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FirebaseInstallationsKtxRegistrar implements ComponentRegistrar {
|
||||
@Override // com.google.firebase.components.ComponentRegistrar
|
||||
public List<Component<?>> getComponents() {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.google.firebase.installations.ktx;
|
||||
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.installations.FirebaseInstallations;
|
||||
import com.google.firebase.ktx.Firebase;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\u001a\u0012\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0006\"\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0003\u0010\u0004¨\u0006\u0007"}, d2 = {"installations", "Lcom/google/firebase/installations/FirebaseInstallations;", "Lcom/google/firebase/ktx/Firebase;", "getInstallations", "(Lcom/google/firebase/ktx/Firebase;)Lcom/google/firebase/installations/FirebaseInstallations;", "app", "Lcom/google/firebase/FirebaseApp;", "com.google.firebase-firebase-installations"}, k = 2, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class InstallationsKt {
|
||||
public static final FirebaseInstallations getInstallations(Firebase firebase) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
FirebaseInstallations firebaseInstallations = FirebaseInstallations.getInstance();
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseInstallations, "getInstance()");
|
||||
return firebaseInstallations;
|
||||
}
|
||||
|
||||
public static final FirebaseInstallations installations(Firebase firebase, FirebaseApp app) {
|
||||
Intrinsics.checkNotNullParameter(firebase, "<this>");
|
||||
Intrinsics.checkNotNullParameter(app, "app");
|
||||
FirebaseInstallations firebaseInstallations = FirebaseInstallations.getInstance(app);
|
||||
Intrinsics.checkNotNullExpressionValue(firebaseInstallations, "getInstance(app)");
|
||||
return firebaseInstallations;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
package com.google.firebase.installations.local;
|
||||
|
||||
import C.w;
|
||||
import com.google.firebase.installations.local.PersistedInstallation;
|
||||
import com.google.firebase.installations.local.PersistedInstallationEntry;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_PersistedInstallationEntry extends PersistedInstallationEntry {
|
||||
private final String authToken;
|
||||
private final long expiresInSecs;
|
||||
private final String firebaseInstallationId;
|
||||
private final String fisError;
|
||||
private final String refreshToken;
|
||||
private final PersistedInstallation.RegistrationStatus registrationStatus;
|
||||
private final long tokenCreationEpochInSecs;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder extends PersistedInstallationEntry.Builder {
|
||||
private String authToken;
|
||||
private Long expiresInSecs;
|
||||
private String firebaseInstallationId;
|
||||
private String fisError;
|
||||
private String refreshToken;
|
||||
private PersistedInstallation.RegistrationStatus registrationStatus;
|
||||
private Long tokenCreationEpochInSecs;
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry build() {
|
||||
String str = this.registrationStatus == null ? " registrationStatus" : "";
|
||||
if (this.expiresInSecs == null) {
|
||||
str = w.n(str, " expiresInSecs");
|
||||
}
|
||||
if (this.tokenCreationEpochInSecs == null) {
|
||||
str = w.n(str, " tokenCreationEpochInSecs");
|
||||
}
|
||||
if (str.isEmpty()) {
|
||||
return new AutoValue_PersistedInstallationEntry(this.firebaseInstallationId, this.registrationStatus, this.authToken, this.refreshToken, this.expiresInSecs.longValue(), this.tokenCreationEpochInSecs.longValue(), this.fisError);
|
||||
}
|
||||
throw new IllegalStateException("Missing required properties:".concat(str));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setAuthToken(String str) {
|
||||
this.authToken = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setExpiresInSecs(long j4) {
|
||||
this.expiresInSecs = Long.valueOf(j4);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setFirebaseInstallationId(String str) {
|
||||
this.firebaseInstallationId = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setFisError(String str) {
|
||||
this.fisError = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setRefreshToken(String str) {
|
||||
this.refreshToken = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setRegistrationStatus(PersistedInstallation.RegistrationStatus registrationStatus) {
|
||||
if (registrationStatus == null) {
|
||||
throw new NullPointerException("Null registrationStatus");
|
||||
}
|
||||
this.registrationStatus = registrationStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
|
||||
public PersistedInstallationEntry.Builder setTokenCreationEpochInSecs(long j4) {
|
||||
this.tokenCreationEpochInSecs = Long.valueOf(j4);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
private Builder(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
this.firebaseInstallationId = persistedInstallationEntry.getFirebaseInstallationId();
|
||||
this.registrationStatus = persistedInstallationEntry.getRegistrationStatus();
|
||||
this.authToken = persistedInstallationEntry.getAuthToken();
|
||||
this.refreshToken = persistedInstallationEntry.getRefreshToken();
|
||||
this.expiresInSecs = Long.valueOf(persistedInstallationEntry.getExpiresInSecs());
|
||||
this.tokenCreationEpochInSecs = Long.valueOf(persistedInstallationEntry.getTokenCreationEpochInSecs());
|
||||
this.fisError = persistedInstallationEntry.getFisError();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
String str;
|
||||
String str2;
|
||||
String str3;
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof PersistedInstallationEntry) {
|
||||
PersistedInstallationEntry persistedInstallationEntry = (PersistedInstallationEntry) obj;
|
||||
String str4 = this.firebaseInstallationId;
|
||||
if (str4 != null ? str4.equals(persistedInstallationEntry.getFirebaseInstallationId()) : persistedInstallationEntry.getFirebaseInstallationId() == null) {
|
||||
if (this.registrationStatus.equals(persistedInstallationEntry.getRegistrationStatus()) && ((str = this.authToken) != null ? str.equals(persistedInstallationEntry.getAuthToken()) : persistedInstallationEntry.getAuthToken() == null) && ((str2 = this.refreshToken) != null ? str2.equals(persistedInstallationEntry.getRefreshToken()) : persistedInstallationEntry.getRefreshToken() == null) && this.expiresInSecs == persistedInstallationEntry.getExpiresInSecs() && this.tokenCreationEpochInSecs == persistedInstallationEntry.getTokenCreationEpochInSecs() && ((str3 = this.fisError) != null ? str3.equals(persistedInstallationEntry.getFisError()) : persistedInstallationEntry.getFisError() == null)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public String getAuthToken() {
|
||||
return this.authToken;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public long getExpiresInSecs() {
|
||||
return this.expiresInSecs;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public String getFirebaseInstallationId() {
|
||||
return this.firebaseInstallationId;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public String getFisError() {
|
||||
return this.fisError;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public String getRefreshToken() {
|
||||
return this.refreshToken;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public PersistedInstallation.RegistrationStatus getRegistrationStatus() {
|
||||
return this.registrationStatus;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public long getTokenCreationEpochInSecs() {
|
||||
return this.tokenCreationEpochInSecs;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
String str = this.firebaseInstallationId;
|
||||
int hashCode = ((((str == null ? 0 : str.hashCode()) ^ 1000003) * 1000003) ^ this.registrationStatus.hashCode()) * 1000003;
|
||||
String str2 = this.authToken;
|
||||
int hashCode2 = (hashCode ^ (str2 == null ? 0 : str2.hashCode())) * 1000003;
|
||||
String str3 = this.refreshToken;
|
||||
int hashCode3 = (hashCode2 ^ (str3 == null ? 0 : str3.hashCode())) * 1000003;
|
||||
long j4 = this.expiresInSecs;
|
||||
int i = (hashCode3 ^ ((int) (j4 ^ (j4 >>> 32)))) * 1000003;
|
||||
long j5 = this.tokenCreationEpochInSecs;
|
||||
int i4 = (i ^ ((int) (j5 ^ (j5 >>> 32)))) * 1000003;
|
||||
String str4 = this.fisError;
|
||||
return i4 ^ (str4 != null ? str4.hashCode() : 0);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
|
||||
public PersistedInstallationEntry.Builder toBuilder() {
|
||||
return new Builder(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("PersistedInstallationEntry{firebaseInstallationId=");
|
||||
sb.append(this.firebaseInstallationId);
|
||||
sb.append(", registrationStatus=");
|
||||
sb.append(this.registrationStatus);
|
||||
sb.append(", authToken=");
|
||||
sb.append(this.authToken);
|
||||
sb.append(", refreshToken=");
|
||||
sb.append(this.refreshToken);
|
||||
sb.append(", expiresInSecs=");
|
||||
sb.append(this.expiresInSecs);
|
||||
sb.append(", tokenCreationEpochInSecs=");
|
||||
sb.append(this.tokenCreationEpochInSecs);
|
||||
sb.append(", fisError=");
|
||||
return w.r(sb, this.fisError, "}");
|
||||
}
|
||||
|
||||
private AutoValue_PersistedInstallationEntry(String str, PersistedInstallation.RegistrationStatus registrationStatus, String str2, String str3, long j4, long j5, String str4) {
|
||||
this.firebaseInstallationId = str;
|
||||
this.registrationStatus = registrationStatus;
|
||||
this.authToken = str2;
|
||||
this.refreshToken = str3;
|
||||
this.expiresInSecs = j4;
|
||||
this.tokenCreationEpochInSecs = j5;
|
||||
this.fisError = str4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.google.firebase.installations.local;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import com.adif.elcanomovil.repositories.circulation.CirculationMapper;
|
||||
import com.google.android.gms.stats.CodePackage;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.PublicKey;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
import kotlin.KotlinVersion;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class IidStore {
|
||||
private static final String[] ALLOWABLE_SCOPES = {CirculationMapper.VIA_ASTERISK, FirebaseMessaging.INSTANCE_ID_SCOPE, CodePackage.GCM, ""};
|
||||
private static final String IID_SHARED_PREFS_NAME = "com.google.android.gms.appid";
|
||||
private static final String JSON_ENCODED_PREFIX = "{";
|
||||
private static final String JSON_TOKEN_KEY = "token";
|
||||
private static final String STORE_KEY_ID = "|S|id";
|
||||
private static final String STORE_KEY_PUB = "|S||P|";
|
||||
private static final String STORE_KEY_SEPARATOR = "|";
|
||||
private static final String STORE_KEY_TOKEN = "|T|";
|
||||
private final String defaultSenderId;
|
||||
private final SharedPreferences iidPrefs;
|
||||
|
||||
public IidStore(FirebaseApp firebaseApp) {
|
||||
this.iidPrefs = firebaseApp.getApplicationContext().getSharedPreferences(IID_SHARED_PREFS_NAME, 0);
|
||||
this.defaultSenderId = getDefaultSenderId(firebaseApp);
|
||||
}
|
||||
|
||||
private String createTokenKey(String str, String str2) {
|
||||
return STORE_KEY_TOKEN + str + STORE_KEY_SEPARATOR + str2;
|
||||
}
|
||||
|
||||
private static String getDefaultSenderId(FirebaseApp firebaseApp) {
|
||||
String gcmSenderId = firebaseApp.getOptions().getGcmSenderId();
|
||||
if (gcmSenderId != null) {
|
||||
return gcmSenderId;
|
||||
}
|
||||
String applicationId = firebaseApp.getOptions().getApplicationId();
|
||||
if (!applicationId.startsWith("1:") && !applicationId.startsWith("2:")) {
|
||||
return applicationId;
|
||||
}
|
||||
String[] split = applicationId.split(":");
|
||||
if (split.length != 4) {
|
||||
return null;
|
||||
}
|
||||
String str = split[1];
|
||||
if (str.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private static String getIdFromPublicKey(PublicKey publicKey) {
|
||||
try {
|
||||
byte[] digest = MessageDigest.getInstance("SHA1").digest(publicKey.getEncoded());
|
||||
digest[0] = (byte) (((digest[0] & 15) + 112) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
return Base64.encodeToString(digest, 0, 8, 11);
|
||||
} catch (NoSuchAlgorithmException unused) {
|
||||
Log.w("ContentValues", "Unexpected error, device missing required algorithms");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String parseIidTokenFromJson(String str) {
|
||||
try {
|
||||
return new JSONObject(str).getString("token");
|
||||
} catch (JSONException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private PublicKey parseKey(String str) {
|
||||
try {
|
||||
return KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(Base64.decode(str, 8)));
|
||||
} catch (IllegalArgumentException | NoSuchAlgorithmException | InvalidKeySpecException e4) {
|
||||
Log.w("ContentValues", "Invalid key stored " + e4);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String readInstanceIdFromLocalStorage() {
|
||||
String string;
|
||||
synchronized (this.iidPrefs) {
|
||||
string = this.iidPrefs.getString(STORE_KEY_ID, null);
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
private String readPublicKeyFromLocalStorageAndCalculateInstanceId() {
|
||||
synchronized (this.iidPrefs) {
|
||||
try {
|
||||
String string = this.iidPrefs.getString(STORE_KEY_PUB, null);
|
||||
if (string == null) {
|
||||
return null;
|
||||
}
|
||||
PublicKey parseKey = parseKey(string);
|
||||
if (parseKey == null) {
|
||||
return null;
|
||||
}
|
||||
return getIdFromPublicKey(parseKey);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String readIid() {
|
||||
synchronized (this.iidPrefs) {
|
||||
try {
|
||||
String readInstanceIdFromLocalStorage = readInstanceIdFromLocalStorage();
|
||||
if (readInstanceIdFromLocalStorage != null) {
|
||||
return readInstanceIdFromLocalStorage;
|
||||
}
|
||||
return readPublicKeyFromLocalStorageAndCalculateInstanceId();
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String readToken() {
|
||||
synchronized (this.iidPrefs) {
|
||||
try {
|
||||
for (String str : ALLOWABLE_SCOPES) {
|
||||
String string = this.iidPrefs.getString(createTokenKey(this.defaultSenderId, str), null);
|
||||
if (string != null && !string.isEmpty()) {
|
||||
if (string.startsWith(JSON_ENCODED_PREFIX)) {
|
||||
string = parseIidTokenFromJson(string);
|
||||
}
|
||||
return string;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IidStore(SharedPreferences sharedPreferences, String str) {
|
||||
this.iidPrefs = sharedPreferences;
|
||||
this.defaultSenderId = str;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.google.firebase.installations.local;
|
||||
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class PersistedInstallation {
|
||||
private static final String AUTH_TOKEN_KEY = "AuthToken";
|
||||
private static final String EXPIRES_IN_SECONDS_KEY = "ExpiresInSecs";
|
||||
private static final String FIREBASE_INSTALLATION_ID_KEY = "Fid";
|
||||
private static final String FIS_ERROR_KEY = "FisError";
|
||||
private static final String PERSISTED_STATUS_KEY = "Status";
|
||||
private static final String REFRESH_TOKEN_KEY = "RefreshToken";
|
||||
private static final String SETTINGS_FILE_NAME_PREFIX = "PersistedInstallation";
|
||||
private static final String TOKEN_CREATION_TIME_IN_SECONDS_KEY = "TokenCreationEpochInSecs";
|
||||
private File dataFile;
|
||||
private final FirebaseApp firebaseApp;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum RegistrationStatus {
|
||||
ATTEMPT_MIGRATION,
|
||||
NOT_GENERATED,
|
||||
UNREGISTERED,
|
||||
REGISTERED,
|
||||
REGISTER_ERROR
|
||||
}
|
||||
|
||||
public PersistedInstallation(FirebaseApp firebaseApp) {
|
||||
this.firebaseApp = firebaseApp;
|
||||
}
|
||||
|
||||
private File getDataFile() {
|
||||
if (this.dataFile == null) {
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (this.dataFile == null) {
|
||||
this.dataFile = new File(this.firebaseApp.getApplicationContext().getFilesDir(), "PersistedInstallation." + this.firebaseApp.getPersistenceKey() + ".json");
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.dataFile;
|
||||
}
|
||||
|
||||
private JSONObject readJSONFromFile() {
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
byte[] bArr = new byte[16384];
|
||||
try {
|
||||
FileInputStream fileInputStream = new FileInputStream(getDataFile());
|
||||
while (true) {
|
||||
try {
|
||||
int read = fileInputStream.read(bArr, 0, 16384);
|
||||
if (read < 0) {
|
||||
JSONObject jSONObject = new JSONObject(byteArrayOutputStream.toString());
|
||||
fileInputStream.close();
|
||||
return jSONObject;
|
||||
}
|
||||
byteArrayOutputStream.write(bArr, 0, read);
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (Throwable th2) {
|
||||
th.addSuppressed(th2);
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
} catch (IOException | JSONException unused) {
|
||||
return new JSONObject();
|
||||
}
|
||||
}
|
||||
|
||||
public void clearForTesting() {
|
||||
getDataFile().delete();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry insertOrUpdatePersistedInstallationEntry(PersistedInstallationEntry persistedInstallationEntry) {
|
||||
File createTempFile;
|
||||
try {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
jSONObject.put(FIREBASE_INSTALLATION_ID_KEY, persistedInstallationEntry.getFirebaseInstallationId());
|
||||
jSONObject.put(PERSISTED_STATUS_KEY, persistedInstallationEntry.getRegistrationStatus().ordinal());
|
||||
jSONObject.put(AUTH_TOKEN_KEY, persistedInstallationEntry.getAuthToken());
|
||||
jSONObject.put(REFRESH_TOKEN_KEY, persistedInstallationEntry.getRefreshToken());
|
||||
jSONObject.put(TOKEN_CREATION_TIME_IN_SECONDS_KEY, persistedInstallationEntry.getTokenCreationEpochInSecs());
|
||||
jSONObject.put(EXPIRES_IN_SECONDS_KEY, persistedInstallationEntry.getExpiresInSecs());
|
||||
jSONObject.put(FIS_ERROR_KEY, persistedInstallationEntry.getFisError());
|
||||
createTempFile = File.createTempFile(SETTINGS_FILE_NAME_PREFIX, "tmp", this.firebaseApp.getApplicationContext().getFilesDir());
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);
|
||||
fileOutputStream.write(jSONObject.toString().getBytes("UTF-8"));
|
||||
fileOutputStream.close();
|
||||
} catch (IOException | JSONException unused) {
|
||||
}
|
||||
if (createTempFile.renameTo(getDataFile())) {
|
||||
return persistedInstallationEntry;
|
||||
}
|
||||
throw new IOException("unable to rename the tmpfile to PersistedInstallation");
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry readPersistedInstallationEntryValue() {
|
||||
JSONObject readJSONFromFile = readJSONFromFile();
|
||||
String optString = readJSONFromFile.optString(FIREBASE_INSTALLATION_ID_KEY, null);
|
||||
int optInt = readJSONFromFile.optInt(PERSISTED_STATUS_KEY, RegistrationStatus.ATTEMPT_MIGRATION.ordinal());
|
||||
String optString2 = readJSONFromFile.optString(AUTH_TOKEN_KEY, null);
|
||||
String optString3 = readJSONFromFile.optString(REFRESH_TOKEN_KEY, null);
|
||||
long optLong = readJSONFromFile.optLong(TOKEN_CREATION_TIME_IN_SECONDS_KEY, 0L);
|
||||
long optLong2 = readJSONFromFile.optLong(EXPIRES_IN_SECONDS_KEY, 0L);
|
||||
return PersistedInstallationEntry.builder().setFirebaseInstallationId(optString).setRegistrationStatus(RegistrationStatus.values()[optInt]).setAuthToken(optString2).setRefreshToken(optString3).setTokenCreationEpochInSecs(optLong).setExpiresInSecs(optLong2).setFisError(readJSONFromFile.optString(FIS_ERROR_KEY, null)).build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.google.firebase.installations.local;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.firebase.installations.local.AutoValue_PersistedInstallationEntry;
|
||||
import com.google.firebase.installations.local.PersistedInstallation;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class PersistedInstallationEntry {
|
||||
public static PersistedInstallationEntry INSTANCE = builder().build();
|
||||
|
||||
@AutoValue.Builder
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder {
|
||||
public abstract PersistedInstallationEntry build();
|
||||
|
||||
public abstract Builder setAuthToken(String str);
|
||||
|
||||
public abstract Builder setExpiresInSecs(long j4);
|
||||
|
||||
public abstract Builder setFirebaseInstallationId(String str);
|
||||
|
||||
public abstract Builder setFisError(String str);
|
||||
|
||||
public abstract Builder setRefreshToken(String str);
|
||||
|
||||
public abstract Builder setRegistrationStatus(PersistedInstallation.RegistrationStatus registrationStatus);
|
||||
|
||||
public abstract Builder setTokenCreationEpochInSecs(long j4);
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new AutoValue_PersistedInstallationEntry.Builder().setTokenCreationEpochInSecs(0L).setRegistrationStatus(PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION).setExpiresInSecs(0L);
|
||||
}
|
||||
|
||||
public abstract String getAuthToken();
|
||||
|
||||
public abstract long getExpiresInSecs();
|
||||
|
||||
public abstract String getFirebaseInstallationId();
|
||||
|
||||
public abstract String getFisError();
|
||||
|
||||
public abstract String getRefreshToken();
|
||||
|
||||
public abstract PersistedInstallation.RegistrationStatus getRegistrationStatus();
|
||||
|
||||
public abstract long getTokenCreationEpochInSecs();
|
||||
|
||||
public boolean isErrored() {
|
||||
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.REGISTER_ERROR;
|
||||
}
|
||||
|
||||
public boolean isNotGenerated() {
|
||||
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.NOT_GENERATED || getRegistrationStatus() == PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION;
|
||||
}
|
||||
|
||||
public boolean isRegistered() {
|
||||
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.REGISTERED;
|
||||
}
|
||||
|
||||
public boolean isUnregistered() {
|
||||
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.UNREGISTERED;
|
||||
}
|
||||
|
||||
public boolean shouldAttemptMigration() {
|
||||
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION;
|
||||
}
|
||||
|
||||
public abstract Builder toBuilder();
|
||||
|
||||
public PersistedInstallationEntry withAuthToken(String str, long j4, long j5) {
|
||||
return toBuilder().setAuthToken(str).setExpiresInSecs(j4).setTokenCreationEpochInSecs(j5).build();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry withClearedAuthToken() {
|
||||
return toBuilder().setAuthToken(null).build();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry withFisError(String str) {
|
||||
return toBuilder().setFisError(str).setRegistrationStatus(PersistedInstallation.RegistrationStatus.REGISTER_ERROR).build();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry withNoGeneratedFid() {
|
||||
return toBuilder().setRegistrationStatus(PersistedInstallation.RegistrationStatus.NOT_GENERATED).build();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry withRegisteredFid(String str, String str2, long j4, String str3, long j5) {
|
||||
return toBuilder().setFirebaseInstallationId(str).setRegistrationStatus(PersistedInstallation.RegistrationStatus.REGISTERED).setAuthToken(str3).setRefreshToken(str2).setExpiresInSecs(j5).setTokenCreationEpochInSecs(j4).build();
|
||||
}
|
||||
|
||||
public PersistedInstallationEntry withUnregisteredFid(String str) {
|
||||
return toBuilder().setFirebaseInstallationId(str).setRegistrationStatus(PersistedInstallation.RegistrationStatus.UNREGISTERED).build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import com.google.firebase.installations.remote.InstallationResponse;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_InstallationResponse extends InstallationResponse {
|
||||
private final TokenResult authToken;
|
||||
private final String fid;
|
||||
private final String refreshToken;
|
||||
private final InstallationResponse.ResponseCode responseCode;
|
||||
private final String uri;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder extends InstallationResponse.Builder {
|
||||
private TokenResult authToken;
|
||||
private String fid;
|
||||
private String refreshToken;
|
||||
private InstallationResponse.ResponseCode responseCode;
|
||||
private String uri;
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse build() {
|
||||
return new AutoValue_InstallationResponse(this.uri, this.fid, this.refreshToken, this.authToken, this.responseCode);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse.Builder setAuthToken(TokenResult tokenResult) {
|
||||
this.authToken = tokenResult;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse.Builder setFid(String str) {
|
||||
this.fid = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse.Builder setRefreshToken(String str) {
|
||||
this.refreshToken = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse.Builder setResponseCode(InstallationResponse.ResponseCode responseCode) {
|
||||
this.responseCode = responseCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse.Builder
|
||||
public InstallationResponse.Builder setUri(String str) {
|
||||
this.uri = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
private Builder(InstallationResponse installationResponse) {
|
||||
this.uri = installationResponse.getUri();
|
||||
this.fid = installationResponse.getFid();
|
||||
this.refreshToken = installationResponse.getRefreshToken();
|
||||
this.authToken = installationResponse.getAuthToken();
|
||||
this.responseCode = installationResponse.getResponseCode();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof InstallationResponse) {
|
||||
InstallationResponse installationResponse = (InstallationResponse) obj;
|
||||
String str = this.uri;
|
||||
if (str != null ? str.equals(installationResponse.getUri()) : installationResponse.getUri() == null) {
|
||||
String str2 = this.fid;
|
||||
if (str2 != null ? str2.equals(installationResponse.getFid()) : installationResponse.getFid() == null) {
|
||||
String str3 = this.refreshToken;
|
||||
if (str3 != null ? str3.equals(installationResponse.getRefreshToken()) : installationResponse.getRefreshToken() == null) {
|
||||
TokenResult tokenResult = this.authToken;
|
||||
if (tokenResult != null ? tokenResult.equals(installationResponse.getAuthToken()) : installationResponse.getAuthToken() == null) {
|
||||
InstallationResponse.ResponseCode responseCode = this.responseCode;
|
||||
if (responseCode != null ? responseCode.equals(installationResponse.getResponseCode()) : installationResponse.getResponseCode() == null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public TokenResult getAuthToken() {
|
||||
return this.authToken;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public String getFid() {
|
||||
return this.fid;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public String getRefreshToken() {
|
||||
return this.refreshToken;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public InstallationResponse.ResponseCode getResponseCode() {
|
||||
return this.responseCode;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public String getUri() {
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
String str = this.uri;
|
||||
int hashCode = ((str == null ? 0 : str.hashCode()) ^ 1000003) * 1000003;
|
||||
String str2 = this.fid;
|
||||
int hashCode2 = (hashCode ^ (str2 == null ? 0 : str2.hashCode())) * 1000003;
|
||||
String str3 = this.refreshToken;
|
||||
int hashCode3 = (hashCode2 ^ (str3 == null ? 0 : str3.hashCode())) * 1000003;
|
||||
TokenResult tokenResult = this.authToken;
|
||||
int hashCode4 = (hashCode3 ^ (tokenResult == null ? 0 : tokenResult.hashCode())) * 1000003;
|
||||
InstallationResponse.ResponseCode responseCode = this.responseCode;
|
||||
return hashCode4 ^ (responseCode != null ? responseCode.hashCode() : 0);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.InstallationResponse
|
||||
public InstallationResponse.Builder toBuilder() {
|
||||
return new Builder(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "InstallationResponse{uri=" + this.uri + ", fid=" + this.fid + ", refreshToken=" + this.refreshToken + ", authToken=" + this.authToken + ", responseCode=" + this.responseCode + "}";
|
||||
}
|
||||
|
||||
private AutoValue_InstallationResponse(String str, String str2, String str3, TokenResult tokenResult, InstallationResponse.ResponseCode responseCode) {
|
||||
this.uri = str;
|
||||
this.fid = str2;
|
||||
this.refreshToken = str3;
|
||||
this.authToken = tokenResult;
|
||||
this.responseCode = responseCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import com.google.firebase.installations.remote.TokenResult;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class AutoValue_TokenResult extends TokenResult {
|
||||
private final TokenResult.ResponseCode responseCode;
|
||||
private final String token;
|
||||
private final long tokenExpirationTimestamp;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder extends TokenResult.Builder {
|
||||
private TokenResult.ResponseCode responseCode;
|
||||
private String token;
|
||||
private Long tokenExpirationTimestamp;
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult.Builder
|
||||
public TokenResult build() {
|
||||
String str = this.tokenExpirationTimestamp == null ? " tokenExpirationTimestamp" : "";
|
||||
if (str.isEmpty()) {
|
||||
return new AutoValue_TokenResult(this.token, this.tokenExpirationTimestamp.longValue(), this.responseCode);
|
||||
}
|
||||
throw new IllegalStateException("Missing required properties:".concat(str));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult.Builder
|
||||
public TokenResult.Builder setResponseCode(TokenResult.ResponseCode responseCode) {
|
||||
this.responseCode = responseCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult.Builder
|
||||
public TokenResult.Builder setToken(String str) {
|
||||
this.token = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult.Builder
|
||||
public TokenResult.Builder setTokenExpirationTimestamp(long j4) {
|
||||
this.tokenExpirationTimestamp = Long.valueOf(j4);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
private Builder(TokenResult tokenResult) {
|
||||
this.token = tokenResult.getToken();
|
||||
this.tokenExpirationTimestamp = Long.valueOf(tokenResult.getTokenExpirationTimestamp());
|
||||
this.responseCode = tokenResult.getResponseCode();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
TokenResult.ResponseCode responseCode;
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof TokenResult) {
|
||||
TokenResult tokenResult = (TokenResult) obj;
|
||||
String str = this.token;
|
||||
if (str != null ? str.equals(tokenResult.getToken()) : tokenResult.getToken() == null) {
|
||||
if (this.tokenExpirationTimestamp == tokenResult.getTokenExpirationTimestamp() && ((responseCode = this.responseCode) != null ? responseCode.equals(tokenResult.getResponseCode()) : tokenResult.getResponseCode() == null)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult
|
||||
public TokenResult.ResponseCode getResponseCode() {
|
||||
return this.responseCode;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult
|
||||
public String getToken() {
|
||||
return this.token;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult
|
||||
public long getTokenExpirationTimestamp() {
|
||||
return this.tokenExpirationTimestamp;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
String str = this.token;
|
||||
int hashCode = str == null ? 0 : str.hashCode();
|
||||
long j4 = this.tokenExpirationTimestamp;
|
||||
int i = (((hashCode ^ 1000003) * 1000003) ^ ((int) (j4 ^ (j4 >>> 32)))) * 1000003;
|
||||
TokenResult.ResponseCode responseCode = this.responseCode;
|
||||
return i ^ (responseCode != null ? responseCode.hashCode() : 0);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.remote.TokenResult
|
||||
public TokenResult.Builder toBuilder() {
|
||||
return new Builder(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "TokenResult{token=" + this.token + ", tokenExpirationTimestamp=" + this.tokenExpirationTimestamp + ", responseCode=" + this.responseCode + "}";
|
||||
}
|
||||
|
||||
private AutoValue_TokenResult(String str, long j4, TokenResult.ResponseCode responseCode) {
|
||||
this.token = str;
|
||||
this.tokenExpirationTimestamp = j4;
|
||||
this.responseCode = responseCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,443 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import C.w;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.TrafficStats;
|
||||
import android.text.TextUtils;
|
||||
import android.util.JsonReader;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.AndroidUtilsLight;
|
||||
import com.google.android.gms.common.util.Hex;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.heartbeatinfo.HeartBeatController;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import com.google.firebase.installations.FirebaseInstallationsException;
|
||||
import com.google.firebase.installations.remote.InstallationResponse;
|
||||
import com.google.firebase.installations.remote.TokenResult;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseInstallationServiceClient {
|
||||
private static final String ACCEPT_HEADER_KEY = "Accept";
|
||||
private static final String API_KEY_HEADER = "x-goog-api-key";
|
||||
private static final String CACHE_CONTROL_DIRECTIVE = "no-cache";
|
||||
private static final String CACHE_CONTROL_HEADER_KEY = "Cache-Control";
|
||||
private static final String CONTENT_ENCODING_HEADER_KEY = "Content-Encoding";
|
||||
private static final String CONTENT_TYPE_HEADER_KEY = "Content-Type";
|
||||
private static final String CREATE_REQUEST_RESOURCE_NAME_FORMAT = "projects/%s/installations";
|
||||
private static final String DELETE_REQUEST_RESOURCE_NAME_FORMAT = "projects/%s/installations/%s";
|
||||
private static final String FIREBASE_INSTALLATIONS_API_DOMAIN = "firebaseinstallations.googleapis.com";
|
||||
private static final String FIREBASE_INSTALLATIONS_API_VERSION = "v1";
|
||||
private static final String FIREBASE_INSTALLATIONS_ID_HEARTBEAT_TAG = "fire-installations-id";
|
||||
private static final String FIREBASE_INSTALLATION_AUTH_VERSION = "FIS_v2";
|
||||
private static final String FIS_TAG = "Firebase-Installations";
|
||||
private static final String GENERATE_AUTH_TOKEN_REQUEST_RESOURCE_NAME_FORMAT = "projects/%s/installations/%s/authTokens:generate";
|
||||
private static final String GZIP_CONTENT_ENCODING = "gzip";
|
||||
private static final String HEART_BEAT_HEADER = "x-firebase-client";
|
||||
private static final String JSON_CONTENT_TYPE = "application/json";
|
||||
private static final int MAX_RETRIES = 1;
|
||||
private static final int NETWORK_TIMEOUT_MILLIS = 10000;
|
||||
|
||||
@VisibleForTesting
|
||||
static final String PARSING_EXPIRATION_TIME_ERROR_MESSAGE = "Invalid Expiration Timestamp.";
|
||||
private static final String SDK_VERSION_PREFIX = "a:";
|
||||
private static final int TRAFFIC_STATS_CREATE_INSTALLATION_TAG = 32769;
|
||||
private static final int TRAFFIC_STATS_DELETE_INSTALLATION_TAG = 32770;
|
||||
private static final int TRAFFIC_STATS_FIREBASE_INSTALLATIONS_TAG = 32768;
|
||||
private static final int TRAFFIC_STATS_GENERATE_AUTH_TOKEN_TAG = 32771;
|
||||
private static final String X_ANDROID_CERT_HEADER_KEY = "X-Android-Cert";
|
||||
private static final String X_ANDROID_IID_MIGRATION_KEY = "x-goog-fis-android-iid-migration-auth";
|
||||
private static final String X_ANDROID_PACKAGE_HEADER_KEY = "X-Android-Package";
|
||||
private final Context context;
|
||||
private final Provider<HeartBeatController> heartBeatProvider;
|
||||
private final RequestLimiter requestLimiter = new RequestLimiter();
|
||||
private boolean shouldServerErrorRetry;
|
||||
private static final Pattern EXPIRATION_TIMESTAMP_PATTERN = Pattern.compile("[0-9]+s");
|
||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
||||
|
||||
public FirebaseInstallationServiceClient(Context context, Provider<HeartBeatController> provider) {
|
||||
this.context = context;
|
||||
this.heartBeatProvider = provider;
|
||||
}
|
||||
|
||||
private static String availableFirebaseOptions(String str, String str2, String str3) {
|
||||
return "Firebase options used while communicating with Firebase server APIs: " + str2 + ", " + str3 + (TextUtils.isEmpty(str) ? "" : w.z(", ", str));
|
||||
}
|
||||
|
||||
private static JSONObject buildCreateFirebaseInstallationRequestBody(String str, String str2) {
|
||||
try {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
jSONObject.put("fid", str);
|
||||
jSONObject.put(RemoteConfigConstants.RequestFieldKey.APP_ID, str2);
|
||||
jSONObject.put("authVersion", FIREBASE_INSTALLATION_AUTH_VERSION);
|
||||
jSONObject.put(RemoteConfigConstants.RequestFieldKey.SDK_VERSION, "a:17.2.0");
|
||||
return jSONObject;
|
||||
} catch (JSONException e4) {
|
||||
throw new IllegalStateException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
private static JSONObject buildGenerateAuthTokenRequestBody() {
|
||||
try {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
jSONObject.put(RemoteConfigConstants.RequestFieldKey.SDK_VERSION, "a:17.2.0");
|
||||
JSONObject jSONObject2 = new JSONObject();
|
||||
jSONObject2.put("installation", jSONObject);
|
||||
return jSONObject2;
|
||||
} catch (JSONException e4) {
|
||||
throw new IllegalStateException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
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("ContentValues", "Could not get fingerprint hash for package: " + this.context.getPackageName());
|
||||
return null;
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
Log.e("ContentValues", "No such package: " + this.context.getPackageName(), e4);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private URL getFullyQualifiedRequestUri(String str) throws FirebaseInstallationsException {
|
||||
try {
|
||||
return new URL("https://firebaseinstallations.googleapis.com/v1/" + str);
|
||||
} catch (MalformedURLException e4) {
|
||||
throw new FirebaseInstallationsException(e4.getMessage(), FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] getJsonBytes(JSONObject jSONObject) throws IOException {
|
||||
return jSONObject.toString().getBytes("UTF-8");
|
||||
}
|
||||
|
||||
private static boolean isSuccessfulResponseCode(int i) {
|
||||
return i >= 200 && i < 300;
|
||||
}
|
||||
|
||||
private static void logBadConfigError() {
|
||||
Log.e(FIS_TAG, "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
|
||||
}
|
||||
|
||||
private static void logFisCommunicationError(HttpURLConnection httpURLConnection, String str, String str2, String str3) {
|
||||
String readErrorResponse = readErrorResponse(httpURLConnection);
|
||||
if (TextUtils.isEmpty(readErrorResponse)) {
|
||||
return;
|
||||
}
|
||||
Log.w(FIS_TAG, readErrorResponse);
|
||||
Log.w(FIS_TAG, availableFirebaseOptions(str, str2, str3));
|
||||
}
|
||||
|
||||
private HttpURLConnection openHttpURLConnection(URL url, String str) throws FirebaseInstallationsException {
|
||||
try {
|
||||
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
|
||||
httpURLConnection.setConnectTimeout(NETWORK_TIMEOUT_MILLIS);
|
||||
httpURLConnection.setUseCaches(false);
|
||||
httpURLConnection.setReadTimeout(NETWORK_TIMEOUT_MILLIS);
|
||||
httpURLConnection.addRequestProperty(CONTENT_TYPE_HEADER_KEY, JSON_CONTENT_TYPE);
|
||||
httpURLConnection.addRequestProperty(ACCEPT_HEADER_KEY, JSON_CONTENT_TYPE);
|
||||
httpURLConnection.addRequestProperty(CONTENT_ENCODING_HEADER_KEY, GZIP_CONTENT_ENCODING);
|
||||
httpURLConnection.addRequestProperty(CACHE_CONTROL_HEADER_KEY, CACHE_CONTROL_DIRECTIVE);
|
||||
httpURLConnection.addRequestProperty(X_ANDROID_PACKAGE_HEADER_KEY, this.context.getPackageName());
|
||||
HeartBeatController heartBeatController = this.heartBeatProvider.get();
|
||||
if (heartBeatController != null) {
|
||||
try {
|
||||
httpURLConnection.addRequestProperty(HEART_BEAT_HEADER, (String) Tasks.await(heartBeatController.getHeartBeatsHeader()));
|
||||
} catch (InterruptedException e4) {
|
||||
Thread.currentThread().interrupt();
|
||||
Log.w("ContentValues", "Failed to get heartbeats header", e4);
|
||||
} catch (ExecutionException e5) {
|
||||
Log.w("ContentValues", "Failed to get heartbeats header", e5);
|
||||
}
|
||||
}
|
||||
httpURLConnection.addRequestProperty(X_ANDROID_CERT_HEADER_KEY, getFingerprintHashForPackage());
|
||||
httpURLConnection.addRequestProperty(API_KEY_HEADER, str);
|
||||
return httpURLConnection;
|
||||
} catch (IOException unused) {
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public static long parseTokenExpirationTimestamp(String str) {
|
||||
Preconditions.checkArgument(EXPIRATION_TIMESTAMP_PATTERN.matcher(str).matches(), PARSING_EXPIRATION_TIME_ERROR_MESSAGE);
|
||||
if (str == null || str.length() == 0) {
|
||||
return 0L;
|
||||
}
|
||||
return Long.parseLong(str.substring(0, str.length() - 1));
|
||||
}
|
||||
|
||||
private InstallationResponse readCreateResponse(HttpURLConnection httpURLConnection) throws AssertionError, IOException {
|
||||
InputStream inputStream = httpURLConnection.getInputStream();
|
||||
JsonReader jsonReader = new JsonReader(new InputStreamReader(inputStream, UTF_8));
|
||||
TokenResult.Builder builder = TokenResult.builder();
|
||||
InstallationResponse.Builder builder2 = InstallationResponse.builder();
|
||||
jsonReader.beginObject();
|
||||
while (jsonReader.hasNext()) {
|
||||
String nextName = jsonReader.nextName();
|
||||
if (nextName.equals(AppMeasurementSdk.ConditionalUserProperty.NAME)) {
|
||||
builder2.setUri(jsonReader.nextString());
|
||||
} else if (nextName.equals("fid")) {
|
||||
builder2.setFid(jsonReader.nextString());
|
||||
} else if (nextName.equals("refreshToken")) {
|
||||
builder2.setRefreshToken(jsonReader.nextString());
|
||||
} else if (nextName.equals("authToken")) {
|
||||
jsonReader.beginObject();
|
||||
while (jsonReader.hasNext()) {
|
||||
String nextName2 = jsonReader.nextName();
|
||||
if (nextName2.equals("token")) {
|
||||
builder.setToken(jsonReader.nextString());
|
||||
} else if (nextName2.equals("expiresIn")) {
|
||||
builder.setTokenExpirationTimestamp(parseTokenExpirationTimestamp(jsonReader.nextString()));
|
||||
} else {
|
||||
jsonReader.skipValue();
|
||||
}
|
||||
}
|
||||
builder2.setAuthToken(builder.build());
|
||||
jsonReader.endObject();
|
||||
} else {
|
||||
jsonReader.skipValue();
|
||||
}
|
||||
}
|
||||
jsonReader.endObject();
|
||||
jsonReader.close();
|
||||
inputStream.close();
|
||||
return builder2.setResponseCode(InstallationResponse.ResponseCode.OK).build();
|
||||
}
|
||||
|
||||
private static String readErrorResponse(HttpURLConnection httpURLConnection) {
|
||||
InputStream errorStream = httpURLConnection.getErrorStream();
|
||||
if (errorStream == null) {
|
||||
return null;
|
||||
}
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(errorStream, UTF_8));
|
||||
try {
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine == null) {
|
||||
break;
|
||||
}
|
||||
sb.append(readLine);
|
||||
sb.append('\n');
|
||||
}
|
||||
String format = String.format("Error when communicating with the Firebase Installations server API. HTTP response: [%d %s: %s]", Integer.valueOf(httpURLConnection.getResponseCode()), httpURLConnection.getResponseMessage(), sb);
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
return format;
|
||||
} catch (IOException unused2) {
|
||||
return null;
|
||||
}
|
||||
} catch (IOException unused3) {
|
||||
bufferedReader.close();
|
||||
return null;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (IOException unused4) {
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
private TokenResult readGenerateAuthTokenResponse(HttpURLConnection httpURLConnection) throws AssertionError, IOException {
|
||||
InputStream inputStream = httpURLConnection.getInputStream();
|
||||
JsonReader jsonReader = new JsonReader(new InputStreamReader(inputStream, UTF_8));
|
||||
TokenResult.Builder builder = TokenResult.builder();
|
||||
jsonReader.beginObject();
|
||||
while (jsonReader.hasNext()) {
|
||||
String nextName = jsonReader.nextName();
|
||||
if (nextName.equals("token")) {
|
||||
builder.setToken(jsonReader.nextString());
|
||||
} else if (nextName.equals("expiresIn")) {
|
||||
builder.setTokenExpirationTimestamp(parseTokenExpirationTimestamp(jsonReader.nextString()));
|
||||
} else {
|
||||
jsonReader.skipValue();
|
||||
}
|
||||
}
|
||||
jsonReader.endObject();
|
||||
jsonReader.close();
|
||||
inputStream.close();
|
||||
return builder.setResponseCode(TokenResult.ResponseCode.OK).build();
|
||||
}
|
||||
|
||||
private void writeFIDCreateRequestBodyToOutputStream(HttpURLConnection httpURLConnection, String str, String str2) throws IOException {
|
||||
writeRequestBodyToOutputStream(httpURLConnection, getJsonBytes(buildCreateFirebaseInstallationRequestBody(str, str2)));
|
||||
}
|
||||
|
||||
private void writeGenerateAuthTokenRequestBodyToOutputStream(HttpURLConnection httpURLConnection) throws IOException {
|
||||
writeRequestBodyToOutputStream(httpURLConnection, getJsonBytes(buildGenerateAuthTokenRequestBody()));
|
||||
}
|
||||
|
||||
private static void writeRequestBodyToOutputStream(URLConnection uRLConnection, byte[] bArr) throws IOException {
|
||||
OutputStream outputStream = uRLConnection.getOutputStream();
|
||||
if (outputStream == null) {
|
||||
throw new IOException("Cannot send request to FIS servers. No OutputStream available.");
|
||||
}
|
||||
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(outputStream);
|
||||
try {
|
||||
gZIPOutputStream.write(bArr);
|
||||
} finally {
|
||||
try {
|
||||
gZIPOutputStream.close();
|
||||
outputStream.close();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public InstallationResponse createFirebaseInstallation(String str, String str2, String str3, String str4, String str5) throws FirebaseInstallationsException {
|
||||
int responseCode;
|
||||
InstallationResponse readCreateResponse;
|
||||
if (!this.requestLimiter.isRequestAllowed()) {
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
URL fullyQualifiedRequestUri = getFullyQualifiedRequestUri(w.o("projects/", str3, "/installations"));
|
||||
for (int i = 0; i <= 1; i++) {
|
||||
TrafficStats.setThreadStatsTag(TRAFFIC_STATS_CREATE_INSTALLATION_TAG);
|
||||
HttpURLConnection openHttpURLConnection = openHttpURLConnection(fullyQualifiedRequestUri, str);
|
||||
try {
|
||||
try {
|
||||
openHttpURLConnection.setRequestMethod("POST");
|
||||
openHttpURLConnection.setDoOutput(true);
|
||||
if (str5 != null) {
|
||||
openHttpURLConnection.addRequestProperty(X_ANDROID_IID_MIGRATION_KEY, str5);
|
||||
}
|
||||
writeFIDCreateRequestBodyToOutputStream(openHttpURLConnection, str2, str4);
|
||||
responseCode = openHttpURLConnection.getResponseCode();
|
||||
this.requestLimiter.setNextRequestTime(responseCode);
|
||||
} catch (Throwable th) {
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
throw th;
|
||||
}
|
||||
} catch (IOException | AssertionError unused) {
|
||||
}
|
||||
if (isSuccessfulResponseCode(responseCode)) {
|
||||
readCreateResponse = readCreateResponse(openHttpURLConnection);
|
||||
} else {
|
||||
logFisCommunicationError(openHttpURLConnection, str4, str, str3);
|
||||
if (responseCode == 429) {
|
||||
throw new FirebaseInstallationsException("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", FirebaseInstallationsException.Status.TOO_MANY_REQUESTS);
|
||||
}
|
||||
if (responseCode < 500 || responseCode >= 600) {
|
||||
logBadConfigError();
|
||||
readCreateResponse = InstallationResponse.builder().setResponseCode(InstallationResponse.ResponseCode.BAD_CONFIG).build();
|
||||
}
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
}
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
return readCreateResponse;
|
||||
}
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
|
||||
public void deleteFirebaseInstallation(String str, String str2, String str3, String str4) throws FirebaseInstallationsException {
|
||||
int responseCode;
|
||||
URL fullyQualifiedRequestUri = getFullyQualifiedRequestUri("projects/" + str3 + "/installations/" + str2);
|
||||
int i = 0;
|
||||
while (i <= 1) {
|
||||
TrafficStats.setThreadStatsTag(TRAFFIC_STATS_DELETE_INSTALLATION_TAG);
|
||||
HttpURLConnection openHttpURLConnection = openHttpURLConnection(fullyQualifiedRequestUri, str);
|
||||
try {
|
||||
openHttpURLConnection.setRequestMethod("DELETE");
|
||||
openHttpURLConnection.addRequestProperty("Authorization", "FIS_v2 " + str4);
|
||||
responseCode = openHttpURLConnection.getResponseCode();
|
||||
} catch (IOException unused) {
|
||||
} catch (Throwable th) {
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
throw th;
|
||||
}
|
||||
if (responseCode != 200 && responseCode != 401 && responseCode != 404) {
|
||||
logFisCommunicationError(openHttpURLConnection, null, str, str3);
|
||||
if (responseCode != 429 && (responseCode < 500 || responseCode >= 600)) {
|
||||
logBadConfigError();
|
||||
throw new FirebaseInstallationsException("Bad config while trying to delete FID", FirebaseInstallationsException.Status.BAD_CONFIG);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
}
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
return;
|
||||
}
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
|
||||
public TokenResult generateAuthToken(String str, String str2, String str3, String str4) throws FirebaseInstallationsException {
|
||||
int responseCode;
|
||||
TokenResult readGenerateAuthTokenResponse;
|
||||
if (!this.requestLimiter.isRequestAllowed()) {
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
URL fullyQualifiedRequestUri = getFullyQualifiedRequestUri("projects/" + str3 + "/installations/" + str2 + "/authTokens:generate");
|
||||
for (int i = 0; i <= 1; i++) {
|
||||
TrafficStats.setThreadStatsTag(TRAFFIC_STATS_GENERATE_AUTH_TOKEN_TAG);
|
||||
HttpURLConnection openHttpURLConnection = openHttpURLConnection(fullyQualifiedRequestUri, str);
|
||||
try {
|
||||
try {
|
||||
openHttpURLConnection.setRequestMethod("POST");
|
||||
openHttpURLConnection.addRequestProperty("Authorization", "FIS_v2 " + str4);
|
||||
openHttpURLConnection.setDoOutput(true);
|
||||
writeGenerateAuthTokenRequestBodyToOutputStream(openHttpURLConnection);
|
||||
responseCode = openHttpURLConnection.getResponseCode();
|
||||
this.requestLimiter.setNextRequestTime(responseCode);
|
||||
} finally {
|
||||
openHttpURLConnection.disconnect();
|
||||
TrafficStats.clearThreadStatsTag();
|
||||
}
|
||||
} catch (IOException | AssertionError unused) {
|
||||
}
|
||||
if (isSuccessfulResponseCode(responseCode)) {
|
||||
readGenerateAuthTokenResponse = readGenerateAuthTokenResponse(openHttpURLConnection);
|
||||
} else {
|
||||
logFisCommunicationError(openHttpURLConnection, null, str, str3);
|
||||
if (responseCode == 401 || responseCode == 404) {
|
||||
readGenerateAuthTokenResponse = TokenResult.builder().setResponseCode(TokenResult.ResponseCode.AUTH_ERROR).build();
|
||||
} else {
|
||||
if (responseCode == 429) {
|
||||
throw new FirebaseInstallationsException("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", FirebaseInstallationsException.Status.TOO_MANY_REQUESTS);
|
||||
}
|
||||
if (responseCode < 500 || responseCode >= 600) {
|
||||
logBadConfigError();
|
||||
readGenerateAuthTokenResponse = TokenResult.builder().setResponseCode(TokenResult.ResponseCode.BAD_CONFIG).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return readGenerateAuthTokenResponse;
|
||||
}
|
||||
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.firebase.installations.remote.AutoValue_InstallationResponse;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class InstallationResponse {
|
||||
|
||||
@AutoValue.Builder
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder {
|
||||
public abstract InstallationResponse build();
|
||||
|
||||
public abstract Builder setAuthToken(TokenResult tokenResult);
|
||||
|
||||
public abstract Builder setFid(String str);
|
||||
|
||||
public abstract Builder setRefreshToken(String str);
|
||||
|
||||
public abstract Builder setResponseCode(ResponseCode responseCode);
|
||||
|
||||
public abstract Builder setUri(String str);
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum ResponseCode {
|
||||
OK,
|
||||
BAD_CONFIG
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new AutoValue_InstallationResponse.Builder();
|
||||
}
|
||||
|
||||
public abstract TokenResult getAuthToken();
|
||||
|
||||
public abstract String getFid();
|
||||
|
||||
public abstract String getRefreshToken();
|
||||
|
||||
public abstract ResponseCode getResponseCode();
|
||||
|
||||
public abstract String getUri();
|
||||
|
||||
public abstract Builder toBuilder();
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import com.google.firebase.installations.Utils;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
class RequestLimiter {
|
||||
private static final long MAXIMUM_BACKOFF_DURATION_FOR_CONFIGURATION_ERRORS = TimeUnit.HOURS.toMillis(24);
|
||||
private static final long MAXIMUM_BACKOFF_DURATION_FOR_SERVER_ERRORS = TimeUnit.MINUTES.toMillis(30);
|
||||
private int attemptCount;
|
||||
private long nextRequestTime;
|
||||
private final Utils utils;
|
||||
|
||||
public RequestLimiter(Utils utils) {
|
||||
this.utils = utils;
|
||||
}
|
||||
|
||||
private synchronized long getBackoffDuration(int i) {
|
||||
if (isRetryableError(i)) {
|
||||
return (long) Math.min(Math.pow(2.0d, this.attemptCount) + this.utils.getRandomDelayForSyncPrevention(), MAXIMUM_BACKOFF_DURATION_FOR_SERVER_ERRORS);
|
||||
}
|
||||
return MAXIMUM_BACKOFF_DURATION_FOR_CONFIGURATION_ERRORS;
|
||||
}
|
||||
|
||||
private static boolean isRetryableError(int i) {
|
||||
if (i != 429) {
|
||||
return i >= 500 && i < 600;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isSuccessfulOrRequiresNewFidCreation(int i) {
|
||||
return (i >= 200 && i < 300) || i == 401 || i == 404;
|
||||
}
|
||||
|
||||
private synchronized void resetBackoffStrategy() {
|
||||
this.attemptCount = 0;
|
||||
}
|
||||
|
||||
public synchronized boolean isRequestAllowed() {
|
||||
boolean z3;
|
||||
if (this.attemptCount != 0) {
|
||||
z3 = this.utils.currentTimeInMillis() > this.nextRequestTime;
|
||||
}
|
||||
return z3;
|
||||
}
|
||||
|
||||
public synchronized void setNextRequestTime(int i) {
|
||||
if (isSuccessfulOrRequiresNewFidCreation(i)) {
|
||||
resetBackoffStrategy();
|
||||
return;
|
||||
}
|
||||
this.attemptCount++;
|
||||
this.nextRequestTime = this.utils.currentTimeInMillis() + getBackoffDuration(i);
|
||||
}
|
||||
|
||||
public RequestLimiter() {
|
||||
this.utils = Utils.getInstance();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.firebase.installations.remote;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.firebase.installations.remote.AutoValue_TokenResult;
|
||||
|
||||
@AutoValue
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class TokenResult {
|
||||
|
||||
@AutoValue.Builder
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder {
|
||||
public abstract TokenResult build();
|
||||
|
||||
public abstract Builder setResponseCode(ResponseCode responseCode);
|
||||
|
||||
public abstract Builder setToken(String str);
|
||||
|
||||
public abstract Builder setTokenExpirationTimestamp(long j4);
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum ResponseCode {
|
||||
OK,
|
||||
BAD_CONFIG,
|
||||
AUTH_ERROR
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new AutoValue_TokenResult.Builder().setTokenExpirationTimestamp(0L);
|
||||
}
|
||||
|
||||
public abstract ResponseCode getResponseCode();
|
||||
|
||||
public abstract String getToken();
|
||||
|
||||
public abstract long getTokenExpirationTimestamp();
|
||||
|
||||
public abstract Builder toBuilder();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.installations.time;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Clock {
|
||||
long currentTimeMillis();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.google.firebase.installations.time;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class SystemClock implements Clock {
|
||||
private static SystemClock singleton;
|
||||
|
||||
private SystemClock() {
|
||||
}
|
||||
|
||||
public static SystemClock getInstance() {
|
||||
if (singleton == null) {
|
||||
singleton = new SystemClock();
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.installations.time.Clock
|
||||
public long currentTimeMillis() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user