Skip to content

Instantly share code, notes, and snippets.

HonB zjyangyong

Block or report user

Report or block zjyangyong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zjyangyong
zjyangyong / OomExceptionHandler.java
Last active Nov 23, 2016 — forked from pyricau/OomExceptionHandler.java
Dump the heap on OutOfMemoryError crashes in your debug builds.
View OomExceptionHandler.java
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();
You can’t perform that action at this time.