android.content.ContextWrapper#unbindService ( )源码实例Demo

下面列出了android.content.ContextWrapper#unbindService ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Music-Player   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}
 
源代码2 项目: MusicPlayer   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}
 
源代码3 项目: Orin   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}
 
源代码4 项目: RetroMusicPlayer   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}
 
源代码5 项目: VinylMusicPlayer   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}
 
源代码6 项目: Muzesto   文件: MusicPlayer.java
public static void unbindFromService(final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        mService = null;
    }
}
 
源代码7 项目: Phonograph   文件: MusicPlayerRemote.java
public static void unbindFromService(@Nullable final ServiceToken token) {
    if (token == null) {
        return;
    }
    final ContextWrapper mContextWrapper = token.mWrappedContext;
    final ServiceBinder mBinder = mConnectionMap.remove(mContextWrapper);
    if (mBinder == null) {
        return;
    }
    mContextWrapper.unbindService(mBinder);
    if (mConnectionMap.isEmpty()) {
        musicService = null;
    }
}