@Override
    public synchronized void onClose() {
        super.onClose();
        if (phoneStateListener != null)
            telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE);
    }
@ Override public synchronized void onClose ( ) { super . onClose ( ) ; if ( phoneStateListener != null ) telephonyManager . listen ( phoneStateListener , PhoneStateListener . LISTEN_NONE ) ; }
Call this in {@link org.microg.nlp.api.LocationBackendService#onClose()}.