Loading services/core/java/com/android/server/location/GpsLocationProvider.java +1 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading telephony/java/android/telephony/TelephonyManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading
services/core/java/com/android/server/location/GpsLocationProvider.java +1 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading
telephony/java/android/telephony/TelephonyManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading