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

automerge: 2db7977

* commit '2db79771b6a92d9db6b670b000990d6a3398364d':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
This commit is contained in:
Shishir Agrawal
2015-01-09 01:39:02 +00:00
committed by android-build-merger

View File

@@ -788,9 +788,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
}
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) {