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

Commit bde7bc45 authored by Shishir Agrawal's avatar Shishir Agrawal
Browse files

GpsLocationProvider: Read data enabled status from TelephonyManager.

Bug: 18814559
Change-Id: Ie8edde652565aca2e2a1935ed42eb927b7d26baa
parent 2cc617b2
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -788,9 +788,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
        }

        if (info != null) {
            boolean dataEnabled = TelephonyManager.getIntWithSubId(mContext.getContentResolver(),
                    Settings.Global.MOBILE_DATA, SubscriptionManager.getDefaultSubId(),
                    1) == 1;
            boolean dataEnabled = TelephonyManager.getDefault() != null ?
                TelephonyManager.getDefault().getDataEnabled() : true;
            boolean networkAvailable = info.isAvailable() && dataEnabled;
            String defaultApn = getSelectedApn();
            if (defaultApn == null) {