Merge "Revert "GpsLocationProvider: Read data enabled status from TelephonyManager." as it reintroduces b/18922524" into lmp-mr1-dev

automerge: cce8db2

* commit 'cce8db2c31a03d0c4e04f5851415d37032ae6621':
  Revert "GpsLocationProvider: Read data enabled status from TelephonyManager." as it reintroduces b/18922524
This commit is contained in:
Ariel Gertzenstein
2015-01-09 17:59:15 +00:00
committed by android-build-merger

View File

@@ -788,8 +788,9 @@ public class GpsLocationProvider implements LocationProviderInterface {
}
if (info != null) {
boolean dataEnabled = TelephonyManager.getDefault() != null ?
TelephonyManager.getDefault().getDataEnabled() : true;
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) {