1 package leakcanary 2 3 import android.app.Application 4 import shark.HeapAnalysis 5 6 /** 7 * Deprecated, this is now a no-op. Add to LeakCanary.config.eventListeners instead. 8 * 9 * Default [OnHeapAnalyzedListener] implementation, which will store the analysis to disk and 10 * show a notification summarizing the result. 11 */ 12 @Deprecated(message = "Add to LeakCanary.config.eventListeners instead") 13 class DefaultOnHeapAnalyzedListener private constructor() : 14 OnHeapAnalyzedListener { 15 16 // Kept this constructor for backward compatibility of public API. 17 @Deprecated(message = "Add to LeakCanary.config.eventListeners instead") 18 constructor(application: Application) : this() 19 onHeapAnalyzednull20 override fun onHeapAnalyzed(heapAnalysis: HeapAnalysis) { 21 } 22 23 companion object { createnull24 fun create(): OnHeapAnalyzedListener = DefaultOnHeapAnalyzedListener() 25 } 26 } 27