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 @@ -31,6 +31,12 @@ cls->getStaticMethod("getNotificationsCryptoAccountPath"); return method(cls)->toStdString(); } + + static bool isStaffRelease() { + static const auto cls = javaClassStatic(); + static auto method = cls->getStaticMethod("isStaffRelease"); + return method(cls); + } }; namespace comm { @@ -55,4 +61,12 @@ return path; } +bool PlatformSpecificTools::isStaffRelease() { + bool staffRelease; + NativeAndroidAccessProvider::runTask([&staffRelease]() { + staffRelease = PlatformSpecificToolsJavaClass::isStaffRelease(); + }); + return staffRelease; +} + } // namespace comm diff --git a/native/android/app/src/main/java/app/comm/android/fbjni/PlatformSpecificTools.java b/native/android/app/src/main/java/app/comm/android/fbjni/PlatformSpecificTools.java --- a/native/android/app/src/main/java/app/comm/android/fbjni/PlatformSpecificTools.java +++ b/native/android/app/src/main/java/app/comm/android/fbjni/PlatformSpecificTools.java @@ -26,4 +26,8 @@ .getFileStreamPath("comm_notifications_crypto_account") .getPath(); } + + public static boolean isStaffRelease() { + return false; + } } diff --git a/native/cpp/CommonCpp/Tools/PlatformSpecificTools.h b/native/cpp/CommonCpp/Tools/PlatformSpecificTools.h --- a/native/cpp/CommonCpp/Tools/PlatformSpecificTools.h +++ b/native/cpp/CommonCpp/Tools/PlatformSpecificTools.h @@ -9,6 +9,7 @@ static void generateSecureRandomBytes(crypto::OlmBuffer &buffer, size_t size); static std::string getDeviceOS(); static std::string getNotificationsCryptoAccountPath(); + static bool isStaffRelease(); }; } // namespace comm 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 @@ -37,4 +37,8 @@ .path UTF8String]); } +bool PlatformSpecificTools::isStaffRelease() { + return false; +} + }; // namespace comm