public void onDestroy() {
   if (mConnected) {
     mDevListAdapter.clearDevice();
     mDevListAdapter.notifyDataSetChanged();
     ((Activity) context).unbindService(mServiceConnection);
     mBluetoothLeService = null;
     mConnected = false;
   }
 }
 public void unbindUpnpService() {
   Log.d(TAG, "Unbind to service");
   m_isServiceReady = false;
   if (m_upnpService != null) {
     try {
       m_activity.unbindService(m_serviceConnection);
     } catch (Exception ex) {
       ex.printStackTrace();
     }
   }
 }
 public void unbindService(Class<? extends Service> serviceClass) {
   if (conns.containsKey(serviceClass)) {
     // retrieve connection
     VaporServiceConnection vsc = conns.get(serviceClass);
     // call to unbind from parent
     super.unbindService(vsc);
     // remove mapping
     // conns.remove(serviceClass); REMOVED IN vsc INSTANCE
   } else {
     Log.e(
         shortName + ".unbindService(Class<? extends Service>)",
         "No binding found for the class: " + serviceClass);
   }
 }
  @Override
  public void unbindService(ServiceConnection connection) {

    if (VaporServiceConnection.class.isAssignableFrom(connection.getClass())) {
      // attempt cast
      VaporServiceConnection vsc = ((VaporServiceConnection) connection);

      // delegate call to new method that can accept just the service
      // class
      unbindService(vsc.serviceClass());
    } else {
      Log.i(
          shortName + ".unbindService(ServiceConnection)", "Unbinding unmanaged ServiceConnection");
      super.unbindService(connection);
    }
  }
 /** Анбинд сервиса, происходит при отключении модуля wifi */
 public void doUnbindService() {
   if (mIsBound) {
     activity.unbindService(mConnection);
     mIsBound = false;
   }
 }
 /** Call when the activity is inside `onDestroy()` */
 public void onDestroy() {
   mContext.unbindService(accConn);
   mContext.unregisterReceiver(acBC);
 }
 /**
  * Unbinds the Activity from the Custom Tabs Service
  *
  * @param activity the activity that is connected to the service
  */
 public void unbindCustomTabsService(Activity activity) {
   if (mConnection == null) return;
   activity.unbindService(mConnection);
   mCustomTabsClient = null;
   mCustomTabsSession = null;
 }
Exemple #8
0
 public void callOffWebService() {
   engine.unbindService(serviceConnection);
 }
 public void unbindAIDLService() {
   if (mAIDLIsBound) {
     mActivity.unbindService(mAIDLConnection);
     mAIDLIsBound = false;
   }
 }
 public void unbindRemoteService() {
   if (mRemoteServiceIsBound) {
     mActivity.unbindService(mRemoteConnection);
     mRemoteServiceIsBound = false;
   }
 }
Exemple #11
0
  void doUnbindService() {

    Log.i(TAG, "un-binding service");
    mainUIThreadActivity.unbindService(mConnection);
    mIsBound = false;
  }