Revert "GpsLocationProvider: Read data enabled status from TelephonyManager."
This reverts commit fabbdf7204.
Causes NPE on devices without telephony (Android Wear for example)
Bug:18922524
Change-Id: I3be4187a20da11fd5a302dd88e808a68cd7e5737
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user