|
|
|
@ -154,6 +154,7 @@ import javax.net.ssl.TrustManager;
|
|
|
|
|
import javax.net.ssl.TrustManagerFactory;
|
|
|
|
|
|
|
|
|
|
import io.requery.android.database.CursorWindowAllocationException;
|
|
|
|
|
import leakcanary.LeakCanary;
|
|
|
|
|
|
|
|
|
|
public class Log {
|
|
|
|
|
private static Context ctx;
|
|
|
|
@ -569,6 +570,18 @@ public class Log {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void setupLeakCanary(boolean enabled) {
|
|
|
|
|
LeakCanary.Config config = LeakCanary.getConfig().newBuilder()
|
|
|
|
|
.dumpHeap(enabled && BuildConfig.DEBUG)
|
|
|
|
|
.build();
|
|
|
|
|
LeakCanary.setConfig(config);
|
|
|
|
|
LeakCanary.INSTANCE.showLeakDisplayActivityLauncherIcon(BuildConfig.DEBUG);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void checkCanary() {
|
|
|
|
|
LeakCanary.INSTANCE.dumpHeap();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void logExtras(Intent intent) {
|
|
|
|
|
if (intent != null)
|
|
|
|
|
logBundle(intent.getExtras());
|
|
|
|
|