本文整理汇总了Java中com.squareup.leakcanary.AndroidExcludedRefs类的典型用法代码示例。如果您正苦于以下问题:Java AndroidExcludedRefs类的具体用法?Java AndroidExcludedRefs怎么用?Java AndroidExcludedRefs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AndroidExcludedRefs类属于com.squareup.leakcanary包,在下文中一共展示了AndroidExcludedRefs类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onHandleIntent
import com.squareup.leakcanary.AndroidExcludedRefs; //导入依赖的package包/类
protected void onHandleIntent(Intent intent) {
HeapDump heapDump = (HeapDump) intent.getSerializableExtra(HEAPDUMP_EXTRA);
AbstractAnalysisResultService.sendResultToListener(this, intent.getStringExtra
(LISTENER_CLASS_EXTRA), heapDump, new HeapAnalyzer(AndroidExcludedRefs
.createAndroidDefaults().build(), heapDump.excludedRefs).checkForLeak(heapDump
.heapDumpFile, heapDump.referenceKey));
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:HeapAnalyzerService.java
示例2: initializeLeakCanary
import com.squareup.leakcanary.AndroidExcludedRefs; //导入依赖的package包/类
private void initializeLeakCanary() {
if (LeakCanary.isInAnalyzerProcess(getApplicationContext())) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
mRefWatcher = RefWatcher.DISABLED;
} else {
// Ignore known Android SDK leaks
ExcludedRefs excludedRefs = AndroidExcludedRefs.createAppDefaults()
.build();
mRefWatcher = LeakCanary.refWatcher(getApplicationContext())
.excludedRefs(excludedRefs)
.buildAndInstall();
}
}
开发者ID:AnironGlass,项目名称:MVP-Boilerplate,代码行数:16,代码来源:DebugApp.java
示例3: install
import com.squareup.leakcanary.AndroidExcludedRefs; //导入依赖的package包/类
public static RefWatcher install(Application application) {
if (BuildConfig.DEBUG) {
ExcludedRefs excludedRefs = AndroidExcludedRefs.createAppDefaults()
//exclude InputMethodManager
.clazz("android.view.inputmethod.InputMethodManager")
.build();
return LeakCanary.refWatcher(application)
.listenerServiceClass(DisplayLeakService.class)
.excludedRefs(excludedRefs)
.buildAndInstall();
} else {
return LeakCanary.install(application);
}
}
开发者ID:ykrank,项目名称:S1-Next,代码行数:15,代码来源:LeaksUtil.java
示例4: setupLeakCanary
import com.squareup.leakcanary.AndroidExcludedRefs; //导入依赖的package包/类
public static void setupLeakCanary(Application application) {
LeakCanary.install(application, LeakLoggerService.class,
AndroidExcludedRefs.createAppDefaults().build());
}
开发者ID:braintree,项目名称:braintree-android-drop-in,代码行数:5,代码来源:LeakLoggerService.java
注:本文中的com.squareup.leakcanary.AndroidExcludedRefs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论