Merge "Revert "GpsLocationProvider: Read data enabled status from TelephonyManager." as it reintroduces b/18922524" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cce8db2c31
@@ -788,8 +788,9 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
boolean dataEnabled = TelephonyManager.getDefault() != null ?
|
boolean dataEnabled = TelephonyManager.getIntWithSubId(mContext.getContentResolver(),
|
||||||
TelephonyManager.getDefault().getDataEnabled() : true;
|
Settings.Global.MOBILE_DATA, SubscriptionManager.getDefaultSubId(),
|
||||||
|
1) == 1;
|
||||||
boolean networkAvailable = info.isAvailable() && dataEnabled;
|
boolean networkAvailable = info.isAvailable() && dataEnabled;
|
||||||
String defaultApn = getSelectedApn();
|
String defaultApn = getSelectedApn();
|
||||||
if (defaultApn == null) {
|
if (defaultApn == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user