Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b81c30db authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Fix remaining Handler mismatch

Use direct executor for backwards compatibility when
addGpsStatusListener is invoked not on a handler.

Bug: 143544726
Test: manual
Change-Id: I594e302962737154e29d8226d0c19dbdebd18cbb
parent cabc32d2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1835,7 +1835,7 @@ public class LocationManager {
        }

        try {
            return mGnssStatusListenerManager.addListener(listener, new Handler());
            return mGnssStatusListenerManager.addListener(listener, Runnable::run);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
@@ -2694,9 +2694,9 @@ public class LocationManager {
            return mTtff;
        }

        public boolean addListener(@NonNull GpsStatus.Listener listener, @NonNull Handler handler)
        public boolean addListener(@NonNull GpsStatus.Listener listener, @NonNull Executor executor)
                throws RemoteException {
            return addInternal(listener, handler);
            return addInternal(listener, executor);
        }

        public boolean addListener(@NonNull OnNmeaMessageListener listener,