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

Commit 4898b704 authored by Jeff Davidson's avatar Jeff Davidson Committed by Gerrit Code Review
Browse files

Merge "Rename getDataEnabled() to isDataEnabled()."

parents 998eb212 9a7d6bb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38123,7 +38123,6 @@ package android.telephony {
    method public android.os.PersistableBundle getCarrierConfig();
    method public deprecated android.telephony.CellLocation getCellLocation();
    method public int getDataActivity();
    method public boolean getDataEnabled();
    method public int getDataNetworkType();
    method public int getDataState();
    method public deprecated java.lang.String getDeviceId();
@@ -38169,6 +38168,7 @@ package android.telephony {
    method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
    method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
    method public boolean isConcurrentVoiceAndDataAllowed();
    method public boolean isDataEnabled();
    method public boolean isHearingAidCompatibilitySupported();
    method public boolean isNetworkRoaming();
    method public boolean isSmsCapable();
+3 −2
Original line number Diff line number Diff line
@@ -41334,8 +41334,8 @@ package android.telephony {
    method public int getCurrentPhoneType();
    method public int getCurrentPhoneType(int);
    method public int getDataActivity();
    method public boolean getDataEnabled();
    method public boolean getDataEnabled(int);
    method public deprecated boolean getDataEnabled();
    method public deprecated boolean getDataEnabled(int);
    method public int getDataNetworkType();
    method public int getDataState();
    method public deprecated java.lang.String getDeviceId();
@@ -41385,6 +41385,7 @@ package android.telephony {
    method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
    method public boolean isConcurrentVoiceAndDataAllowed();
    method public boolean isDataConnectivityPossible();
    method public boolean isDataEnabled();
    method public boolean isHearingAidCompatibilitySupported();
    method public boolean isIdle();
    method public boolean isNetworkRoaming();
+1 −1
Original line number Diff line number Diff line
@@ -38222,7 +38222,6 @@ package android.telephony {
    method public android.os.PersistableBundle getCarrierConfig();
    method public deprecated android.telephony.CellLocation getCellLocation();
    method public int getDataActivity();
    method public boolean getDataEnabled();
    method public int getDataNetworkType();
    method public int getDataState();
    method public deprecated java.lang.String getDeviceId();
@@ -38268,6 +38267,7 @@ package android.telephony {
    method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
    method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
    method public boolean isConcurrentVoiceAndDataAllowed();
    method public boolean isDataEnabled();
    method public boolean isHearingAidCompatibilitySupported();
    method public boolean isNetworkRoaming();
    method public boolean isSmsCapable();
+25 −6
Original line number Diff line number Diff line
@@ -5279,23 +5279,42 @@ public class TelephonyManager {
        }
    }


    /**
     * @deprecated use {@link #isDataEnabled()} instead.
     * @hide
     */
    @SystemApi
    @Deprecated
    public boolean getDataEnabled() {
        return isDataEnabled();
    }

    /**
     * Returns whether mobile data is enabled or not.
     *
     * <p>Requires Permission:
     * <p>Requires one of the following permissions:
     * {@link android.Manifest.permission#ACCESS_NETWORK_STATE ACCESS_NETWORK_STATE},
     * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or that the
     * calling app has carrier privileges.
     *
     * <p>Note that this does not take into account any data restrictions that may be present on the
     * calling app. Such restrictions may be inspected with
     * {@link ConnectivityManager#getRestrictBackgroundStatus}.
     *
     * @return true if mobile data is enabled.
     *
     * @see #hasCarrierPrivileges
     */
    public boolean getDataEnabled() {
    @SuppressWarnings("deprecation")
    public boolean isDataEnabled() {
        return getDataEnabled(getSubId());
    }

    /** @hide */
    /**
     * @deprecated use {@link #isDataEnabled(int)} instead.
     * @hide
     */
    @SystemApi
    public boolean getDataEnabled(int subId) {
        boolean retVal = false;