GpsLocationProvider: Read data enabled status from TelephonyManager.
Bug: 18814559 Change-Id: Ie8edde652565aca2e2a1935ed42eb927b7d26baa
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user