Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3393656
D4240.id13432.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4240.id13432.diff
View Options
diff --git a/native/android/app/src/main/java/app/comm/android/fbjni/CommSecureStore.java b/native/android/app/src/main/java/app/comm/android/fbjni/CommSecureStore.java
--- a/native/android/app/src/main/java/app/comm/android/fbjni/CommSecureStore.java
+++ b/native/android/app/src/main/java/app/comm/android/fbjni/CommSecureStore.java
@@ -4,10 +4,11 @@
import expo.modules.core.arguments.MapArguments;
import expo.modules.core.arguments.ReadableArguments;
import expo.modules.securestore.SecureStoreModule;
-
+import java.util.concurrent.atomic.AtomicBoolean;
public class CommSecureStore {
private static final CommSecureStore instance = new CommSecureStore();
+ private static AtomicBoolean initialized = new AtomicBoolean(false);
private SecureStoreModule secureStoreModule = null;
private final ReadableArguments readableArguments;
@@ -20,7 +21,9 @@
}
public void initialize(SecureStoreModule secureStoreModule) {
- this.secureStoreModule = secureStoreModule;
+ if (CommSecureStore.initialized.compareAndSet(false, true)) {
+ this.secureStoreModule = secureStoreModule;
+ }
}
private void checkModule() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 3:27 PM (21 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605346
Default Alt Text
D4240.id13432.diff (1 KB)
Attached To
Mode
D4240: Make CommSecureStore initialization idempotent on Android
Attached
Detach File
Event Timeline
Log In to Comment