Java 类com.squareup.leakcanary.AndroidExcludedRefs 实例源码

项目:boohee_v5.6    文件:HeapAnalyzerService.java   
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));
}
项目:MVP-Boilerplate    文件:DebugApp.java   
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();
    }
}
项目:S1-Next    文件:LeaksUtil.java   
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);
    }
}
项目:braintree-android-drop-in    文件:LeakLoggerService.java   
public static void setupLeakCanary(Application application) {
    LeakCanary.install(application, LeakLoggerService.class,
            AndroidExcludedRefs.createAppDefaults().build());
}
项目:braintree_android    文件:LeakLoggerService.java   
public static void setupLeakCanary(Application application) {
    LeakCanary.install(application, LeakLoggerService.class,
            AndroidExcludedRefs.createAppDefaults().build());
}