Merge pull request #114 from outspace/dev
Set security screen for Android app
This commit is contained in:
commit
59248b7c2e
1 changed files with 11 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
|
#include <QtAndroid>
|
||||||
#include "platforms/android/android_controller.h"
|
#include "platforms/android/android_controller.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -23,7 +24,16 @@ StartPageLogic::StartPageLogic(UiLogic *logic, QObject *parent):
|
||||||
m_pushButtonBackFromStartVisible{true},
|
m_pushButtonBackFromStartVisible{true},
|
||||||
m_ipAddressPortRegex{Utils::ipAddressPortRegExp()}
|
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<void>("addFlags", "(I)V", FLAG_SECURE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartPageLogic::onUpdatePage()
|
void StartPageLogic::onUpdatePage()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue