diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-24 14:47:20 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-24 14:47:20 +0000 |
commit | b736151c2bb6c68f700d38274d740a6e0cf59a49 (patch) | |
tree | 83e110a7205757addba6e86a3c2367e4b52afa05 /src/android | |
parent | ff76300a5c9f209f625384f35ad0fdb0acebd799 (diff) | |
parent | 1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java index c434cc24b3..66600512a0 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java @@ -101,6 +101,7 @@ public class QtActivityDelegate private Method m_super_onConfigurationChanged = null; private Method m_super_onActivityResult = null; private Method m_super_dispatchGenericMotionEvent = null; + private Method m_super_onWindowFocusChanged = null; private static final String NATIVE_LIBRARIES_KEY = "native.libraries"; private static final String BUNDLED_LIBRARIES_KEY = "bundled.libraries"; @@ -516,6 +517,7 @@ public class QtActivityDelegate m_super_onKeyUp = m_activity.getClass().getMethod("super_onKeyUp", Integer.TYPE, KeyEvent.class); m_super_onConfigurationChanged = m_activity.getClass().getMethod("super_onConfigurationChanged", Configuration.class); m_super_onActivityResult = m_activity.getClass().getMethod("super_onActivityResult", Integer.TYPE, Integer.TYPE, Intent.class); + m_super_onWindowFocusChanged = m_activity.getClass().getMethod("super_onWindowFocusChanged", Boolean.TYPE); m_super_dispatchGenericMotionEvent = m_activity.getClass().getMethod("super_dispatchGenericMotionEvent", MotionEvent.class); } catch (Exception e) { e.printStackTrace(); @@ -917,6 +919,16 @@ public class QtActivityDelegate new QtAccessibilityDelegate(m_activity, m_layout, this); } + public void onWindowFocusChanged(boolean hasFocus) { + try { + m_super_onWindowFocusChanged.invoke(m_activity, hasFocus); + } catch (Exception e) { + e.printStackTrace(); + } + if (hasFocus) + updateFullScreen(); + } + public void onConfigurationChanged(Configuration configuration) { try { |