summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nathan Harold <nharold@google.com> 2017-04-07 10:56:05 -0700
committer Nathan Harold <nharold@google.com> 2017-04-10 18:04:39 -0700
commit33dd867f86f0941192a7e09e994d910e874bcd0c (patch)
tree73ed7f64530309fecbf133c790c1da5290f7e3d3
parentec8f35366851fcfea2d8b8e42821dda72bdca344 (diff)
Deprecate TelephonyManager.getCellLocation()
This API has been long-marked for deprecation. It has numerous problems: -It does not support LTE -It returns a limited subset of information -It uses old (and poorly-chosen) sentinel values for fields that are not provided. Bug: 36076138 Test: compilation Change-Id: I87004710e5d046d4534ad3a0a938540440b0e83b (cherry picked from commit c12d6c5983a11ca989a85dd553d11c3583ff7aaf)
-rw-r--r--api/current.txt2
-rw-r--r--api/system-current.txt2
-rw-r--r--api/test-current.txt2
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java5
4 files changed, 6 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 7c532d4b8ffa..39590258e5e5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -40067,7 +40067,7 @@ package android.telephony {
method public java.util.List<android.telephony.CellInfo> 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 99a579321c79..0dd1430739f3 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -43552,7 +43552,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 570855fb0043..2d10fc29d14b 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -40266,7 +40266,7 @@ package android.telephony {
method public java.util.List<android.telephony.CellInfo> 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 1fd1929dbe01..9240247e0c2b 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1087,14 +1087,15 @@ public class TelephonyManager {
* this method will return null. The implementation must not to try add LTE
* identifiers into the existing cdma/gsm classes.
*<p>
- * In the future this call will be deprecated.
- *<p>
* @return Current location of the device or null if not available.
*
* <p>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();