Page MenuHomePhabricator

D8803.id29854.diff
No OneTemporary

D8803.id29854.diff

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<JString()>("getNotificationsCryptoAccountPath");
return method(cls)->toStdString();
}
+
+ static bool isStaffRelease() {
+ static const auto cls = javaClassStatic();
+ static auto method = cls->getStaticMethod<jboolean()>("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

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 3:50 AM (15 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587613
Default Alt Text
D8803.id29854.diff (2 KB)

Event Timeline