diff --git a/api/current.txt b/api/current.txt index 8c6df728d1b64..fada9aad6c052 100644 --- a/api/current.txt +++ b/api/current.txt @@ -40055,7 +40055,7 @@ package android.telephony { method public java.util.List getAllCellInfo(); method public int getCallState(); method public android.os.PersistableBundle getCarrierConfig(); - method public android.telephony.CellLocation getCellLocation(); + method public deprecated android.telephony.CellLocation getCellLocation(); method public int getDataActivity(); method public int getDataNetworkType(); method public int getDataState(); diff --git a/api/system-current.txt b/api/system-current.txt index c4361ac1d738e..29a869f4eb0a0 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -43540,7 +43540,7 @@ package android.telephony { method public java.lang.String getCdmaMdn(int); method public java.lang.String getCdmaMin(); method public java.lang.String getCdmaMin(int); - method public android.telephony.CellLocation getCellLocation(); + method public deprecated android.telephony.CellLocation getCellLocation(); method public int getCurrentPhoneType(); method public int getCurrentPhoneType(int); method public int getDataActivity(); diff --git a/api/test-current.txt b/api/test-current.txt index 3470d2cdd641e..5c8edac69edbb 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -40255,7 +40255,7 @@ package android.telephony { method public java.util.List getAllCellInfo(); method public int getCallState(); method public android.os.PersistableBundle getCarrierConfig(); - method public android.telephony.CellLocation getCellLocation(); + method public deprecated android.telephony.CellLocation getCellLocation(); method public int getDataActivity(); method public int getDataNetworkType(); method public int getDataState(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 3f079bbe7d541..77da89709d659 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1093,14 +1093,15 @@ public class TelephonyManager { * this method will return null. The implementation must not to try add LTE * identifiers into the existing cdma/gsm classes. *

- * In the future this call will be deprecated. - *

* @return Current location of the device or null if not available. * *

Requires Permission: * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION} or * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION}. + * + * @deprecated use {@link #getAllCellInfo} instead, which returns a superset of this API. */ + @Deprecated public CellLocation getCellLocation() { try { ITelephony telephony = getITelephony();