Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372911
D8803.id29942.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D8803.id29942.diff
View Options
diff --git a/native/android/app/CMakeLists.txt b/native/android/app/CMakeLists.txt
--- a/native/android/app/CMakeLists.txt
+++ b/native/android/app/CMakeLists.txt
@@ -115,6 +115,7 @@
"./src/cpp/ThreadOperationsJNIHelper.cpp"
"./src/cpp/jsiInstaller.cpp"
"./src/cpp/NotificationsCryptoModuleJNIHelper.cpp"
+ "./src/cpp/StaffUtilsJNIHelper.cpp"
)
list(APPEND GENERATED_NATIVE_CODE
diff --git a/native/android/app/src/cpp/PlatformSpecificTools.cpp b/native/android/app/src/cpp/PlatformSpecificTools.cpp
--- a/native/android/app/src/cpp/PlatformSpecificTools.cpp
+++ b/native/android/app/src/cpp/PlatformSpecificTools.cpp
@@ -54,5 +54,4 @@
});
return path;
}
-
} // namespace comm
diff --git a/native/android/app/src/cpp/StaffUtilsJNIHelper.cpp b/native/android/app/src/cpp/StaffUtilsJNIHelper.cpp
new file mode 100644
--- /dev/null
+++ b/native/android/app/src/cpp/StaffUtilsJNIHelper.cpp
@@ -0,0 +1,14 @@
+#include <Tools/StaffUtils.h>
+#include <Tools/StaffUtilsJNIHelper.h>
+
+namespace comm {
+bool StaffUtilsJNIHelper::isStaffRelease(
+ facebook::jni::alias_ref<StaffUtilsJNIHelper> jThis) {
+ return StaffUtils::isStaffRelease();
+}
+
+void StaffUtilsJNIHelper::registerNatives() {
+ javaClassStatic()->registerNatives({makeNativeMethod(
+ "isStaffRelease", StaffUtilsJNIHelper::isStaffRelease)});
+}
+} // namespace comm
\ No newline at end of file
diff --git a/native/android/app/src/cpp/jsiInstaller.cpp b/native/android/app/src/cpp/jsiInstaller.cpp
--- a/native/android/app/src/cpp/jsiInstaller.cpp
+++ b/native/android/app/src/cpp/jsiInstaller.cpp
@@ -13,6 +13,7 @@
#include <Notifications/BackgroundDataStorage/NotificationsCryptoModuleJNIHelper.h>
#include <PersistentStorageUtilities/MessageOperationsUtilities/MessageOperationsUtilitiesJNIHelper.h>
#include <PersistentStorageUtilities/ThreadOperationsUtilities/ThreadOperationsJNIHelper.h>
+#include <Tools/StaffUtilsJNIHelper.h>
namespace jni = facebook::jni;
namespace jsi = facebook::jsi;
@@ -82,5 +83,6 @@
comm::GlobalDBSingletonJNIHelper::registerNatives();
comm::DatabaseInitializerJNIHelper::registerNatives();
comm::NotificationsCryptoModuleJNIHelper::registerNatives();
+ comm::StaffUtilsJNIHelper::registerNatives();
});
}
diff --git a/native/android/app/src/main/java/app/comm/android/fbjni/StaffUtils.java b/native/android/app/src/main/java/app/comm/android/fbjni/StaffUtils.java
new file mode 100644
--- /dev/null
+++ b/native/android/app/src/main/java/app/comm/android/fbjni/StaffUtils.java
@@ -0,0 +1,5 @@
+package app.comm.android.fbjni;
+
+public class StaffUtils {
+ public static native boolean isStaffRelease();
+}
\ No newline at end of file
diff --git a/native/cpp/CommonCpp/Tools/CMakeLists.txt b/native/cpp/CommonCpp/Tools/CMakeLists.txt
--- a/native/cpp/CommonCpp/Tools/CMakeLists.txt
+++ b/native/cpp/CommonCpp/Tools/CMakeLists.txt
@@ -6,11 +6,13 @@
set(TOOLS_HDRS
"Base64.h"
"WorkerThread.h"
+ "StaffUtils.h"
)
set(TOOLS_SRCS
"Base64.cpp"
"WorkerThread.cpp"
+ "StaffUtils.cpp"
)
add_library(comm-tools
diff --git a/native/cpp/CommonCpp/Tools/StaffUtils.h b/native/cpp/CommonCpp/Tools/StaffUtils.h
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/Tools/StaffUtils.h
@@ -0,0 +1,8 @@
+#pragma once
+
+namespace comm {
+class StaffUtils {
+public:
+ static bool isStaffRelease();
+};
+} // namespace comm
\ No newline at end of file
diff --git a/native/cpp/CommonCpp/Tools/StaffUtils.cpp b/native/cpp/CommonCpp/Tools/StaffUtils.cpp
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/Tools/StaffUtils.cpp
@@ -0,0 +1,7 @@
+#include "StaffUtils.h"
+
+namespace comm {
+bool StaffUtils::isStaffRelease() {
+ return false;
+}
+} // namespace comm
\ No newline at end of file
diff --git a/native/cpp/CommonCpp/Tools/StaffUtilsJNIHelper.h b/native/cpp/CommonCpp/Tools/StaffUtilsJNIHelper.h
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/Tools/StaffUtilsJNIHelper.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <fbjni/fbjni.h>
+
+namespace comm {
+class StaffUtilsJNIHelper
+ : public facebook::jni::JavaClass<StaffUtilsJNIHelper> {
+public:
+ static auto constexpr kJavaDescriptor = "Lapp/comm/android/fbjni/StaffUtils;";
+ static bool
+ isStaffRelease(facebook::jni::alias_ref<StaffUtilsJNIHelper> jThis);
+ static void registerNatives();
+};
+
+} // namespace comm
\ No newline at end of file
diff --git a/native/ios/Comm/PlatformSpecificTools.mm b/native/ios/Comm/PlatformSpecificTools.mm
--- a/native/ios/Comm/PlatformSpecificTools.mm
+++ b/native/ios/Comm/PlatformSpecificTools.mm
@@ -36,5 +36,4 @@
URLByAppendingPathComponent:@"comm_notifications_crypto_account"]
.path UTF8String]);
}
-
}; // namespace comm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 8:14 AM (19 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2589582
Default Alt Text
D8803.id29942.diff (4 KB)
Attached To
Mode
D8803: Implement isStaffRelease method in PlatformSpecificTools
Attached
Detach File
Event Timeline
Log In to Comment