Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c914467 authored by Bryce Lee's avatar Bryce Lee
Browse files

Revert "GpsLocationProvider: Read data enabled status from TelephonyManager."

This reverts commit fabbdf72.

Causes NPE on devices without telephony (Android Wear for example)
Bug:18922524

Change-Id: I3be4187a20da11fd5a302dd88e808a68cd7e5737
parent fabbdf72
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {