public final class LeakCanary
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
enableDisplayLeakActivity(android.content.Context context) |
static RefWatcher |
install(android.app.Application application)
Creates a
RefWatcher that works out of the box, and starts watching activity
references (on ICS+). |
static boolean |
isInAnalyzerProcess(android.content.Context context)
Whether the current process is the process running the
HeapAnalyzerService , which is
a different process than the normal app process. |
static java.lang.String |
leakInfo(android.content.Context context,
HeapDump heapDump,
AnalysisResult result,
boolean detailed)
Returns a string representation of the result of a heap analysis.
|
static AndroidRefWatcherBuilder |
refWatcher(android.content.Context context)
Builder to create a customized
RefWatcher with appropriate Android defaults. |
static void |
setDisplayLeakActivityDirectoryProvider(LeakDirectoryProvider leakDirectoryProvider)
If you build a
RefWatcher with a AndroidHeapDumper that has a custom LeakDirectoryProvider , then you should also call this method to make sure the activity in
charge of displaying leaks can find those on the file system. |
public static RefWatcher install(android.app.Application application)
RefWatcher
that works out of the box, and starts watching activity
references (on ICS+).public static AndroidRefWatcherBuilder refWatcher(android.content.Context context)
RefWatcher
with appropriate Android defaults.public static void enableDisplayLeakActivity(android.content.Context context)
public static void setDisplayLeakActivityDirectoryProvider(LeakDirectoryProvider leakDirectoryProvider)
RefWatcher
with a AndroidHeapDumper
that has a custom LeakDirectoryProvider
, then you should also call this method to make sure the activity in
charge of displaying leaks can find those on the file system.public static java.lang.String leakInfo(android.content.Context context, HeapDump heapDump, AnalysisResult result, boolean detailed)
public static boolean isInAnalyzerProcess(android.content.Context context)
HeapAnalyzerService
, which is
a different process than the normal app process.