Files
rr3-apk/decompiled/sources/com/google/firebase/messaging/TopicsStore.java
Daniel Elliott f9d20bb3fc 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>
2026-02-18 14:52:23 -08:00

50 lines
1.9 KiB
Java

package com.google.firebase.messaging;
import android.content.Context;
import android.content.SharedPreferences;
import java.lang.ref.WeakReference;
import java.util.concurrent.Executor;
/* loaded from: classes3.dex */
public final class TopicsStore {
public static WeakReference topicsStoreWeakReference;
public final SharedPreferences sharedPreferences;
public final Executor syncExecutor;
public SharedPreferencesQueue topicOperationsQueue;
public TopicsStore(SharedPreferences sharedPreferences, Executor executor) {
this.syncExecutor = executor;
this.sharedPreferences = sharedPreferences;
}
public final synchronized void initStore() {
this.topicOperationsQueue = SharedPreferencesQueue.createInstance(this.sharedPreferences, "topic_operation_queue", ",", this.syncExecutor);
}
public static synchronized TopicsStore getInstance(Context context, Executor executor) {
TopicsStore topicsStore;
synchronized (TopicsStore.class) {
try {
WeakReference weakReference = topicsStoreWeakReference;
topicsStore = weakReference != null ? (TopicsStore) weakReference.get() : null;
if (topicsStore == null) {
topicsStore = new TopicsStore(context.getSharedPreferences("com.google.android.gms.appid", 0), executor);
topicsStore.initStore();
topicsStoreWeakReference = new WeakReference(topicsStore);
}
} catch (Throwable th) {
throw th;
}
}
return topicsStore;
}
public synchronized TopicOperation getNextTopicOperation() {
return TopicOperation.from(this.topicOperationsQueue.peek());
}
public synchronized boolean removeTopicOperation(TopicOperation topicOperation) {
return this.topicOperationsQueue.remove(topicOperation.serialize());
}
}