From f5306d433a1e20698ab6b610ee429cd39ce1990f Mon Sep 17 00:00:00 2001 From: Soonil Nagarkar Date: Wed, 16 Oct 2019 15:09:32 -0700 Subject: Move registerGnssMeasurementsCallback onto direct executor Preserves behavior from previous releases for legacy clients. Bug: 141887245 Test: CTS Change-Id: I75bb38b2ed65cca13068d7727343c6f0782ef9d8 --- location/java/android/location/LocationManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'location/java/android') diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 0b3e1c3f57d3..70bfb5428d3c 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1971,7 +1971,7 @@ public class LocationManager { public void removeGpsMeasurementListener(GpsMeasurementsEvent.Listener listener) {} /** - * Registers a GPS Measurement callback. + * Registers a GPS Measurement callback which will run on a binder threadS. * * @param callback a {@link GnssMeasurementsEvent.Callback} object to register. * @return {@code true} if the callback was added successfully, {@code false} otherwise. @@ -1983,7 +1983,7 @@ public class LocationManager { @RequiresPermission(ACCESS_FINE_LOCATION) public boolean registerGnssMeasurementsCallback( @NonNull GnssMeasurementsEvent.Callback callback) { - return registerGnssMeasurementsCallback(callback, null); + return registerGnssMeasurementsCallback(Runnable::run, callback); } /** -- cgit v1.2.3-59-g8ed1b