From a127b7ad151dd1ae66d665a073e98984930c3d9d Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Mon, 17 Jun 2013 14:25:46 -0400 Subject: New icon to dump heap information and share it. Alternatively, $ adb shell am start -n /com.android.launcher3.MemoryDumpActivity Change-Id: I8c615ec3abffaf6ad693c93bdf569550d8f97298 --- src/com/android/launcher3/LauncherAppState.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/com/android/launcher3/LauncherAppState.java') diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java index fa1670c3b..e7aa3d8ea 100644 --- a/src/com/android/launcher3/LauncherAppState.java +++ b/src/com/android/launcher3/LauncherAppState.java @@ -23,9 +23,15 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.database.ContentObserver; +import android.net.Uri; +import android.os.Debug; +import android.os.Environment; import android.os.Handler; +import java.io.File; +import java.io.IOException; import java.lang.ref.WeakReference; +import java.util.ArrayList; public class LauncherAppState { private Context mContext; @@ -61,6 +67,10 @@ public class LauncherAppState { mStarttime = System.currentTimeMillis(); + if (context.getResources().getBoolean(R.bool.debug_memory_enabled)) { + WeightWatcher.sUpdateThread.start(); + } + // set sIsScreenXLarge and sScreenDensity *before* creating icon cache sIsScreenLarge = context.getResources().getBoolean(R.bool.is_large_screen); sScreenDensity = context.getResources().getDisplayMetrics().density; -- cgit v1.2.3