public final class AndroidRefWatcherBuilder
extends <any>
RefWatcherBuilder with appropriate Android defaults.| Modifier and Type | Method and Description |
|---|---|
RefWatcher |
buildAndInstall()
Creates a
RefWatcher instance and starts watching activity references (on ICS+). |
protected DebuggerControl |
defaultDebuggerControl() |
protected ExcludedRefs |
defaultExcludedRefs() |
protected HeapDumper |
defaultHeapDumper() |
protected HeapDump.Listener |
defaultHeapDumpListener() |
protected WatchExecutor |
defaultWatchExecutor() |
protected boolean |
isDisabled() |
AndroidRefWatcherBuilder |
listenerServiceClass(java.lang.Class<? extends AbstractAnalysisResultService> listenerServiceClass)
Sets a custom
AbstractAnalysisResultService to listen to analysis results. |
AndroidRefWatcherBuilder |
maxStoredHeapDumps(int maxStoredHeapDumps)
Sets the maximum number of heap dumps stored.
|
AndroidRefWatcherBuilder |
watchDelay(long delay,
java.util.concurrent.TimeUnit unit)
Sets a custom delay for how long the
RefWatcher should wait until it checks if a
tracked object has been garbage collected. |
public AndroidRefWatcherBuilder listenerServiceClass(java.lang.Class<? extends AbstractAnalysisResultService> listenerServiceClass)
AbstractAnalysisResultService to listen to analysis results. This
overrides any call to #heapDumpListener(HeapDump.Listener).public AndroidRefWatcherBuilder watchDelay(long delay, java.util.concurrent.TimeUnit unit)
RefWatcher should wait until it checks if a
tracked object has been garbage collected. This overrides any call to #watchExecutor(WatchExecutor).public AndroidRefWatcherBuilder maxStoredHeapDumps(int maxStoredHeapDumps)
#heapDumper(HeapDumper) as well as any call to
LeakCanary.setDisplayLeakActivityDirectoryProvider(LeakDirectoryProvider))}java.lang.IllegalArgumentException - if maxStoredHeapDumps < 1.public RefWatcher buildAndInstall()
RefWatcher instance and starts watching activity references (on ICS+).protected boolean isDisabled()
protected HeapDumper defaultHeapDumper()
protected DebuggerControl defaultDebuggerControl()
protected HeapDump.Listener defaultHeapDumpListener()
protected ExcludedRefs defaultExcludedRefs()
protected WatchExecutor defaultWatchExecutor()