diff --git a/client/ui/pages_logic/StartPageLogic.cpp b/client/ui/pages_logic/StartPageLogic.cpp index de3173b5..1e28d6cd 100644 --- a/client/ui/pages_logic/StartPageLogic.cpp +++ b/client/ui/pages_logic/StartPageLogic.cpp @@ -11,6 +11,7 @@ #include #ifdef Q_OS_ANDROID +#include #include "platforms/android/android_controller.h" #endif @@ -23,7 +24,16 @@ StartPageLogic::StartPageLogic(UiLogic *logic, QObject *parent): m_pushButtonBackFromStartVisible{true}, m_ipAddressPortRegex{Utils::ipAddressPortRegExp()} { - +#ifdef Q_OS_ANDROID + // Set security screen for Android app + QtAndroid::runOnAndroidThread([]() { + QAndroidJniObject window = QtAndroid::androidActivity().callObjectMethod("getWindow", "()Landroid/view/Window;"); + if (window.isValid()){ + const int FLAG_SECURE = 8192; + window.callMethod("addFlags", "(I)V", FLAG_SECURE); + } + }); +#endif } void StartPageLogic::onUpdatePage()