LeakCanary library added
This commit is contained in:
parent
aad277b9f5
commit
5a2717cf0c
@ -75,6 +75,9 @@ dependencies {
|
||||
compile 'com.google.android.gms:play-services-ads:6.5.87@aar'
|
||||
compile 'com.google.android.gms:play-services-base:6.5.87@aar'
|
||||
compile 'com.melnykov:floatingactionbutton:1.1.0'
|
||||
|
||||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
|
||||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
|
||||
}
|
||||
|
||||
task androidJavadocs(type: Javadoc) {
|
||||
|
@ -29,6 +29,9 @@ import android.graphics.Typeface;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
|
||||
import org.acra.ACRA;
|
||||
import org.acra.ReportingInteractionMode;
|
||||
import org.acra.annotation.ReportsCrashes;
|
||||
@ -43,11 +46,12 @@ import org.solovyev.android.calculator.wizard.CalculatorWizards;
|
||||
import org.solovyev.android.wizard.Wizards;
|
||||
import org.solovyev.common.msg.MessageType;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@ReportsCrashes(formKey = "",
|
||||
formUri = "https://serso.cloudant.com/acra-cpp/_design/acra-storage/_update/report",
|
||||
reportType = org.acra.sender.HttpSender.Type.JSON,
|
||||
@ -121,6 +125,8 @@ public class CalculatorApplication extends android.app.Application implements Sh
|
||||
public void onCreate() {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
ACRA.init(this);
|
||||
} else {
|
||||
LeakCanary.install(this);
|
||||
}
|
||||
|
||||
if (!App.isInitialized()) {
|
||||
|
Loading…
Reference in New Issue
Block a user