public void unbind ( ) { if ( serviceObject == null ) { return ; } serviceObject = null ; final Context context = contextRef . get ( ) ; if ( DEBUG ) { Log . v ( TAG , "Unbind " + context + " from " + getInterfaceClass ( ) ) ; } if ( context == null ) { return ; } try { context . unbindService ( this ) ; } catch ( final Exception e ) { if ( DEBUG ) { Log . e ( TAG , "Cannot unbind from application service" , e ) ; } } }
Destroy the service connection .