|
23 | 23 | import com.nostra13.universalimageloader.core.ImageLoader;
|
24 | 24 | import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
|
25 | 25 | import com.nostra13.universalimageloader.utils.StorageUtils;
|
26 |
| - |
27 |
| -import fr.free.nrw.commons.caching.CacheController; |
28 |
| -import fr.free.nrw.commons.category.Category; |
29 |
| -import fr.free.nrw.commons.contributions.Contribution; |
30 |
| -import fr.free.nrw.commons.data.DBOpenHelper; |
31 |
| -import fr.free.nrw.commons.modifications.ModifierSequence; |
32 |
| -import fr.free.nrw.commons.auth.AccountUtil; |
33 |
| -import fr.free.nrw.commons.nearby.NearbyPlaces; |
| 26 | +import com.squareup.leakcanary.LeakCanary; |
34 | 27 |
|
35 | 28 | import org.acra.ACRA;
|
36 | 29 | import org.acra.ReportingInteractionMode;
|
|
49 | 42 | import java.io.File;
|
50 | 43 | import java.io.IOException;
|
51 | 44 |
|
| 45 | +import fr.free.nrw.commons.auth.AccountUtil; |
| 46 | +import fr.free.nrw.commons.caching.CacheController; |
| 47 | +import fr.free.nrw.commons.category.Category; |
| 48 | +import fr.free.nrw.commons.contributions.Contribution; |
| 49 | +import fr.free.nrw.commons.data.DBOpenHelper; |
| 50 | +import fr.free.nrw.commons.modifications.ModifierSequence; |
| 51 | +import fr.free.nrw.commons.nearby.NearbyPlaces; |
52 | 52 | import fr.free.nrw.commons.utils.FileUtils;
|
53 | 53 | import timber.log.Timber;
|
54 | 54 |
|
@@ -166,6 +166,12 @@ public synchronized NearbyPlaces getNearbyPlaces() {
|
166 | 166 | @Override
|
167 | 167 | public void onCreate() {
|
168 | 168 | super.onCreate();
|
| 169 | + if (LeakCanary.isInAnalyzerProcess(this)) { |
| 170 | + // This process is dedicated to LeakCanary for heap analysis. |
| 171 | + // You should not init your app in this process. |
| 172 | + return; |
| 173 | + } |
| 174 | + LeakCanary.install(this); |
169 | 175 |
|
170 | 176 | Timber.plant(new Timber.DebugTree());
|
171 | 177 |
|
|
0 commit comments