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
This commit is contained in:
@@ -38160,7 +38160,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 boolean getDataEnabled();
|
||||
method public int getDataNetworkType();
|
||||
|
||||
@@ -41373,7 +41373,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();
|
||||
|
||||
@@ -38259,7 +38259,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 boolean getDataEnabled();
|
||||
method public int getDataNetworkType();
|
||||
|
||||
@@ -1035,14 +1035,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();
|
||||
|
||||
Reference in New Issue
Block a user