Merge "Revert "GpsLocationProvider: Read data enabled status from TelephonyManager."" into lmp-mr1-dev automerge: c010c96
automerge: d1646dc
* commit 'd1646dcfd1d40bdc094f34e05c1359cfc3fa7c65':
Revert "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 337e1e3..b46a450 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -788,7 +788,9 @@
}
if (info != null) {
- boolean dataEnabled = TelephonyManager.getDefault().getDataEnabled();
+ boolean dataEnabled = TelephonyManager.getIntWithSubId(mContext.getContentResolver(),
+ Settings.Global.MOBILE_DATA, SubscriptionManager.getDefaultSubId(),
+ 1) == 1;
boolean networkAvailable = info.isAvailable() && dataEnabled;
String defaultApn = getSelectedApn();
if (defaultApn == null) {