diff options
author | BogDan Vatra <bogdan@kdab.com> | 2016-07-18 16:59:37 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-07-26 10:24:21 +0000 |
commit | 4e1008b4ac1eea776585ca41a6a3db127cf500ff (patch) | |
tree | d49bccb38dc533b2dfb077222c4edfd49d3ebf62 /src/plugins/position/android | |
parent | 9e09ee2d7f7fe33cd3273de75087f633e427cc3a (diff) | |
download | qtlocation-4e1008b4ac1eea776585ca41a6a3db127cf500ff.tar.gz |
This module doesn't need an Activity to work, a Context object is enough
Task-number: QTBUG-54506
Change-Id: Ic1fd0d3bc63e9fcdf24a29b26a3be3746bbf45ab
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins/position/android')
-rw-r--r-- | src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java b/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java index 43767f0e..ac718199 100644 --- a/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java +++ b/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java @@ -39,7 +39,6 @@ package org.qtproject.qt5.android.positioning; -import android.app.Activity; import android.content.Context; import android.location.GpsSatellite; import android.location.GpsStatus; @@ -100,10 +99,10 @@ public class QtPositioning implements LocationListener private PositioningLooper looperThread; - static public void setActivity(Activity activity, Object activityDelegate) + static public void setContext(Context context) { try { - locationManager = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE); + locationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE); } catch(Exception e) { e.printStackTrace(); } |