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

Commit bad6337b authored by Shishir Agrawal's avatar Shishir Agrawal Committed by android-build-merger
Browse files

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

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

* commit 'b7e04f32':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
parents d6686a62 b7e04f32
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -785,9 +785,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
@@ -3665,12 +3665,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;