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

Commit c54a87e3 authored by Shishir Agrawal's avatar Shishir Agrawal Committed by Android Git Automerger
Browse files

am 6b274720: GpsLocationProvider: Read data enabled status from...

am 6b274720: GpsLocationProvider: Read data enabled status from TelephonyManager. automerge: 64ce5f8f

* commit '6b274720':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
parents d0d13d82 6b274720
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -788,9 +788,7 @@ 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().getDataEnabled();
            boolean networkAvailable = info.isAvailable() && dataEnabled;
            String defaultApn = getSelectedApn();
            if (defaultApn == null) {
+2 −2
Original line number Diff line number Diff line
@@ -3669,12 +3669,12 @@ public class TelephonyManager {
    /** @hide */
    @SystemApi
    public boolean getDataEnabled(int subId) {
        boolean retVal;
        boolean retVal = false;
        try {
            retVal = getITelephony().getDataEnabled(subId);
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#getDataEnabled", e);
            retVal = false;
        } catch (NullPointerException e) {
        }
        Log.d(TAG, "getDataEnabled: retVal=" + retVal);
        return retVal;