Skip to content
Snippets Groups Projects
Commit a1ea9a76 authored by SeeLook's avatar SeeLook
Browse files

Added exeption handling when JNI method is called - avoids crashes under Lolypop

parent f3e0a020
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@
#include "tandroid.h"
#include <QtAndroidExtras/qandroidfunctions.h>
#include <QtAndroidExtras/qandroidjnienvironment.h>
void Tandroid::setScreenLockDisabled() {
......@@ -30,6 +31,9 @@ void Tandroid::setScreenLockDisabled() {
const int FLAG_FULLSCREEN = 1024;
// const int FLAG_FORCE_NOT_FULLSCREEN = 2048;
window.callMethod<void>("addFlags", "(I)V", FLAG_KEEP_SCREEN_ON | FLAG_FULLSCREEN);
QAndroidJniEnvironment env;
if (env->ExceptionCheck())
env->ExceptionClear();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment