am bde7bc45: GpsLocationProvider: Read data enabled status from TelephonyManager.

* commit 'bde7bc45af2bb7f9bee8096d45973f25cc00c5db':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
This commit is contained in:
Shishir Agrawal
2015-01-09 01:35:16 +00:00
committed by Android Git Automerger

View File

@@ -788,9 +788,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
} }
if (info != null) { if (info != null) {
boolean dataEnabled = TelephonyManager.getIntWithSubId(mContext.getContentResolver(), boolean dataEnabled = TelephonyManager.getDefault() != null ?
Settings.Global.MOBILE_DATA, SubscriptionManager.getDefaultSubId(), TelephonyManager.getDefault().getDataEnabled() : true;
1) == 1;
boolean networkAvailable = info.isAvailable() && dataEnabled; boolean networkAvailable = info.isAvailable() && dataEnabled;
String defaultApn = getSelectedApn(); String defaultApn = getSelectedApn();
if (defaultApn == null) { if (defaultApn == null) {