Merge "Revert "GpsLocationProvider: Read data enabled status from TelephonyManager."" into lmp-mr1-dev

This commit is contained in:
Bryce Lee
2015-01-08 04:30:12 +00:00
committed by Android (Google) Code Review

View File

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