diff options
author | Soonil Nagarkar <sooniln@google.com> | 2020-07-06 16:02:00 -0700 |
---|---|---|
committer | Soonil Nagarkar <sooniln@google.com> | 2020-07-06 16:31:35 -0700 |
commit | 7b6e6089af7b7d61e7f810007a369844560939e5 (patch) | |
tree | 241ad048a200f0e950df4bb57145eaf2b6cd1575 | |
parent | 66929380abd492b8c74d27abf1eb303198940741 (diff) |
DO NOT MERGE: Keep old callback thread
Discrepency between documented and delivered thread in prior versions
got confused. Switching back to the main thread for delivery when not
specified.
Bug: 160565229
Test: presubmit only
Change-Id: I6deaf08e2045771c120aa2eb35c64b392208bd58
-rw-r--r-- | location/java/android/location/LocationManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index f3c9e9435417..241e9399be0a 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1951,7 +1951,8 @@ public class LocationManager { } try { - return mGnssStatusListenerManager.addListener(listener, Runnable::run); + return mGnssStatusListenerManager.addListener(listener, + new HandlerExecutor(new Handler())); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -2086,7 +2087,7 @@ public class LocationManager { @Deprecated @RequiresPermission(ACCESS_FINE_LOCATION) public boolean addNmeaListener(@NonNull OnNmeaMessageListener listener) { - return addNmeaListener(Runnable::run, listener); + return addNmeaListener(listener, null); } /** |