本文整理匯總了Java中android.content.ContextWrapper.unbindService方法的典型用法代碼示例。如果您正苦於以下問題:Java ContextWrapper.unbindService方法的具體用法?Java ContextWrapper.unbindService怎麽用?Java ContextWrapper.unbindService使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.content.ContextWrapper
的用法示例。
在下文中一共展示了ContextWrapper.unbindService方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
/**
* @param token The {@link ServiceToken} to unbind from
*/
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;
}
}
示例2: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
/**
* @param token The {@link ServiceToken} to unbind from
*/
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;
}
}
示例3: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
public static void unbindFromService(ServiceToken token) {
if (token == null) {
return;
}
ContextWrapper cw = token.mWrappedContext;
ServiceBinder sb = sConnectionMap.remove(cw);
if (sb == null) {
return;
}
cw.unbindService(sb);
if (sConnectionMap.isEmpty()) {
// presumably there is nobody interested in the service at this
// point,
// so don't hang on to the ServiceConnection
sService = null;
}
}
示例4: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
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: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
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;
}
}
示例6: unbindFromService
import android.content.ContextWrapper; //導入方法依賴的package包/類
/**
* @param token The {@link ServiceToken} to unbind from
*/
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;
}
}