Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3500447
D6959.id23470.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
D6959.id23470.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -13,6 +13,10 @@
#include <folly/json.h>
#include <future>
+#ifdef __ANDROID__
+#include <fbjni/fbjni.h>
+#endif
+
namespace comm {
using namespace facebook::react;
@@ -800,8 +804,15 @@
});
}
try {
- NotificationsCryptoModule::initializeNotificationsCryptoAccount(
- "Comm");
+ auto task = []() {
+ NotificationsCryptoModule::initializeNotificationsCryptoAccount(
+ "Comm");
+ };
+#ifdef __ANDROID__
+ facebook::jni::ThreadScope::WithClassLoader(std::move(task));
+#else
+ task();
+#endif
} catch (const std::exception &e) {
error = e.what();
}
@@ -833,8 +844,15 @@
}
try {
if (!error.size()) {
- notificationsKeysResult =
- NotificationsCryptoModule::getNotificationsIdentityKeys();
+ auto task = [¬ificationsKeysResult]() {
+ notificationsKeysResult =
+ NotificationsCryptoModule::getNotificationsIdentityKeys();
+ };
+#ifdef __ANDROID__
+ facebook::jni::ThreadScope::WithClassLoader(std::move(task));
+#else
+ task();
+#endif
}
} catch (const std::exception &e) {
error = e.what();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 1:40 AM (13 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684513
Default Alt Text
D6959.id23470.diff (1 KB)
Attached To
Mode
D6959: Run everuthing regarding NotificationsCryptoModule with native Android Accessible
Attached
Detach File
Event Timeline
Log In to Comment