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 <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
Alex Blasche 2016-09-20 12:53:39 +02:00
parent 04cb6e2754
commit e395e79145

View File

@ -456,7 +456,7 @@ public class QtNative
} }
public static Context getContext() { public static Context getContext() {
if (m_activity == null) if (m_activity != null)
return m_activity; return m_activity;
return m_service; return m_service;
} }