本文整理了Java中android.content.Context.unregisterComponentCallbacks()
方法的一些代码示例,展示了Context.unregisterComponentCallbacks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.unregisterComponentCallbacks()
方法的具体详情如下:
包路径:android.content.Context
类名称:Context
方法名:unregisterComponentCallbacks
暂无
代码示例来源:origin: bumptech/glide
@VisibleForTesting
public static synchronized void tearDown() {
if (glide != null) {
glide.getContext()
.getApplicationContext()
.unregisterComponentCallbacks(glide);
glide.engine.shutdown();
}
glide = null;
}
代码示例来源:origin: derry/delion
/**
* Logs the current session.
*/
public void logAndEndSession() {
if (mTabModelSelector != null) {
mContext.unregisterComponentCallbacks(mComponentCallbacks);
mTabModelSelectorTabObserver.destroy();
mTabModelSelector = null;
}
nativeUmaEndSession(sNativeUmaSessionStats);
NetworkChangeNotifier.removeConnectionTypeObserver(this);
ContextUtils.getAppSharedPreferences()
.edit()
.putLong(LAST_USED_TIME_PREF, System.currentTimeMillis())
.apply();
}
代码示例来源:origin: gateship-one/odyssey
@Override
public void onDetach() {
super.onDetach();
// Unregister the memory trim callback with the system.
getActivity().getApplicationContext().unregisterComponentCallbacks(mComponentCallback);
}
代码示例来源:origin: stackoverflow.com
context.unregisterComponentCallbacks(entry.getKey());
} catch (Exception exc) {
if (BuildConfig.DEBUG) Log.e(TAG, "Unable to unregister ComponentCallbacks", exc);
内容来源于网络,如有侵权,请联系作者删除!