diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-12-19 14:07:45 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2019-01-02 11:29:44 +0000 |
commit | 04ce8e7f5b7476a08d4f85287e5afb9976ec2d8c (patch) | |
tree | 7d6cb080e4bc94a03b035994a8f9c9c4804b219f | |
parent | 1e24cec7e3ebf5f62f5440d848caf6cd9db1e456 (diff) | |
download | qtlocation-04ce8e7f5b7476a08d4f85287e5afb9976ec2d8c.tar.gz |
Fix QGeoPositionInfoSource::supportedPositioningMethods() on Android
So far this method returned all existing positioning methods and not
the available methods. Availability is defined by customer settings
like turning location off or only enabling GPS based positioning.
Task-number: QTBUG-66427
Change-Id: Id5b58ee4cc0274bae90ed2e363cb5cf2a287dc05
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
-rw-r--r-- | src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java | 2 |
1 files changed, 1 insertions, 1 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 1ea0c071..1a53512d 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 @@ -114,7 +114,7 @@ public class QtPositioning implements LocationListener Log.w(TAG, "No locationManager available in QtPositioning"); return new int[0]; } - List<String> providers = locationManager.getAllProviders(); + List<String> providers = locationManager.getProviders(true); int retList[] = new int[providers.size()]; for (int i = 0; i < providers.size(); i++) { if (providers.get(i).equals(LocationManager.GPS_PROVIDER)) { |