From e395e79145ff861b2dd87e404d229d769a19ab7e Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 20 Sep 2016 12:53:39 +0200 Subject: [PATCH] Fix QtNative.checkSelfPermission() Only return activity object when available and *not* when unavailable. Task-number: QTBUG-55035 Task-number: QTBUG-50759 Change-Id: I60b1be528b2e4a3d630f4085b7642d74e18482bd Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: BogDan Vatra --- src/android/jar/src/org/qtproject/qt5/android/QtNative.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java index 6876aac11f..af4f20679c 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -456,7 +456,7 @@ public class QtNative } public static Context getContext() { - if (m_activity == null) + if (m_activity != null) return m_activity; return m_service; }