This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.content.ContextWrapper; | |
import android.os.Bundle; | |
import android.os.Looper; | |
import android.os.MessageQueue; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewTreeObserver; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.os.Debug; | |
import java.io.File; | |
public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
private static final String FILENAME = "out-of-memory.hprof"; | |
public static void install(Context context) { | |
Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
import com.squareup.leakcanary.AnalysisResult; | |
import com.squareup.leakcanary.DisplayLeakService; | |
import com.squareup.leakcanary.HeapDump; | |
import retrofit.RestAdapter; | |
import retrofit.RetrofitError; | |
import retrofit.http.Multipart; | |
import retrofit.http.POST; | |
import retrofit.http.Part; | |
import retrofit.mime.TypedFile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GC Roots: 242256 | |
System class root total: 197490 real: 90556 undefined: 106934 | |
============ | |
Undefined System Class roots: | |
long[] of size 65200: 26310 | |
java.lang.Class[] of size 7570: 26310 | |
java.lang.Class[] of size 3405: 12342 | |
long[] of size 32034: 12342 | |
long[] of size 29221: 10101 | |
java.lang.Class[] of size 3097: 10101 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.Callable; | |
public enum Lol implements Callable<CharSequence> { | |
ಠ_ಠ { | |
@Override public String call() { | |
return "Foo"; | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1' | |
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1' | |
// Optional, if you use support library fragments: | |
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.1' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.squareup.leakcanary | |
import android.app.Application | |
import com.bugsnag.android.Client | |
import com.bugsnag.android.MetaData | |
import com.bugsnag.android.Severity.ERROR | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.FAILURE | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.LEAK | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.NOT_FOUND | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.WONT_FIX_LEAK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example | |
import android.app.Instrumentation | |
import android.os.Bundle | |
import android.util.Log | |
import androidx.test.internal.runner.listener.InstrumentationResultPrinter | |
import androidx.test.platform.app.InstrumentationRegistry | |
import org.junit.runner.Description | |
import org.junit.runner.notification.RunListener |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example | |
import kotlin.annotation.AnnotationRetention.RUNTIME | |
import kotlin.annotation.AnnotationTarget.FUNCTION | |
/** | |
* @see TracingRunListener | |
*/ | |
@Retention(RUNTIME) | |
@Target(FUNCTION) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Every editable TextView has an Editor instance which has a SpellChecker instance. SpellChecker | |
* is in charge of displaying the little squiggle spans that show typos. SpellChecker starts a | |
* SpellCheckerSession as needed and then closes it when the TextView is detached from the window. | |
* A SpellCheckerSession is in charge of communicating with the spell checker service (which lives | |
* in another process) through TextServicesManager. | |
* | |
* The SpellChecker sends the TextView content to the spell checker service every 400ms, ie every | |
* time the service calls back with a result the SpellChecker schedules another check for 400ms | |
* later. |