Add decompiled APK source code (JADX)

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

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

View File

@@ -0,0 +1,98 @@
package com.google.firebase.installations;
import com.google.firebase.installations.InstallationTokenResult;
/* loaded from: classes3.dex */
public final class AutoValue_InstallationTokenResult extends InstallationTokenResult {
public final String token;
public final long tokenCreationTimestamp;
public final long tokenExpirationTimestamp;
@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 AutoValue_InstallationTokenResult(String str, long j, long j2) {
this.token = str;
this.tokenExpirationTimestamp = j;
this.tokenCreationTimestamp = j2;
}
public String toString() {
return "InstallationTokenResult{token=" + this.token + ", tokenExpirationTimestamp=" + this.tokenExpirationTimestamp + ", tokenCreationTimestamp=" + this.tokenCreationTimestamp + "}";
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof InstallationTokenResult)) {
return false;
}
InstallationTokenResult installationTokenResult = (InstallationTokenResult) obj;
return this.token.equals(installationTokenResult.getToken()) && this.tokenExpirationTimestamp == installationTokenResult.getTokenExpirationTimestamp() && this.tokenCreationTimestamp == installationTokenResult.getTokenCreationTimestamp();
}
public int hashCode() {
int hashCode = (this.token.hashCode() ^ 1000003) * 1000003;
long j = this.tokenExpirationTimestamp;
long j2 = this.tokenCreationTimestamp;
return ((hashCode ^ ((int) (j ^ (j >>> 32)))) * 1000003) ^ ((int) (j2 ^ (j2 >>> 32)));
}
public static final class Builder extends InstallationTokenResult.Builder {
public String token;
public Long tokenCreationTimestamp;
public Long tokenExpirationTimestamp;
@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 setTokenExpirationTimestamp(long j) {
this.tokenExpirationTimestamp = Long.valueOf(j);
return this;
}
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
public InstallationTokenResult.Builder setTokenCreationTimestamp(long j) {
this.tokenCreationTimestamp = Long.valueOf(j);
return this;
}
@Override // com.google.firebase.installations.InstallationTokenResult.Builder
public InstallationTokenResult build() {
String str = "";
if (this.token == null) {
str = " token";
}
if (this.tokenExpirationTimestamp == null) {
str = str + " tokenExpirationTimestamp";
}
if (this.tokenCreationTimestamp == null) {
str = str + " tokenCreationTimestamp";
}
if (!str.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + str);
}
return new AutoValue_InstallationTokenResult(this.token, this.tokenExpirationTimestamp.longValue(), this.tokenCreationTimestamp.longValue());
}
}
}

View File

@@ -0,0 +1,93 @@
package com.google.firebase.installations;
import android.util.Log;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
/* loaded from: classes3.dex */
public class CrossProcessLock {
public final FileChannel channel;
public final FileLock lock;
public CrossProcessLock(FileChannel fileChannel, FileLock fileLock) {
this.channel = fileChannel;
this.lock = fileLock;
}
/* JADX WARN: Removed duplicated region for block: B:17:0x0042 A[EXC_TOP_SPLITTER, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:21:0x003d A[EXC_TOP_SPLITTER, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static com.google.firebase.installations.CrossProcessLock acquire(android.content.Context r4, java.lang.String r5) {
/*
r0 = 0
java.io.File r1 = new java.io.File // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
java.io.File r4 = r4.getFilesDir() // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
r1.<init>(r4, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
java.io.RandomAccessFile r4 = new java.io.RandomAccessFile // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
java.lang.String r5 = "rw"
r4.<init>(r1, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
java.nio.channels.FileChannel r4 = r4.getChannel() // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L30 java.io.IOException -> L32
java.nio.channels.FileLock r5 = r4.lock() // Catch: java.nio.channels.OverlappingFileLockException -> L25 java.lang.Error -> L28 java.io.IOException -> L2a
com.google.firebase.installations.CrossProcessLock r1 = new com.google.firebase.installations.CrossProcessLock // Catch: java.nio.channels.OverlappingFileLockException -> L1f java.lang.Error -> L21 java.io.IOException -> L23
r1.<init>(r4, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L1f java.lang.Error -> L21 java.io.IOException -> L23
return r1
L1f:
r1 = move-exception
goto L34
L21:
r1 = move-exception
goto L34
L23:
r1 = move-exception
goto L34
L25:
r1 = move-exception
L26:
r5 = r0
goto L34
L28:
r1 = move-exception
goto L26
L2a:
r1 = move-exception
goto L26
L2c:
r1 = move-exception
L2d:
r4 = r0
r5 = r4
goto L34
L30:
r1 = move-exception
goto L2d
L32:
r1 = move-exception
goto L2d
L34:
java.lang.String r2 = "CrossProcessLock"
java.lang.String r3 = "encountered error while creating and acquiring the lock, ignoring"
android.util.Log.e(r2, r3, r1)
if (r5 == 0) goto L40
r5.release() // Catch: java.io.IOException -> L40
L40:
if (r4 == 0) goto L45
r4.close() // Catch: java.io.IOException -> L45
L45:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.installations.CrossProcessLock.acquire(android.content.Context, java.lang.String):com.google.firebase.installations.CrossProcessLock");
}
public void releaseAndClose() {
try {
this.lock.release();
this.channel.close();
} catch (IOException e) {
Log.e("CrossProcessLock", "encountered error while releasing, ignoring", e);
}
}
}

View File

@@ -0,0 +1,439 @@
package com.google.firebase.installations;
import android.text.TextUtils;
import com.amazonaws.handlers.HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0;
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.inject.Provider;
import com.google.firebase.installations.FirebaseInstallationsException;
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 {
public final ExecutorService backgroundExecutor;
public String cachedFid;
public final RandomFidGenerator fidGenerator;
public Set fidListeners;
public final FirebaseApp firebaseApp;
public final Lazy iidStore;
public final List listeners;
public final Object lock;
public final Executor networkExecutor;
public final PersistedInstallation persistedInstallation;
public final FirebaseInstallationServiceClient serviceClient;
public final Utils utils;
public static final Object lockGenerateFid = new Object();
public static final ThreadFactory THREAD_FACTORY = new ThreadFactory() { // from class: com.google.firebase.installations.FirebaseInstallations.1
public final AtomicInteger mCount = new AtomicInteger(1);
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(Runnable runnable) {
return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.mCount.getAndIncrement())));
}
};
public FirebaseInstallations(final FirebaseApp firebaseApp, Provider provider, ExecutorService executorService, Executor executor) {
this(executorService, executor, firebaseApp, new FirebaseInstallationServiceClient(firebaseApp.getApplicationContext(), provider), new PersistedInstallation(firebaseApp), Utils.getInstance(), new Lazy(new Provider() { // from class: com.google.firebase.installations.FirebaseInstallations$$ExternalSyntheticLambda2
@Override // com.google.firebase.inject.Provider
public final Object get() {
IidStore lambda$new$0;
lambda$new$0 = FirebaseInstallations.lambda$new$0(FirebaseApp.this);
return lambda$new$0;
}
}), new RandomFidGenerator());
}
public static /* synthetic */ IidStore lambda$new$0(FirebaseApp firebaseApp) {
return new IidStore(firebaseApp);
}
public FirebaseInstallations(ExecutorService executorService, Executor executor, FirebaseApp firebaseApp, FirebaseInstallationServiceClient firebaseInstallationServiceClient, PersistedInstallation persistedInstallation, Utils utils, Lazy 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;
}
public final void preConditionChecks() {
Preconditions.checkNotEmpty(getApplicationId(), "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.");
Preconditions.checkNotEmpty(getProjectIdentifier(), "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.");
Preconditions.checkNotEmpty(getApiKey(), "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.");
Preconditions.checkArgument(Utils.isValidAppIdFormat(getApplicationId()), "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.");
Preconditions.checkArgument(Utils.isValidApiKeyFormat(getApiKey()), "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.");
}
public String getProjectIdentifier() {
return this.firebaseApp.getOptions().getProjectId();
}
public static FirebaseInstallations getInstance() {
return getInstance(FirebaseApp.getInstance());
}
public static FirebaseInstallations getInstance(FirebaseApp firebaseApp) {
Preconditions.checkArgument(firebaseApp != null, "Null is not a valid value of FirebaseApp.");
return (FirebaseInstallations) firebaseApp.get(FirebaseInstallationsApi.class);
}
public String getApplicationId() {
return this.firebaseApp.getOptions().getApplicationId();
}
public String getApiKey() {
return this.firebaseApp.getOptions().getApiKey();
}
@Override // com.google.firebase.installations.FirebaseInstallationsApi
public Task getId() {
preConditionChecks();
String cacheFid = getCacheFid();
if (cacheFid != null) {
return Tasks.forResult(cacheFid);
}
Task addGetIdListener = addGetIdListener();
this.backgroundExecutor.execute(new Runnable() { // from class: com.google.firebase.installations.FirebaseInstallations$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
FirebaseInstallations.this.lambda$getId$1();
}
});
return addGetIdListener;
}
public final /* synthetic */ void lambda$getId$1() {
lambda$getToken$2(false);
}
@Override // com.google.firebase.installations.FirebaseInstallationsApi
public Task getToken(final boolean z) {
preConditionChecks();
Task addGetAuthTokenListener = addGetAuthTokenListener();
this.backgroundExecutor.execute(new Runnable() { // from class: com.google.firebase.installations.FirebaseInstallations$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
FirebaseInstallations.this.lambda$getToken$2(z);
}
});
return addGetAuthTokenListener;
}
public final Task addGetIdListener() {
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
addStateListeners(new GetIdListener(taskCompletionSource));
return taskCompletionSource.getTask();
}
public final Task addGetAuthTokenListener() {
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
addStateListeners(new GetAuthTokenListener(this.utils, taskCompletionSource));
return taskCompletionSource.getTask();
}
public final void addStateListeners(StateListener stateListener) {
synchronized (this.lock) {
this.listeners.add(stateListener);
}
}
public final void triggerOnStateReached(PersistedInstallationEntry persistedInstallationEntry) {
synchronized (this.lock) {
try {
Iterator it = this.listeners.iterator();
while (it.hasNext()) {
if (((StateListener) it.next()).onStateReached(persistedInstallationEntry)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final void triggerOnException(Exception exc) {
synchronized (this.lock) {
try {
Iterator it = this.listeners.iterator();
while (it.hasNext()) {
if (((StateListener) it.next()).onException(exc)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final synchronized void updateCacheFid(String str) {
this.cachedFid = str;
}
public final synchronized String getCacheFid() {
return this.cachedFid;
}
/* renamed from: doRegistrationOrRefresh, reason: merged with bridge method [inline-methods] */
public final void lambda$getToken$2(final boolean z) {
PersistedInstallationEntry prefsWithGeneratedIdMultiProcessSafe = getPrefsWithGeneratedIdMultiProcessSafe();
if (z) {
prefsWithGeneratedIdMultiProcessSafe = prefsWithGeneratedIdMultiProcessSafe.withClearedAuthToken();
}
triggerOnStateReached(prefsWithGeneratedIdMultiProcessSafe);
this.networkExecutor.execute(new Runnable() { // from class: com.google.firebase.installations.FirebaseInstallations$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
FirebaseInstallations.this.lambda$doRegistrationOrRefresh$3(z);
}
});
}
public final IidStore getIidStore() {
return (IidStore) this.iidStore.get();
}
/* 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 final 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)
goto L60
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)
goto L60
L5d:
r2.triggerOnStateReached(r3)
L60:
return
L61:
r2.triggerOnException(r3)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$3(boolean):void");
}
public final synchronized void updateFidListener(PersistedInstallationEntry persistedInstallationEntry, PersistedInstallationEntry persistedInstallationEntry2) {
if (this.fidListeners.size() != 0 && !TextUtils.equals(persistedInstallationEntry.getFirebaseInstallationId(), persistedInstallationEntry2.getFirebaseInstallationId())) {
Iterator it = this.fidListeners.iterator();
if (it.hasNext()) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(it.next());
persistedInstallationEntry2.getFirebaseInstallationId();
throw null;
}
}
}
/* JADX WARN: Finally extract failed */
public final void insertOrUpdatePrefs(PersistedInstallationEntry persistedInstallationEntry) {
synchronized (lockGenerateFid) {
try {
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), "generatefid.lock");
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 WARN: Finally extract failed */
public final PersistedInstallationEntry getPrefsWithGeneratedIdMultiProcessSafe() {
PersistedInstallationEntry readPersistedInstallationEntryValue;
synchronized (lockGenerateFid) {
try {
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), "generatefid.lock");
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;
}
public final String readExistingIidOrCreateFid(PersistedInstallationEntry persistedInstallationEntry) {
if ((!this.firebaseApp.getName().equals("CHIME_ANDROID_SDK") && !this.firebaseApp.isDefaultApp()) || !persistedInstallationEntry.shouldAttemptMigration()) {
return this.fidGenerator.createRandomFid();
}
String readIid = getIidStore().readIid();
return TextUtils.isEmpty(readIid) ? this.fidGenerator.createRandomFid() : readIid;
}
public final PersistedInstallationEntry registerFidWithServer(PersistedInstallationEntry persistedInstallationEntry) {
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);
}
public final PersistedInstallationEntry fetchAuthTokenFromServer(PersistedInstallationEntry persistedInstallationEntry) {
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) {
updateCacheFid(null);
return persistedInstallationEntry.withNoGeneratedFid();
}
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
}
/* renamed from: com.google.firebase.installations.FirebaseInstallations$3, reason: invalid class name */
public static /* synthetic */ class AnonymousClass3 {
public static final /* synthetic */ int[] $SwitchMap$com$google$firebase$installations$remote$InstallationResponse$ResponseCode;
public 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) {
}
}
}
/* JADX WARN: Finally extract failed */
public final PersistedInstallationEntry getMultiProcessSafePrefs() {
PersistedInstallationEntry readPersistedInstallationEntryValue;
synchronized (lockGenerateFid) {
try {
CrossProcessLock acquire = CrossProcessLock.acquire(this.firebaseApp.getApplicationContext(), "generatefid.lock");
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;
}
}

View File

@@ -0,0 +1,10 @@
package com.google.firebase.installations;
import com.google.android.gms.tasks.Task;
/* loaded from: classes3.dex */
public interface FirebaseInstallationsApi {
Task getId();
Task getToken(boolean z);
}

View File

@@ -0,0 +1,23 @@
package com.google.firebase.installations;
import com.google.firebase.FirebaseException;
/* loaded from: classes3.dex */
public class FirebaseInstallationsException extends FirebaseException {
public final Status status;
public enum Status {
BAD_CONFIG,
UNAVAILABLE,
TOO_MANY_REQUESTS
}
public FirebaseInstallationsException(Status status) {
this.status = status;
}
public FirebaseInstallationsException(String str, Status status) {
super(str);
this.status = status;
}
}

View File

@@ -0,0 +1,13 @@
package com.google.firebase.installations;
import com.google.firebase.components.ComponentRegistrar;
import java.util.List;
import kotlin.collections.CollectionsKt__CollectionsKt;
/* loaded from: classes3.dex */
public final class FirebaseInstallationsKtxRegistrar implements ComponentRegistrar {
@Override // com.google.firebase.components.ComponentRegistrar
public List getComponents() {
return CollectionsKt__CollectionsKt.emptyList();
}
}

View File

@@ -0,0 +1,43 @@
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.ComponentFactory;
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";
@Override // com.google.firebase.components.ComponentRegistrar
public List<Component> getComponents() {
return Arrays.asList(Component.builder(FirebaseInstallationsApi.class).name(LIBRARY_NAME).add(Dependency.required(FirebaseApp.class)).add(Dependency.optionalProvider(HeartBeatController.class)).add(Dependency.required(Qualified.qualified(Background.class, ExecutorService.class))).add(Dependency.required(Qualified.qualified(Blocking.class, Executor.class))).factory(new ComponentFactory() { // from class: com.google.firebase.installations.FirebaseInstallationsRegistrar$$ExternalSyntheticLambda0
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseInstallationsApi lambda$getComponents$0;
lambda$getComponents$0 = FirebaseInstallationsRegistrar.lambda$getComponents$0(componentContainer);
return lambda$getComponents$0;
}
}).build(), HeartBeatConsumerComponent.create(), LibraryVersionComponent.create(LIBRARY_NAME, "18.0.0"));
}
/* JADX INFO: Access modifiers changed from: private */
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))));
}
}

View File

@@ -0,0 +1,30 @@
package com.google.firebase.installations;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.installations.local.PersistedInstallationEntry;
/* loaded from: classes3.dex */
public class GetAuthTokenListener implements StateListener {
public final TaskCompletionSource resultTaskCompletionSource;
public final Utils utils;
public GetAuthTokenListener(Utils utils, TaskCompletionSource taskCompletionSource) {
this.utils = utils;
this.resultTaskCompletionSource = taskCompletionSource;
}
@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;
}
@Override // com.google.firebase.installations.StateListener
public boolean onException(Exception exc) {
this.resultTaskCompletionSource.trySetException(exc);
return true;
}
}

View File

@@ -0,0 +1,27 @@
package com.google.firebase.installations;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.installations.local.PersistedInstallationEntry;
/* loaded from: classes3.dex */
public class GetIdListener implements StateListener {
public final TaskCompletionSource taskCompletionSource;
@Override // com.google.firebase.installations.StateListener
public boolean onException(Exception exc) {
return false;
}
public GetIdListener(TaskCompletionSource taskCompletionSource) {
this.taskCompletionSource = taskCompletionSource;
}
@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;
}
}

View File

@@ -0,0 +1,27 @@
package com.google.firebase.installations;
import com.google.firebase.installations.AutoValue_InstallationTokenResult;
/* loaded from: classes3.dex */
public abstract class InstallationTokenResult {
public static abstract class Builder {
public abstract InstallationTokenResult build();
public abstract Builder setToken(String str);
public abstract Builder setTokenCreationTimestamp(long j);
public abstract Builder setTokenExpirationTimestamp(long j);
}
public abstract String getToken();
public abstract long getTokenCreationTimestamp();
public abstract long getTokenExpirationTimestamp();
public static Builder builder() {
return new AutoValue_InstallationTokenResult.Builder();
}
}

View File

@@ -0,0 +1,31 @@
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 {
public static final byte FID_4BIT_PREFIX = Byte.parseByte("01110000", 2);
public static final byte REMOVE_PREFIX_MASK = Byte.parseByte("00001111", 2);
public String createRandomFid() {
byte[] bytesFromUUID = getBytesFromUUID(UUID.randomUUID(), new byte[17]);
byte b = bytesFromUUID[0];
bytesFromUUID[16] = b;
bytesFromUUID[0] = (byte) ((b & REMOVE_PREFIX_MASK) | FID_4BIT_PREFIX);
return encodeFidBase64UrlSafe(bytesFromUUID);
}
public static String encodeFidBase64UrlSafe(byte[] bArr) {
return new String(Base64.encode(bArr, 11), Charset.defaultCharset()).substring(0, 22);
}
public static byte[] getBytesFromUUID(UUID uuid, byte[] bArr) {
ByteBuffer wrap = ByteBuffer.wrap(bArr);
wrap.putLong(uuid.getMostSignificantBits());
wrap.putLong(uuid.getLeastSignificantBits());
return wrap.array();
}
}

View File

@@ -0,0 +1,10 @@
package com.google.firebase.installations;
import com.google.firebase.installations.local.PersistedInstallationEntry;
/* loaded from: classes3.dex */
public interface StateListener {
boolean onException(Exception exc);
boolean onStateReached(PersistedInstallationEntry persistedInstallationEntry);
}

View File

@@ -0,0 +1,56 @@
package com.google.firebase.installations;
import android.text.TextUtils;
import com.facebook.internal.security.CertificateUtil;
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 {
public static Utils singleton;
public final Clock clock;
public static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = TimeUnit.HOURS.toSeconds(1);
public static final Pattern API_KEY_FORMAT = Pattern.compile("\\AA[\\w-]{38}\\z");
public Utils(Clock clock) {
this.clock = clock;
}
public static Utils getInstance() {
return getInstance(SystemClock.getInstance());
}
public static Utils getInstance(Clock clock) {
if (singleton == null) {
singleton = new Utils(clock);
}
return singleton;
}
public boolean isAuthTokenExpired(PersistedInstallationEntry persistedInstallationEntry) {
return TextUtils.isEmpty(persistedInstallationEntry.getAuthToken()) || persistedInstallationEntry.getTokenCreationEpochInSecs() + persistedInstallationEntry.getExpiresInSecs() < currentTimeInSecs() + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS;
}
public long currentTimeInSecs() {
return TimeUnit.MILLISECONDS.toSeconds(currentTimeInMillis());
}
public long currentTimeInMillis() {
return this.clock.currentTimeMillis();
}
public static boolean isValidAppIdFormat(String str) {
return str.contains(CertificateUtil.DELIMITER);
}
public static boolean isValidApiKeyFormat(String str) {
return API_KEY_FORMAT.matcher(str).matches();
}
public long getRandomDelayForSyncPrevention() {
return (long) (Math.random() * 1000.0d);
}
}

View File

@@ -0,0 +1,26 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$attr {
public static int alpha = 2130968661;
public static int coordinatorLayoutStyle = 2130968755;
public static int font = 2130968792;
public static int fontProviderAuthority = 2130968794;
public static int fontProviderCerts = 2130968795;
public static int fontProviderFetchStrategy = 2130968797;
public static int fontProviderFetchTimeout = 2130968798;
public static int fontProviderPackage = 2130968799;
public static int fontProviderQuery = 2130968800;
public static int fontStyle = 2130968802;
public static int fontVariationSettings = 2130968803;
public static int fontWeight = 2130968804;
public static int keylines = 2130968825;
public static int layout_anchor = 2130968830;
public static int layout_anchorGravity = 2130968831;
public static int layout_behavior = 2130968832;
public static int layout_dodgeInsetEdges = 2130968833;
public static int layout_insetEdge = 2130968834;
public static int layout_keyline = 2130968835;
public static int statusBarBackground = 2130968933;
public static int ttcIndex = 2130968988;
}

View File

@@ -0,0 +1,9 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$color {
public static int notification_action_color_filter = 2131099879;
public static int notification_icon_bg_color = 2131099880;
public static int ripple_material_light = 2131099891;
public static int secondary_text_default_material_light = 2131099893;
}

View File

@@ -0,0 +1,27 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$dimen {
public static int compat_button_inset_horizontal_material = 2131165333;
public static int compat_button_inset_vertical_material = 2131165334;
public static int compat_button_padding_horizontal_material = 2131165335;
public static int compat_button_padding_vertical_material = 2131165336;
public static int compat_control_corner_material = 2131165337;
public static int compat_notification_large_icon_max_height = 2131165338;
public static int compat_notification_large_icon_max_width = 2131165339;
public static int notification_action_icon_size = 2131165445;
public static int notification_action_text_size = 2131165446;
public static int notification_big_circle_margin = 2131165447;
public static int notification_content_margin_start = 2131165448;
public static int notification_large_icon_height = 2131165449;
public static int notification_large_icon_width = 2131165450;
public static int notification_main_column_padding_top = 2131165451;
public static int notification_media_narrow_margin = 2131165452;
public static int notification_right_icon_size = 2131165453;
public static int notification_right_side_padding_top = 2131165454;
public static int notification_small_icon_background_padding = 2131165455;
public static int notification_small_icon_size_as_large = 2131165456;
public static int notification_subtext_size = 2131165457;
public static int notification_top_pad = 2131165458;
public static int notification_top_pad_large_text = 2131165459;
}

View File

@@ -0,0 +1,17 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$drawable {
public static int notification_action_background = 2131231297;
public static int notification_bg = 2131231298;
public static int notification_bg_low = 2131231299;
public static int notification_bg_low_normal = 2131231300;
public static int notification_bg_low_pressed = 2131231301;
public static int notification_bg_normal = 2131231302;
public static int notification_bg_normal_pressed = 2131231303;
public static int notification_icon_background = 2131231304;
public static int notification_template_icon_bg = 2131231306;
public static int notification_template_icon_low_bg = 2131231307;
public static int notification_tile_bg = 2131231308;
public static int notify_panel_notification_icon_bg = 2131231309;
}

View File

@@ -0,0 +1,79 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$id {
public static int accessibility_action_clickable_span = 2131361801;
public static int accessibility_custom_action_0 = 2131361802;
public static int accessibility_custom_action_1 = 2131361803;
public static int accessibility_custom_action_10 = 2131361804;
public static int accessibility_custom_action_11 = 2131361805;
public static int accessibility_custom_action_12 = 2131361806;
public static int accessibility_custom_action_13 = 2131361807;
public static int accessibility_custom_action_14 = 2131361808;
public static int accessibility_custom_action_15 = 2131361809;
public static int accessibility_custom_action_16 = 2131361810;
public static int accessibility_custom_action_17 = 2131361811;
public static int accessibility_custom_action_18 = 2131361812;
public static int accessibility_custom_action_19 = 2131361813;
public static int accessibility_custom_action_2 = 2131361814;
public static int accessibility_custom_action_20 = 2131361815;
public static int accessibility_custom_action_21 = 2131361816;
public static int accessibility_custom_action_22 = 2131361817;
public static int accessibility_custom_action_23 = 2131361818;
public static int accessibility_custom_action_24 = 2131361819;
public static int accessibility_custom_action_25 = 2131361820;
public static int accessibility_custom_action_26 = 2131361821;
public static int accessibility_custom_action_27 = 2131361822;
public static int accessibility_custom_action_28 = 2131361823;
public static int accessibility_custom_action_29 = 2131361824;
public static int accessibility_custom_action_3 = 2131361825;
public static int accessibility_custom_action_30 = 2131361826;
public static int accessibility_custom_action_31 = 2131361827;
public static int accessibility_custom_action_4 = 2131361828;
public static int accessibility_custom_action_5 = 2131361829;
public static int accessibility_custom_action_6 = 2131361830;
public static int accessibility_custom_action_7 = 2131361831;
public static int accessibility_custom_action_8 = 2131361832;
public static int accessibility_custom_action_9 = 2131361833;
public static int action_container = 2131361842;
public static int action_divider = 2131361844;
public static int action_image = 2131361845;
public static int action_text = 2131361852;
public static int actions = 2131361853;
public static int async = 2131361928;
public static int blocking = 2131361937;
public static int bottom = 2131361938;
public static int chronometer = 2131361958;
public static int dialog_button = 2131361985;
public static int end = 2131361992;
public static int forever = 2131362055;
public static int icon = 2131362122;
public static int icon_group = 2131362123;
public static int info = 2131362129;
public static int italic = 2131362134;
public static int left = 2131362139;
public static int line1 = 2131362141;
public static int line3 = 2131362142;
public static int none = 2131362350;
public static int normal = 2131362351;
public static int notification_background = 2131362352;
public static int notification_main_column = 2131362353;
public static int notification_main_column_container = 2131362354;
public static int right = 2131362375;
public static int right_icon = 2131362376;
public static int right_side = 2131362377;
public static int start = 2131362408;
public static int tag_accessibility_actions = 2131362416;
public static int tag_accessibility_clickable_spans = 2131362417;
public static int tag_accessibility_heading = 2131362418;
public static int tag_accessibility_pane_title = 2131362419;
public static int tag_screen_reader_focusable = 2131362423;
public static int tag_transition_group = 2131362425;
public static int tag_unhandled_key_event_manager = 2131362426;
public static int tag_unhandled_key_listeners = 2131362427;
public static int text = 2131362429;
public static int text2 = 2131362430;
public static int time = 2131362435;
public static int title = 2131362436;
public static int top = 2131362439;
}

View File

@@ -0,0 +1,7 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$integer {
public static int google_play_services_version = 2131427343;
public static int status_bar_notification_info_maxnum = 2131427348;
}

View File

@@ -0,0 +1,12 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$layout {
public static int custom_dialog = 2131558451;
public static int notification_action = 2131558559;
public static int notification_action_tombstone = 2131558560;
public static int notification_template_custom_big = 2131558567;
public static int notification_template_icon_group = 2131558568;
public static int notification_template_part_chronometer = 2131558572;
public static int notification_template_part_time = 2131558573;
}

View File

@@ -0,0 +1,7 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$string {
public static int common_google_play_services_unknown_issue = 2131886247;
public static int status_bar_notification_info_overflow = 2131886471;
}

View File

@@ -0,0 +1,13 @@
package com.google.firebase.installations.interop;
/* loaded from: classes3.dex */
public final class R$style {
public static int TextAppearance_Compat_Notification = 2131951943;
public static int TextAppearance_Compat_Notification_Info = 2131951944;
public static int TextAppearance_Compat_Notification_Line2 = 2131951946;
public static int TextAppearance_Compat_Notification_Time = 2131951949;
public static int TextAppearance_Compat_Notification_Title = 2131951951;
public static int Widget_Compat_NotificationActionContainer = 2131952065;
public static int Widget_Compat_NotificationActionText = 2131952066;
public static int Widget_Support_CoordinatorLayout = 2131952067;
}

View File

@@ -0,0 +1,60 @@
package com.google.firebase.installations.interop;
import android.R;
/* loaded from: classes3.dex */
public final class R$styleable {
public static int ColorStateListItem_alpha = 3;
public static int ColorStateListItem_android_alpha = 1;
public static int ColorStateListItem_android_color = 0;
public static int ColorStateListItem_android_lStar = 2;
public static int ColorStateListItem_lStar = 4;
public static int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static int CoordinatorLayout_Layout_layout_anchor = 1;
public static int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static int CoordinatorLayout_Layout_layout_behavior = 3;
public static int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static int CoordinatorLayout_Layout_layout_keyline = 6;
public static int CoordinatorLayout_keylines = 0;
public static int CoordinatorLayout_statusBarBackground = 1;
public static int FontFamilyFont_android_font = 0;
public static int FontFamilyFont_android_fontStyle = 2;
public static int FontFamilyFont_android_fontVariationSettings = 4;
public static int FontFamilyFont_android_fontWeight = 1;
public static int FontFamilyFont_android_ttcIndex = 3;
public static int FontFamilyFont_font = 5;
public static int FontFamilyFont_fontStyle = 6;
public static int FontFamilyFont_fontVariationSettings = 7;
public static int FontFamilyFont_fontWeight = 8;
public static int FontFamilyFont_ttcIndex = 9;
public static int FontFamily_fontProviderAuthority = 0;
public static int FontFamily_fontProviderCerts = 1;
public static int FontFamily_fontProviderFallbackQuery = 2;
public static int FontFamily_fontProviderFetchStrategy = 3;
public static int FontFamily_fontProviderFetchTimeout = 4;
public static int FontFamily_fontProviderPackage = 5;
public static int FontFamily_fontProviderQuery = 6;
public static int FontFamily_fontProviderSystemFontFamily = 7;
public static int GradientColorItem_android_color = 0;
public static int GradientColorItem_android_offset = 1;
public static int GradientColor_android_centerColor = 7;
public static int GradientColor_android_centerX = 3;
public static int GradientColor_android_centerY = 4;
public static int GradientColor_android_endColor = 1;
public static int GradientColor_android_endX = 10;
public static int GradientColor_android_endY = 11;
public static int GradientColor_android_gradientRadius = 5;
public static int GradientColor_android_startColor = 0;
public static int GradientColor_android_startX = 8;
public static int GradientColor_android_startY = 9;
public static int GradientColor_android_tileMode = 6;
public static int GradientColor_android_type = 2;
public static int[] ColorStateListItem = {R.attr.color, R.attr.alpha, R.attr.lStar, com.ea.games.r3_row.R.attr.alpha, com.ea.games.r3_row.R.attr.lStar};
public static int[] CoordinatorLayout = {com.ea.games.r3_row.R.attr.keylines, com.ea.games.r3_row.R.attr.statusBarBackground};
public static int[] CoordinatorLayout_Layout = {R.attr.layout_gravity, com.ea.games.r3_row.R.attr.layout_anchor, com.ea.games.r3_row.R.attr.layout_anchorGravity, com.ea.games.r3_row.R.attr.layout_behavior, com.ea.games.r3_row.R.attr.layout_dodgeInsetEdges, com.ea.games.r3_row.R.attr.layout_insetEdge, com.ea.games.r3_row.R.attr.layout_keyline};
public static int[] FontFamily = {com.ea.games.r3_row.R.attr.fontProviderAuthority, com.ea.games.r3_row.R.attr.fontProviderCerts, com.ea.games.r3_row.R.attr.fontProviderFallbackQuery, com.ea.games.r3_row.R.attr.fontProviderFetchStrategy, com.ea.games.r3_row.R.attr.fontProviderFetchTimeout, com.ea.games.r3_row.R.attr.fontProviderPackage, com.ea.games.r3_row.R.attr.fontProviderQuery, com.ea.games.r3_row.R.attr.fontProviderSystemFontFamily};
public static int[] FontFamilyFont = {R.attr.font, R.attr.fontWeight, R.attr.fontStyle, R.attr.ttcIndex, R.attr.fontVariationSettings, com.ea.games.r3_row.R.attr.font, com.ea.games.r3_row.R.attr.fontStyle, com.ea.games.r3_row.R.attr.fontVariationSettings, com.ea.games.r3_row.R.attr.fontWeight, com.ea.games.r3_row.R.attr.ttcIndex};
public static int[] GradientColor = {R.attr.startColor, R.attr.endColor, R.attr.type, R.attr.centerX, R.attr.centerY, R.attr.gradientRadius, R.attr.tileMode, R.attr.centerColor, R.attr.startX, R.attr.startY, R.attr.endX, R.attr.endY};
public static int[] GradientColorItem = {R.attr.color, R.attr.offset};
}

View File

@@ -0,0 +1,13 @@
package com.google.firebase.installations.ktx;
import com.google.firebase.components.ComponentRegistrar;
import java.util.List;
import kotlin.collections.CollectionsKt__CollectionsKt;
/* loaded from: classes3.dex */
public final class FirebaseInstallationsKtxRegistrar implements ComponentRegistrar {
@Override // com.google.firebase.components.ComponentRegistrar
public List getComponents() {
return CollectionsKt__CollectionsKt.emptyList();
}
}

View File

@@ -0,0 +1,196 @@
package com.google.firebase.installations.local;
import com.google.firebase.installations.local.PersistedInstallation;
import com.google.firebase.installations.local.PersistedInstallationEntry;
/* loaded from: classes3.dex */
public final class AutoValue_PersistedInstallationEntry extends PersistedInstallationEntry {
public final String authToken;
public final long expiresInSecs;
public final String firebaseInstallationId;
public final String fisError;
public final String refreshToken;
public final PersistedInstallation.RegistrationStatus registrationStatus;
public final long tokenCreationEpochInSecs;
@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 AutoValue_PersistedInstallationEntry(String str, PersistedInstallation.RegistrationStatus registrationStatus, String str2, String str3, long j, long j2, String str4) {
this.firebaseInstallationId = str;
this.registrationStatus = registrationStatus;
this.authToken = str2;
this.refreshToken = str3;
this.expiresInSecs = j;
this.tokenCreationEpochInSecs = j2;
this.fisError = str4;
}
public String toString() {
return "PersistedInstallationEntry{firebaseInstallationId=" + this.firebaseInstallationId + ", registrationStatus=" + this.registrationStatus + ", authToken=" + this.authToken + ", refreshToken=" + this.refreshToken + ", expiresInSecs=" + this.expiresInSecs + ", tokenCreationEpochInSecs=" + this.tokenCreationEpochInSecs + ", fisError=" + this.fisError + "}";
}
public boolean equals(Object obj) {
String str;
String str2;
if (obj == this) {
return true;
}
if (!(obj instanceof PersistedInstallationEntry)) {
return false;
}
PersistedInstallationEntry persistedInstallationEntry = (PersistedInstallationEntry) obj;
String str3 = this.firebaseInstallationId;
if (str3 != null ? str3.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()) {
String str4 = this.fisError;
if (str4 == null) {
if (persistedInstallationEntry.getFisError() == null) {
return true;
}
} else if (str4.equals(persistedInstallationEntry.getFisError())) {
return true;
}
}
}
return false;
}
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 j = this.expiresInSecs;
int i = (hashCode3 ^ ((int) (j ^ (j >>> 32)))) * 1000003;
long j2 = this.tokenCreationEpochInSecs;
int i2 = (i ^ ((int) (j2 ^ (j2 >>> 32)))) * 1000003;
String str4 = this.fisError;
return i2 ^ (str4 != null ? str4.hashCode() : 0);
}
@Override // com.google.firebase.installations.local.PersistedInstallationEntry
public PersistedInstallationEntry.Builder toBuilder() {
return new Builder(this);
}
public static final class Builder extends PersistedInstallationEntry.Builder {
public String authToken;
public Long expiresInSecs;
public String firebaseInstallationId;
public String fisError;
public String refreshToken;
public PersistedInstallation.RegistrationStatus registrationStatus;
public Long tokenCreationEpochInSecs;
@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 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;
}
public Builder() {
}
public 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();
}
@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 setExpiresInSecs(long j) {
this.expiresInSecs = Long.valueOf(j);
return this;
}
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
public PersistedInstallationEntry.Builder setTokenCreationEpochInSecs(long j) {
this.tokenCreationEpochInSecs = Long.valueOf(j);
return this;
}
@Override // com.google.firebase.installations.local.PersistedInstallationEntry.Builder
public PersistedInstallationEntry build() {
String str = "";
if (this.registrationStatus == null) {
str = " registrationStatus";
}
if (this.expiresInSecs == null) {
str = str + " expiresInSecs";
}
if (this.tokenCreationEpochInSecs == null) {
str = str + " tokenCreationEpochInSecs";
}
if (!str.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + str);
}
return new AutoValue_PersistedInstallationEntry(this.firebaseInstallationId, this.registrationStatus, this.authToken, this.refreshToken, this.expiresInSecs.longValue(), this.tokenCreationEpochInSecs.longValue(), this.fisError);
}
}
}

View File

@@ -0,0 +1,141 @@
package com.google.firebase.installations.local;
import android.content.SharedPreferences;
import android.util.Base64;
import android.util.Log;
import androidx.webkit.ProxyConfig;
import com.applovin.exoplayer2.common.base.Ascii;
import com.facebook.internal.security.CertificateUtil;
import com.google.android.gms.stats.CodePackage;
import com.google.firebase.FirebaseApp;
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 org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class IidStore {
public static final String[] ALLOWABLE_SCOPES = {ProxyConfig.MATCH_ALL_SCHEMES, "FCM", CodePackage.GCM, ""};
public final String defaultSenderId;
public final SharedPreferences iidPrefs;
public IidStore(FirebaseApp firebaseApp) {
this.iidPrefs = firebaseApp.getApplicationContext().getSharedPreferences("com.google.android.gms.appid", 0);
this.defaultSenderId = getDefaultSenderId(firebaseApp);
}
public 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(CertificateUtil.DELIMITER);
if (split.length != 4) {
return null;
}
String str = split[1];
if (str.isEmpty()) {
return null;
}
return str;
}
public final String createTokenKey(String str, String str2) {
return "|T|" + str + "|" + str2;
}
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("{")) {
string = parseIidTokenFromJson(string);
}
return string;
}
}
return null;
} catch (Throwable th) {
throw th;
}
}
}
public final String parseIidTokenFromJson(String str) {
try {
return new JSONObject(str).getString("token");
} catch (JSONException unused) {
return null;
}
}
public String readIid() {
synchronized (this.iidPrefs) {
try {
String readInstanceIdFromLocalStorage = readInstanceIdFromLocalStorage();
if (readInstanceIdFromLocalStorage != null) {
return readInstanceIdFromLocalStorage;
}
return readPublicKeyFromLocalStorageAndCalculateInstanceId();
} catch (Throwable th) {
throw th;
}
}
}
public final String readInstanceIdFromLocalStorage() {
String string;
synchronized (this.iidPrefs) {
string = this.iidPrefs.getString("|S|id", null);
}
return string;
}
public final String readPublicKeyFromLocalStorageAndCalculateInstanceId() {
synchronized (this.iidPrefs) {
try {
String string = this.iidPrefs.getString("|S||P|", null);
if (string == null) {
return null;
}
PublicKey parseKey = parseKey(string);
if (parseKey == null) {
return null;
}
return getIdFromPublicKey(parseKey);
} catch (Throwable th) {
throw th;
}
}
}
public static String getIdFromPublicKey(PublicKey publicKey) {
try {
byte[] digest = MessageDigest.getInstance("SHA1").digest(publicKey.getEncoded());
digest[0] = (byte) (((digest[0] & Ascii.SI) + 112) & 255);
return Base64.encodeToString(digest, 0, 8, 11);
} catch (NoSuchAlgorithmException unused) {
Log.w("ContentValues", "Unexpected error, device missing required algorithms");
return null;
}
}
public final PublicKey parseKey(String str) {
try {
return KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(Base64.decode(str, 8)));
} catch (IllegalArgumentException | NoSuchAlgorithmException | InvalidKeySpecException e) {
Log.w("ContentValues", "Invalid key stored " + e);
return null;
}
}
}

View File

@@ -0,0 +1,105 @@
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 {
public File dataFile;
public final FirebaseApp firebaseApp;
public enum RegistrationStatus {
ATTEMPT_MIGRATION,
NOT_GENERATED,
UNREGISTERED,
REGISTERED,
REGISTER_ERROR
}
public PersistedInstallation(FirebaseApp firebaseApp) {
this.firebaseApp = firebaseApp;
}
public final 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;
}
public PersistedInstallationEntry readPersistedInstallationEntryValue() {
JSONObject readJSONFromFile = readJSONFromFile();
String optString = readJSONFromFile.optString("Fid", null);
int optInt = readJSONFromFile.optInt("Status", RegistrationStatus.ATTEMPT_MIGRATION.ordinal());
String optString2 = readJSONFromFile.optString("AuthToken", null);
String optString3 = readJSONFromFile.optString("RefreshToken", null);
long optLong = readJSONFromFile.optLong("TokenCreationEpochInSecs", 0L);
long optLong2 = readJSONFromFile.optLong("ExpiresInSecs", 0L);
return PersistedInstallationEntry.builder().setFirebaseInstallationId(optString).setRegistrationStatus(RegistrationStatus.values()[optInt]).setAuthToken(optString2).setRefreshToken(optString3).setTokenCreationEpochInSecs(optLong).setExpiresInSecs(optLong2).setFisError(readJSONFromFile.optString("FisError", null)).build();
}
public final 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) {
byteArrayOutputStream.write(bArr, 0, read);
} else {
JSONObject jSONObject = new JSONObject(byteArrayOutputStream.toString());
fileInputStream.close();
return jSONObject;
}
} catch (Throwable th) {
try {
fileInputStream.close();
} catch (Throwable th2) {
th.addSuppressed(th2);
}
throw th;
}
}
} catch (IOException | JSONException unused) {
return new JSONObject();
}
}
public PersistedInstallationEntry insertOrUpdatePersistedInstallationEntry(PersistedInstallationEntry persistedInstallationEntry) {
File createTempFile;
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("Fid", persistedInstallationEntry.getFirebaseInstallationId());
jSONObject.put("Status", persistedInstallationEntry.getRegistrationStatus().ordinal());
jSONObject.put("AuthToken", persistedInstallationEntry.getAuthToken());
jSONObject.put("RefreshToken", persistedInstallationEntry.getRefreshToken());
jSONObject.put("TokenCreationEpochInSecs", persistedInstallationEntry.getTokenCreationEpochInSecs());
jSONObject.put("ExpiresInSecs", persistedInstallationEntry.getExpiresInSecs());
jSONObject.put("FisError", persistedInstallationEntry.getFisError());
createTempFile = File.createTempFile("PersistedInstallation", "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");
}
}

View File

@@ -0,0 +1,91 @@
package com.google.firebase.installations.local;
import com.google.firebase.installations.local.AutoValue_PersistedInstallationEntry;
import com.google.firebase.installations.local.PersistedInstallation;
/* loaded from: classes3.dex */
public abstract class PersistedInstallationEntry {
public static PersistedInstallationEntry INSTANCE = builder().build();
public static abstract class Builder {
public abstract PersistedInstallationEntry build();
public abstract Builder setAuthToken(String str);
public abstract Builder setExpiresInSecs(long j);
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 j);
}
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 abstract Builder toBuilder();
public boolean isRegistered() {
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.REGISTERED;
}
public boolean isErrored() {
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.REGISTER_ERROR;
}
public boolean isUnregistered() {
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.UNREGISTERED;
}
public boolean isNotGenerated() {
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.NOT_GENERATED || getRegistrationStatus() == PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION;
}
public boolean shouldAttemptMigration() {
return getRegistrationStatus() == PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION;
}
public PersistedInstallationEntry withUnregisteredFid(String str) {
return toBuilder().setFirebaseInstallationId(str).setRegistrationStatus(PersistedInstallation.RegistrationStatus.UNREGISTERED).build();
}
public PersistedInstallationEntry withRegisteredFid(String str, String str2, long j, String str3, long j2) {
return toBuilder().setFirebaseInstallationId(str).setRegistrationStatus(PersistedInstallation.RegistrationStatus.REGISTERED).setAuthToken(str3).setRefreshToken(str2).setExpiresInSecs(j2).setTokenCreationEpochInSecs(j).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 withAuthToken(String str, long j, long j2) {
return toBuilder().setAuthToken(str).setExpiresInSecs(j).setTokenCreationEpochInSecs(j2).build();
}
public PersistedInstallationEntry withClearedAuthToken() {
return toBuilder().setAuthToken(null).build();
}
public static Builder builder() {
return new AutoValue_PersistedInstallationEntry.Builder().setTokenCreationEpochInSecs(0L).setRegistrationStatus(PersistedInstallation.RegistrationStatus.ATTEMPT_MIGRATION).setExpiresInSecs(0L);
}
}

View File

@@ -0,0 +1,136 @@
package com.google.firebase.installations.remote;
import com.google.firebase.installations.remote.InstallationResponse;
/* loaded from: classes3.dex */
public final class AutoValue_InstallationResponse extends InstallationResponse {
public final TokenResult authToken;
public final String fid;
public final String refreshToken;
public final InstallationResponse.ResponseCode responseCode;
public final String uri;
@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 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;
}
public String toString() {
return "InstallationResponse{uri=" + this.uri + ", fid=" + this.fid + ", refreshToken=" + this.refreshToken + ", authToken=" + this.authToken + ", responseCode=" + this.responseCode + "}";
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof InstallationResponse)) {
return false;
}
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) {
if (installationResponse.getResponseCode() == null) {
return true;
}
} else if (responseCode.equals(installationResponse.getResponseCode())) {
return true;
}
}
}
}
}
return false;
}
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);
}
public static final class Builder extends InstallationResponse.Builder {
public TokenResult authToken;
public String fid;
public String refreshToken;
public InstallationResponse.ResponseCode responseCode;
public String uri;
@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;
}
@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);
}
}
}

View File

@@ -0,0 +1,104 @@
package com.google.firebase.installations.remote;
import com.google.firebase.installations.remote.TokenResult;
/* loaded from: classes3.dex */
public final class AutoValue_TokenResult extends TokenResult {
public final TokenResult.ResponseCode responseCode;
public final String token;
public final long tokenExpirationTimestamp;
@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 AutoValue_TokenResult(String str, long j, TokenResult.ResponseCode responseCode) {
this.token = str;
this.tokenExpirationTimestamp = j;
this.responseCode = responseCode;
}
public String toString() {
return "TokenResult{token=" + this.token + ", tokenExpirationTimestamp=" + this.tokenExpirationTimestamp + ", responseCode=" + this.responseCode + "}";
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof TokenResult)) {
return false;
}
TokenResult tokenResult = (TokenResult) obj;
String str = this.token;
if (str != null ? str.equals(tokenResult.getToken()) : tokenResult.getToken() == null) {
if (this.tokenExpirationTimestamp == tokenResult.getTokenExpirationTimestamp()) {
TokenResult.ResponseCode responseCode = this.responseCode;
if (responseCode == null) {
if (tokenResult.getResponseCode() == null) {
return true;
}
} else if (responseCode.equals(tokenResult.getResponseCode())) {
return true;
}
}
}
return false;
}
public int hashCode() {
String str = this.token;
int hashCode = str == null ? 0 : str.hashCode();
long j = this.tokenExpirationTimestamp;
int i = (((hashCode ^ 1000003) * 1000003) ^ ((int) (j ^ (j >>> 32)))) * 1000003;
TokenResult.ResponseCode responseCode = this.responseCode;
return i ^ (responseCode != null ? responseCode.hashCode() : 0);
}
public static final class Builder extends TokenResult.Builder {
public TokenResult.ResponseCode responseCode;
public String token;
public Long tokenExpirationTimestamp;
@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 j) {
this.tokenExpirationTimestamp = Long.valueOf(j);
return this;
}
@Override // com.google.firebase.installations.remote.TokenResult.Builder
public TokenResult build() {
String str = "";
if (this.tokenExpirationTimestamp == null) {
str = " tokenExpirationTimestamp";
}
if (!str.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + str);
}
return new AutoValue_TokenResult(this.token, this.tokenExpirationTimestamp.longValue(), this.responseCode);
}
}
}

View File

@@ -0,0 +1,384 @@
package com.google.firebase.installations.remote;
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.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.ironsource.nb;
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.apache.http.protocol.HTTP;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class FirebaseInstallationServiceClient {
public static final Pattern EXPIRATION_TIMESTAMP_PATTERN = Pattern.compile("[0-9]+s");
public static final Charset UTF_8 = Charset.forName("UTF-8");
public final Context context;
public final Provider heartBeatProvider;
public final RequestLimiter requestLimiter = new RequestLimiter();
public static boolean isSuccessfulResponseCode(int i) {
return i >= 200 && i < 300;
}
public FirebaseInstallationServiceClient(Context context, Provider provider) {
this.context = context;
this.heartBeatProvider = provider;
}
public InstallationResponse createFirebaseInstallation(String str, String str2, String str3, String str4, String str5) {
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(String.format("projects/%s/installations", str3));
for (int i = 0; i <= 1; i++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection openHttpURLConnection = openHttpURLConnection(fullyQualifiedRequestUri, str);
try {
try {
openHttpURLConnection.setRequestMethod("POST");
openHttpURLConnection.setDoOutput(true);
if (str5 != null) {
openHttpURLConnection.addRequestProperty("x-goog-fis-android-iid-migration-auth", str5);
}
writeFIDCreateRequestBodyToOutputStream(openHttpURLConnection, str2, str4);
responseCode = openHttpURLConnection.getResponseCode();
this.requestLimiter.setNextRequestTime(responseCode);
} 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;
} catch (Throwable th) {
openHttpURLConnection.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
}
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
}
public final void writeFIDCreateRequestBodyToOutputStream(HttpURLConnection httpURLConnection, String str, String str2) {
writeRequestBodyToOutputStream(httpURLConnection, getJsonBytes(buildCreateFirebaseInstallationRequestBody(str, str2)));
}
public static byte[] getJsonBytes(JSONObject jSONObject) {
return jSONObject.toString().getBytes("UTF-8");
}
public static void writeRequestBodyToOutputStream(URLConnection uRLConnection, byte[] bArr) {
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 static JSONObject buildCreateFirebaseInstallationRequestBody(String str, String str2) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("fid", str);
jSONObject.put("appId", str2);
jSONObject.put("authVersion", "FIS_v2");
jSONObject.put("sdkVersion", "a:18.0.0");
return jSONObject;
} catch (JSONException e) {
throw new IllegalStateException(e);
}
}
public final void writeGenerateAuthTokenRequestBodyToOutputStream(HttpURLConnection httpURLConnection) {
writeRequestBodyToOutputStream(httpURLConnection, getJsonBytes(buildGenerateAuthTokenRequestBody()));
}
public static JSONObject buildGenerateAuthTokenRequestBody() {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("sdkVersion", "a:18.0.0");
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("installation", jSONObject);
return jSONObject2;
} catch (JSONException e) {
throw new IllegalStateException(e);
}
}
public final URL getFullyQualifiedRequestUri(String str) {
try {
return new URL(String.format("https://%s/%s/%s", "firebaseinstallations.googleapis.com", "v1", str));
} catch (MalformedURLException e) {
throw new FirebaseInstallationsException(e.getMessage(), FirebaseInstallationsException.Status.UNAVAILABLE);
}
}
public TokenResult generateAuthToken(String str, String str2, String str3, String str4) {
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(String.format("projects/%s/installations/%s/authTokens:generate", str3, str2));
for (int i = 0; i <= 1; i++) {
TrafficStats.setThreadStatsTag(32771);
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);
}
public static void logBadConfigError() {
Log.e("Firebase-Installations", "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.");
}
public final HttpURLConnection openHttpURLConnection(URL url, String str) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setConnectTimeout(10000);
httpURLConnection.setUseCaches(false);
httpURLConnection.setReadTimeout(10000);
httpURLConnection.addRequestProperty("Content-Type", nb.L);
httpURLConnection.addRequestProperty("Accept", nb.L);
httpURLConnection.addRequestProperty(HTTP.CONTENT_ENCODING, "gzip");
httpURLConnection.addRequestProperty("Cache-Control", "no-cache");
httpURLConnection.addRequestProperty("X-Android-Package", this.context.getPackageName());
HeartBeatController heartBeatController = (HeartBeatController) this.heartBeatProvider.get();
if (heartBeatController != null) {
try {
httpURLConnection.addRequestProperty("x-firebase-client", (String) Tasks.await(heartBeatController.getHeartBeatsHeader()));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
Log.w("ContentValues", "Failed to get heartbeats header", e);
} catch (ExecutionException e2) {
Log.w("ContentValues", "Failed to get heartbeats header", e2);
}
}
httpURLConnection.addRequestProperty("X-Android-Cert", getFingerprintHashForPackage());
httpURLConnection.addRequestProperty("x-goog-api-key", str);
return httpURLConnection;
} catch (IOException unused) {
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", FirebaseInstallationsException.Status.UNAVAILABLE);
}
}
public final InstallationResponse readCreateResponse(HttpURLConnection httpURLConnection) {
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("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();
}
public final TokenResult readGenerateAuthTokenResponse(HttpURLConnection httpURLConnection) {
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();
}
public final String getFingerprintHashForPackage() {
try {
Context context = this.context;
byte[] packageCertificateHashBytes = AndroidUtilsLight.getPackageCertificateHashBytes(context, context.getPackageName());
if (packageCertificateHashBytes == null) {
Log.e("ContentValues", "Could not get fingerprint hash for package: " + this.context.getPackageName());
return null;
}
return Hex.bytesToStringUppercase(packageCertificateHashBytes, false);
} catch (PackageManager.NameNotFoundException e) {
Log.e("ContentValues", "No such package: " + this.context.getPackageName(), e);
return null;
}
}
public static long parseTokenExpirationTimestamp(String str) {
Preconditions.checkArgument(EXPIRATION_TIMESTAMP_PATTERN.matcher(str).matches(), "Invalid Expiration Timestamp.");
if (str == null || str.length() == 0) {
return 0L;
}
return Long.parseLong(str.substring(0, str.length() - 1));
}
public static void logFisCommunicationError(HttpURLConnection httpURLConnection, String str, String str2, String str3) {
String readErrorResponse = readErrorResponse(httpURLConnection);
if (TextUtils.isEmpty(readErrorResponse)) {
return;
}
Log.w("Firebase-Installations", readErrorResponse);
Log.w("Firebase-Installations", availableFirebaseOptions(str, str2, str3));
}
public static String availableFirebaseOptions(String str, String str2, String str3) {
String str4;
Object[] objArr = new Object[3];
objArr[0] = str2;
objArr[1] = str3;
if (TextUtils.isEmpty(str)) {
str4 = "";
} else {
str4 = ", " + str;
}
objArr[2] = str4;
return String.format("Firebase options used while communicating with Firebase server APIs: %s, %s%s", objArr);
}
public 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;
}
}
}

View File

@@ -0,0 +1,40 @@
package com.google.firebase.installations.remote;
import com.google.firebase.installations.remote.AutoValue_InstallationResponse;
/* loaded from: classes3.dex */
public abstract class InstallationResponse {
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);
}
public enum ResponseCode {
OK,
BAD_CONFIG
}
public abstract TokenResult getAuthToken();
public abstract String getFid();
public abstract String getRefreshToken();
public abstract ResponseCode getResponseCode();
public abstract String getUri();
public static Builder builder() {
return new AutoValue_InstallationResponse.Builder();
}
}

View File

@@ -0,0 +1,49 @@
package com.google.firebase.installations.remote;
import com.google.firebase.installations.Utils;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class RequestLimiter {
public static final long MAXIMUM_BACKOFF_DURATION_FOR_CONFIGURATION_ERRORS = TimeUnit.HOURS.toMillis(24);
public static final long MAXIMUM_BACKOFF_DURATION_FOR_SERVER_ERRORS = TimeUnit.MINUTES.toMillis(30);
public int attemptCount;
public long nextRequestTime;
public final Utils utils = Utils.getInstance();
public static boolean isRetryableError(int i) {
return i == 429 || (i >= 500 && i < 600);
}
public static boolean isSuccessfulOrRequiresNewFidCreation(int i) {
return (i >= 200 && i < 300) || i == 401 || i == 404;
}
public synchronized void setNextRequestTime(int i) {
if (isSuccessfulOrRequiresNewFidCreation(i)) {
resetBackoffStrategy();
return;
}
this.attemptCount++;
this.nextRequestTime = this.utils.currentTimeInMillis() + getBackoffDuration(i);
}
public final synchronized void resetBackoffStrategy() {
this.attemptCount = 0;
}
public final 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;
}
public synchronized boolean isRequestAllowed() {
boolean z;
if (this.attemptCount != 0) {
z = this.utils.currentTimeInMillis() > this.nextRequestTime;
}
return z;
}
}

View File

@@ -0,0 +1,33 @@
package com.google.firebase.installations.remote;
import com.google.firebase.installations.remote.AutoValue_TokenResult;
/* loaded from: classes3.dex */
public abstract class TokenResult {
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 j);
}
public enum ResponseCode {
OK,
BAD_CONFIG,
AUTH_ERROR
}
public abstract ResponseCode getResponseCode();
public abstract String getToken();
public abstract long getTokenExpirationTimestamp();
public static Builder builder() {
return new AutoValue_TokenResult.Builder().setTokenExpirationTimestamp(0L);
}
}

View File

@@ -0,0 +1,6 @@
package com.google.firebase.installations.time;
/* loaded from: classes3.dex */
public interface Clock {
long currentTimeMillis();
}

View File

@@ -0,0 +1,18 @@
package com.google.firebase.installations.time;
/* loaded from: classes3.dex */
public class SystemClock implements Clock {
public static SystemClock singleton;
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();
}
}