From d37b9bff1e93f7c9bc60de4079fce3c4429547ea Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Wed, 16 Sep 2020 11:20:02 -0700 Subject: [PATCH] Deprecate CellLocation Classes All ways of getting CellLocation are deprecated. Thus, we can deprecate the CellLocation classes themselves. Bug: 168710953 Test: make update-api && make offline-sdk-docs \ && make; (no functional change) Change-Id: I60aed126894d9b4bb495a24aeb8ffdd2af236809 --- api/current.txt | 50 +++++++++---------- non-updatable-api/current.txt | 50 +++++++++---------- .../java/android/telephony/CellLocation.java | 3 ++ .../telephony/cdma/CdmaCellLocation.java | 3 ++ .../telephony/gsm/GsmCellLocation.java | 3 ++ 5 files changed, 59 insertions(+), 50 deletions(-) diff --git a/api/current.txt b/api/current.txt index abcc50e91f540..ce0e144001b56 100644 --- a/api/current.txt +++ b/api/current.txt @@ -47035,9 +47035,9 @@ package android.telephony { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public abstract class CellLocation { - ctor public CellLocation(); - method public static android.telephony.CellLocation getEmpty(); + @Deprecated public abstract class CellLocation { + ctor @Deprecated public CellLocation(); + method @Deprecated public static android.telephony.CellLocation getEmpty(); method @Deprecated public static void requestLocationUpdate(); } @@ -48544,19 +48544,19 @@ package android.telephony { package android.telephony.cdma { - public class CdmaCellLocation extends android.telephony.CellLocation { - ctor public CdmaCellLocation(); - ctor public CdmaCellLocation(android.os.Bundle); - method public static double convertQuartSecToDecDegrees(int); - method public void fillInNotifierBundle(android.os.Bundle); - method public int getBaseStationId(); - method public int getBaseStationLatitude(); - method public int getBaseStationLongitude(); - method public int getNetworkId(); - method public int getSystemId(); - method public void setCellLocationData(int, int, int); - method public void setCellLocationData(int, int, int, int, int); - method public void setStateInvalid(); + @Deprecated public class CdmaCellLocation extends android.telephony.CellLocation { + ctor @Deprecated public CdmaCellLocation(); + ctor @Deprecated public CdmaCellLocation(android.os.Bundle); + method @Deprecated public static double convertQuartSecToDecDegrees(int); + method @Deprecated public void fillInNotifierBundle(android.os.Bundle); + method @Deprecated public int getBaseStationId(); + method @Deprecated public int getBaseStationLatitude(); + method @Deprecated public int getBaseStationLongitude(); + method @Deprecated public int getNetworkId(); + method @Deprecated public int getSystemId(); + method @Deprecated public void setCellLocationData(int, int, int); + method @Deprecated public void setCellLocationData(int, int, int, int, int); + method @Deprecated public void setStateInvalid(); } } @@ -48756,15 +48756,15 @@ package android.telephony.euicc { package android.telephony.gsm { - public class GsmCellLocation extends android.telephony.CellLocation { - ctor public GsmCellLocation(); - ctor public GsmCellLocation(android.os.Bundle); - method public void fillInNotifierBundle(android.os.Bundle); - method public int getCid(); - method public int getLac(); - method public int getPsc(); - method public void setLacAndCid(int, int); - method public void setStateInvalid(); + @Deprecated public class GsmCellLocation extends android.telephony.CellLocation { + ctor @Deprecated public GsmCellLocation(); + ctor @Deprecated public GsmCellLocation(android.os.Bundle); + method @Deprecated public void fillInNotifierBundle(android.os.Bundle); + method @Deprecated public int getCid(); + method @Deprecated public int getLac(); + method @Deprecated public int getPsc(); + method @Deprecated public void setLacAndCid(int, int); + method @Deprecated public void setStateInvalid(); } @Deprecated public final class SmsManager { diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt index 768db76dc32dc..c36c9f9a7e8e3 100644 --- a/non-updatable-api/current.txt +++ b/non-updatable-api/current.txt @@ -45203,9 +45203,9 @@ package android.telephony { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public abstract class CellLocation { - ctor public CellLocation(); - method public static android.telephony.CellLocation getEmpty(); + @Deprecated public abstract class CellLocation { + ctor @Deprecated public CellLocation(); + method @Deprecated public static android.telephony.CellLocation getEmpty(); method @Deprecated public static void requestLocationUpdate(); } @@ -46712,19 +46712,19 @@ package android.telephony { package android.telephony.cdma { - public class CdmaCellLocation extends android.telephony.CellLocation { - ctor public CdmaCellLocation(); - ctor public CdmaCellLocation(android.os.Bundle); - method public static double convertQuartSecToDecDegrees(int); - method public void fillInNotifierBundle(android.os.Bundle); - method public int getBaseStationId(); - method public int getBaseStationLatitude(); - method public int getBaseStationLongitude(); - method public int getNetworkId(); - method public int getSystemId(); - method public void setCellLocationData(int, int, int); - method public void setCellLocationData(int, int, int, int, int); - method public void setStateInvalid(); + @Deprecated public class CdmaCellLocation extends android.telephony.CellLocation { + ctor @Deprecated public CdmaCellLocation(); + ctor @Deprecated public CdmaCellLocation(android.os.Bundle); + method @Deprecated public static double convertQuartSecToDecDegrees(int); + method @Deprecated public void fillInNotifierBundle(android.os.Bundle); + method @Deprecated public int getBaseStationId(); + method @Deprecated public int getBaseStationLatitude(); + method @Deprecated public int getBaseStationLongitude(); + method @Deprecated public int getNetworkId(); + method @Deprecated public int getSystemId(); + method @Deprecated public void setCellLocationData(int, int, int); + method @Deprecated public void setCellLocationData(int, int, int, int, int); + method @Deprecated public void setStateInvalid(); } } @@ -46924,15 +46924,15 @@ package android.telephony.euicc { package android.telephony.gsm { - public class GsmCellLocation extends android.telephony.CellLocation { - ctor public GsmCellLocation(); - ctor public GsmCellLocation(android.os.Bundle); - method public void fillInNotifierBundle(android.os.Bundle); - method public int getCid(); - method public int getLac(); - method public int getPsc(); - method public void setLacAndCid(int, int); - method public void setStateInvalid(); + @Deprecated public class GsmCellLocation extends android.telephony.CellLocation { + ctor @Deprecated public GsmCellLocation(); + ctor @Deprecated public GsmCellLocation(android.os.Bundle); + method @Deprecated public void fillInNotifierBundle(android.os.Bundle); + method @Deprecated public int getCid(); + method @Deprecated public int getLac(); + method @Deprecated public int getPsc(); + method @Deprecated public void setLacAndCid(int, int); + method @Deprecated public void setStateInvalid(); } @Deprecated public final class SmsManager { diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java index cdf735195d615..8f5ec365e65c8 100644 --- a/telephony/java/android/telephony/CellLocation.java +++ b/telephony/java/android/telephony/CellLocation.java @@ -29,7 +29,10 @@ import com.android.internal.telephony.PhoneConstants; /** * Abstract class that represents the location of the device. {@more} + * + * @deprecated use {@link android.telephony.CellIdentity CellIdentity}. */ +@Deprecated public abstract class CellLocation { /** diff --git a/telephony/java/android/telephony/cdma/CdmaCellLocation.java b/telephony/java/android/telephony/cdma/CdmaCellLocation.java index 9bc39a0c6ced8..d808cabaaa926 100644 --- a/telephony/java/android/telephony/cdma/CdmaCellLocation.java +++ b/telephony/java/android/telephony/cdma/CdmaCellLocation.java @@ -23,7 +23,10 @@ import android.telephony.CellLocation; /** * Represents the cell location on a CDMA phone. + * + * @deprecated use {@link android.telephony.CellIdentity CellIdentity}. */ +@Deprecated public class CdmaCellLocation extends CellLocation { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private int mBaseStationId = -1; diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java index 30cea0e6dd597..508644f6f2832 100644 --- a/telephony/java/android/telephony/gsm/GsmCellLocation.java +++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java @@ -23,7 +23,10 @@ import android.telephony.CellLocation; /** * Represents the cell location on a GSM phone. + * + * @deprecated use {@link android.telephony.CellIdentity CellIdentity}. */ +@Deprecated public class GsmCellLocation extends CellLocation { private int mLac; private int mCid;