android.content.Context.unregisterComponentCallbacks()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中android.content.Context.unregisterComponentCallbacks()方法的一些代码示例,展示了Context.unregisterComponentCallbacks()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.unregisterComponentCallbacks()方法的具体详情如下:
包路径:android.content.Context
类名称:Context
方法名:unregisterComponentCallbacks

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);

相关文章

Context类方法