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

Commit a9f4e2d2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Don't crash if already unregistered" into rvc-dev

parents c7206030 07c129cb
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -2954,11 +2954,11 @@ public class LocationManager {

        @Override
        protected void unregisterService() throws RemoteException {
            Preconditions.checkState(mListenerTransport != null);

            if (mListenerTransport != null) {
                mService.unregisterGnssStatusCallback(mListenerTransport);
                mListenerTransport = null;
            }
        }

        private class GnssStatusListener extends IGnssStatusListener.Stub {
            @Override
@@ -3020,11 +3020,11 @@ public class LocationManager {

        @Override
        protected void unregisterService() throws RemoteException {
            Preconditions.checkState(mListenerTransport != null);

            if (mListenerTransport != null) {
                mService.removeGnssMeasurementsListener(mListenerTransport);
                mListenerTransport = null;
            }
        }

        @Override
        @Nullable
@@ -3073,11 +3073,11 @@ public class LocationManager {

        @Override
        protected void unregisterService() throws RemoteException {
            Preconditions.checkState(mListenerTransport != null);

            if (mListenerTransport != null) {
                mService.removeGnssNavigationMessageListener(mListenerTransport);
                mListenerTransport = null;
            }
        }

        private class GnssNavigationMessageListener extends IGnssNavigationMessageListener.Stub {
            @Override
@@ -3114,11 +3114,11 @@ public class LocationManager {

        @Override
        protected void unregisterService() throws RemoteException {
            Preconditions.checkState(mListenerTransport != null);

            if (mListenerTransport != null) {
                mService.removeGnssAntennaInfoListener(mListenerTransport);
                mListenerTransport = null;
            }
        }

        private class GnssAntennaInfoListener extends IGnssAntennaInfoListener.Stub {
            @Override
@@ -3151,11 +3151,11 @@ public class LocationManager {

        @Override
        protected void unregisterService() throws RemoteException {
            Preconditions.checkState(mListenerTransport != null);

            if (mListenerTransport != null) {
                mService.removeGnssBatchingCallback();
                mListenerTransport = null;
            }
        }

        private class BatchedLocationCallback extends IBatchedLocationCallback.Stub {
            @Override