DO NOT MERGE Don't crash if already unregistered am: 07c129cb1a am: b39151b9f4
Change-Id: I652d05d4e8a3bba3b32ce9b59c68f06d7b886428
This commit is contained in:
@@ -2954,10 +2954,10 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
protected void unregisterService() throws RemoteException {
|
||||
Preconditions.checkState(mListenerTransport != null);
|
||||
|
||||
mService.unregisterGnssStatusCallback(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
if (mListenerTransport != null) {
|
||||
mService.unregisterGnssStatusCallback(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class GnssStatusListener extends IGnssStatusListener.Stub {
|
||||
@@ -3020,10 +3020,10 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
protected void unregisterService() throws RemoteException {
|
||||
Preconditions.checkState(mListenerTransport != null);
|
||||
|
||||
mService.removeGnssMeasurementsListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
if (mListenerTransport != null) {
|
||||
mService.removeGnssMeasurementsListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3073,10 +3073,10 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
protected void unregisterService() throws RemoteException {
|
||||
Preconditions.checkState(mListenerTransport != null);
|
||||
|
||||
mService.removeGnssNavigationMessageListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
if (mListenerTransport != null) {
|
||||
mService.removeGnssNavigationMessageListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class GnssNavigationMessageListener extends IGnssNavigationMessageListener.Stub {
|
||||
@@ -3114,10 +3114,10 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
protected void unregisterService() throws RemoteException {
|
||||
Preconditions.checkState(mListenerTransport != null);
|
||||
|
||||
mService.removeGnssAntennaInfoListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
if (mListenerTransport != null) {
|
||||
mService.removeGnssAntennaInfoListener(mListenerTransport);
|
||||
mListenerTransport = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class GnssAntennaInfoListener extends IGnssAntennaInfoListener.Stub {
|
||||
@@ -3151,10 +3151,10 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
protected void unregisterService() throws RemoteException {
|
||||
Preconditions.checkState(mListenerTransport != null);
|
||||
|
||||
mService.removeGnssBatchingCallback();
|
||||
mListenerTransport = null;
|
||||
if (mListenerTransport != null) {
|
||||
mService.removeGnssBatchingCallback();
|
||||
mListenerTransport = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class BatchedLocationCallback extends IBatchedLocationCallback.Stub {
|
||||
|
||||
Reference in New Issue
Block a user