Merge "Deprecate CellLocation#requestLocationUpdate" am: 277f52a0f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1355809 Change-Id: I7b347a042c206e77e991178ab8c31dddec3a7385
This commit is contained in:
@@ -45143,7 +45143,7 @@ package android.telephony {
|
|||||||
public abstract class CellLocation {
|
public abstract class CellLocation {
|
||||||
ctor public CellLocation();
|
ctor public CellLocation();
|
||||||
method public static android.telephony.CellLocation getEmpty();
|
method public static android.telephony.CellLocation getEmpty();
|
||||||
method public static void requestLocationUpdate();
|
method @Deprecated public static void requestLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class CellSignalStrength {
|
public abstract class CellSignalStrength {
|
||||||
|
|||||||
@@ -44999,7 +44999,7 @@ package android.telephony {
|
|||||||
public abstract class CellLocation {
|
public abstract class CellLocation {
|
||||||
ctor public CellLocation();
|
ctor public CellLocation();
|
||||||
method public static android.telephony.CellLocation getEmpty();
|
method public static android.telephony.CellLocation getEmpty();
|
||||||
method public static void requestLocationUpdate();
|
method @Deprecated public static void requestLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class CellSignalStrength {
|
public abstract class CellSignalStrength {
|
||||||
|
|||||||
@@ -47,7 +47,14 @@ public abstract class CellLocation {
|
|||||||
*
|
*
|
||||||
* Callers wishing to request a single location update should use
|
* Callers wishing to request a single location update should use
|
||||||
* {@link TelephonyManager#requestCellInfoUpdate}.
|
* {@link TelephonyManager#requestCellInfoUpdate}.
|
||||||
|
*
|
||||||
|
* @deprecated this method has undesirable side-effects, and it calls into the OS without
|
||||||
|
* access to a {@link android.content.Context Context}, meaning that certain safety checks and
|
||||||
|
* attribution are error-prone. Given that this method has numerous downsides, and given that
|
||||||
|
* there are long-available superior alternatives, callers are strongly discouraged from using
|
||||||
|
* this method.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static void requestLocationUpdate() {
|
public static void requestLocationUpdate() {
|
||||||
// Since this object doesn't have a context, this is the best we can do.
|
// Since this object doesn't have a context, this is the best we can do.
|
||||||
final Context appContext = ActivityThread.currentApplication();
|
final Context appContext = ActivityThread.currentApplication();
|
||||||
|
|||||||
Reference in New Issue
Block a user