diff --git a/android/src/main/cpp/sonar.cpp b/android/src/main/cpp/sonar.cpp index fd2154154fc..84178df0784 100644 --- a/android/src/main/cpp/sonar.cpp +++ b/android/src/main/cpp/sonar.cpp @@ -811,6 +811,9 @@ class JFlipperClient : public jni::HybridClass { try { auto wrapper = std::make_shared(make_global(plugin)); + if (wrapper->identifier() == "UIPerf") { + wrapper->isDuplicationAllowed.store(true); + } FlipperClient::instance()->addPlugin(wrapper); } catch (const std::exception& e) { handleException(e); diff --git a/xplat/Flipper/FlipperPlugin.h b/xplat/Flipper/FlipperPlugin.h index f44815875f5..7faefa1b799 100644 --- a/xplat/Flipper/FlipperPlugin.h +++ b/xplat/Flipper/FlipperPlugin.h @@ -45,7 +45,7 @@ class FlipperPlugin { return false; } - bool isDuplicationAllowed = false; + std::atomic isDuplicationAllowed{false}; }; } // namespace flipper