am bde7bc45: GpsLocationProvider: Read data enabled status from TelephonyManager.
automerge: 2db7977
* commit '2db79771b6a92d9db6b670b000990d6a3398364d':
GpsLocationProvider: Read data enabled status from TelephonyManager.
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index b46a450..2231ef0 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -788,9 +788,8 @@
}
if (info != null) {
- boolean dataEnabled = TelephonyManager.getIntWithSubId(mContext.getContentResolver(),
- Settings.Global.MOBILE_DATA, SubscriptionManager.getDefaultSubId(),
- 1) == 1;
+ boolean dataEnabled = TelephonyManager.getDefault() != null ?
+ TelephonyManager.getDefault().getDataEnabled() : true;
boolean networkAvailable = info.isAvailable() && dataEnabled;
String defaultApn = getSelectedApn();
if (defaultApn == null) {