New icon to dump heap information and share it.
Alternatively,
$ adb shell am start -n <pkg>/com.android.launcher3.MemoryDumpActivity
Change-Id: I8c615ec3abffaf6ad693c93bdf569550d8f97298
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index fa1670c..e7aa3d8 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -23,9 +23,15 @@
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 @@
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;