1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 05:16:58 +00:00

enable debug for resource leak (when close is not called)

This commit is contained in:
Ammar Githam 2020-08-18 22:20:00 +09:00
parent d65133ef4d
commit 31a5c437f1

View File

@ -2,6 +2,7 @@ package awais.instagrabber;
import android.content.ClipboardManager;
import android.content.Context;
import android.util.Log;
import androidx.core.app.NotificationManagerCompat;
import androidx.multidex.MultiDexApplication;
@ -32,6 +33,16 @@ public final class InstaApp extends MultiDexApplication {
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
try {
Class.forName("dalvik.system.CloseGuard")
.getMethod("setEnabled", boolean.class)
.invoke(null, true);
} catch (Exception e) {
Log.e("InstaApp", "Error", e);
}
}
if (!BuildConfig.DEBUG) CrashReporter.get(this).start();
logCollector = new LogCollector(this);