From 748e9d59792184e6a2122c78d51ab7ea8fa8d559 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Thu, 25 Jun 2015 14:24:54 -0700 Subject: [PATCH] Deprecate TelephonyManager.getNeighboringCellInfo() bug: 22121990 Change-Id: Id8f9d080fdd1e2993b414a5304424238396b6fd4 --- api/current.txt | 2 +- api/system-current.txt | 2 +- .../java/android/telephony/TelephonyManager.java | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/current.txt b/api/current.txt index 2d51b97b937eb..33e4182dc0ed2 100644 --- a/api/current.txt +++ b/api/current.txt @@ -31080,7 +31080,7 @@ package android.telephony { method public java.lang.String getLine1Number(); method public java.lang.String getMmsUAProfUrl(); method public java.lang.String getMmsUserAgent(); - method public java.util.List getNeighboringCellInfo(); + method public deprecated java.util.List getNeighboringCellInfo(); method public java.lang.String getNetworkCountryIso(); method public java.lang.String getNetworkOperator(); method public java.lang.String getNetworkOperatorName(); diff --git a/api/system-current.txt b/api/system-current.txt index 33c7a1b1213ad..d862566a32640 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -33336,7 +33336,7 @@ package android.telephony { method public java.lang.String getLine1Number(); method public java.lang.String getMmsUAProfUrl(); method public java.lang.String getMmsUserAgent(); - method public java.util.List getNeighboringCellInfo(); + method public deprecated java.util.List getNeighboringCellInfo(); method public java.lang.String getNetworkCountryIso(); method public java.lang.String getNetworkOperator(); method public java.lang.String getNetworkOperatorName(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index a2bd74b6d162a..ab2a98d31e75f 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -891,16 +891,17 @@ public class TelephonyManager { } /** - * Returns the neighboring cell information of the device. The getAllCellInfo is preferred - * and use this only if getAllCellInfo return nulls or an empty list. - *

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

+ * Returns the neighboring cell information of the device. + * * @return List of NeighboringCellInfo or null if info unavailable. * *

Requires Permission: * (@link android.Manifest.permission#ACCESS_COARSE_UPDATES} + * + * @deprecated Use (@link getAllCellInfo} which returns a superset of the information + * from NeighboringCellInfo. */ + @Deprecated public List getNeighboringCellInfo() { try { ITelephony telephony = getITelephony();