summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-11-17 17:32:16 -0800
committerJoe Onorato <joeo@android.com>2009-11-17 18:04:52 -0800
commitbe38609f875f9b9374ceaf723135c0a624637fcb (patch)
treebf7c66e12f86fa685ea2b98051e020a82bd9ff57 /src/com/android
parentb40d29cb41c302387b2794b214fe2522073d957d (diff)
downloadpackages_apps_trebuchet-be38609f875f9b9374ceaf723135c0a624637fcb.zip
packages_apps_trebuchet-be38609f875f9b9374ceaf723135c0a624637fcb.tar.gz
packages_apps_trebuchet-be38609f875f9b9374ceaf723135c0a624637fcb.tar.bz2
Add a lot of logging that can be seen by doing adb shell setprop launcher2.dumpstate 1 and presssing volume down
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/AllAppsView.java64
-rw-r--r--src/com/android/launcher2/ApplicationInfo.java14
-rw-r--r--src/com/android/launcher2/DragLayer.java1
-rw-r--r--src/com/android/launcher2/Launcher.java17
-rw-r--r--src/com/android/launcher2/LauncherModel.java31
5 files changed, 127 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 687d416..9b521b9 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -49,6 +49,7 @@ import android.view.ViewConfiguration;
import android.view.accessibility.AccessibilityEvent;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
@@ -1377,6 +1378,69 @@ public class AllAppsView extends RSSurfaceView
break;
}
}
+
+ public void dumpState() {
+ Log.d(TAG, "mRollo.mWidth=" + mWidth);
+ Log.d(TAG, "mRollo.mHeight=" + mHeight);
+ Log.d(TAG, "mRollo.mIcons=" + mIcons);
+ if (mIcons != null) {
+ Log.d(TAG, "mRollo.mIcons.length=" + mIcons.length);
+ }
+ if (mIconIds != null) {
+ Log.d(TAG, "mRollo.mIconIds.length=" + mIconIds.length);
+ }
+ Log.d(TAG, "mRollo.mIconIds=" + Arrays.toString(mIconIds));
+ if (mLabelIds != null) {
+ Log.d(TAG, "mRollo.mLabelIds.length=" + mLabelIds.length);
+ }
+ Log.d(TAG, "mRollo.mLabelIds=" + Arrays.toString(mLabelIds));
+ Log.d(TAG, "mRollo.mTouchXBorders=" + Arrays.toString(mTouchXBorders));
+ Log.d(TAG, "mRollo.mTouchYBorders=" + Arrays.toString(mTouchYBorders));
+ Log.d(TAG, "mRollo.mHasSurface=" + mHasSurface);
+ Log.d(TAG, "mRollo.mAppsDirty=" + mAppsDirty);
+ Log.d(TAG, "mRollo.mState.newPositionX=" + mState.newPositionX);
+ Log.d(TAG, "mRollo.mState.newTouchDown=" + mState.newTouchDown);
+ Log.d(TAG, "mRollo.mState.flingVelocity=" + mState.flingVelocity);
+ Log.d(TAG, "mRollo.mState.iconCount=" + mState.iconCount);
+ Log.d(TAG, "mRollo.mState.selectedIconIndex=" + mState.selectedIconIndex);
+ Log.d(TAG, "mRollo.mState.selectedIconTexture=" + mState.selectedIconTexture);
+ Log.d(TAG, "mRollo.mState.zoomTarget=" + mState.zoomTarget);
+ Log.d(TAG, "mRollo.mState.homeButtonId=" + mState.homeButtonId);
+ Log.d(TAG, "mRollo.mState.targetPos=" + mState.targetPos);
+ Log.d(TAG, "mRollo.mParams.bubbleWidth=" + mParams.bubbleWidth);
+ Log.d(TAG, "mRollo.mParams.bubbleHeight=" + mParams.bubbleHeight);
+ Log.d(TAG, "mRollo.mParams.bubbleBitmapWidth=" + mParams.bubbleBitmapWidth);
+ Log.d(TAG, "mRollo.mParams.bubbleBitmapHeight=" + mParams.bubbleBitmapHeight);
+ Log.d(TAG, "mRollo.mParams.homeButtonWidth=" + mParams.homeButtonWidth);
+ Log.d(TAG, "mRollo.mParams.homeButtonHeight=" + mParams.homeButtonHeight);
+ Log.d(TAG, "mRollo.mParams.homeButtonTextureWidth=" + mParams.homeButtonTextureWidth);
+ Log.d(TAG, "mRollo.mParams.homeButtonTextureHeight=" + mParams.homeButtonTextureHeight);
+ }
+ }
+
+ public void dumpState() {
+ Log.d(TAG, "mRS=" + mRS);
+ Log.d(TAG, "mRollo=" + mRollo);
+ ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList", mAllAppsList);
+ Log.d(TAG, "mArrowNavigation=" + mArrowNavigation);
+ Log.d(TAG, "mStartedScrolling=" + mStartedScrolling);
+ Log.d(TAG, "mLastSelection=" + mLastSelection);
+ Log.d(TAG, "mLastSelectedIcon=" + mLastSelectedIcon);
+ Log.d(TAG, "mVelocityTracker=" + mVelocityTracker);
+ Log.d(TAG, "mTouchTracking=" + mTouchTracking);
+ Log.d(TAG, "mShouldGainFocus=" + mShouldGainFocus);
+ Log.d(TAG, "mZoomDirty=" + mZoomDirty);
+ Log.d(TAG, "mAnimateNextZoom=" + mAnimateNextZoom);
+ Log.d(TAG, "mZoom=" + mZoom);
+ Log.d(TAG, "mPosX=" + mPosX);
+ Log.d(TAG, "mVelocity=" + mVelocity);
+ Log.d(TAG, "mMessageProc=" + mMessageProc);
+ if (mRollo != null) {
+ mRollo.dumpState();
+ }
+ if (mRS != null) {
+ mRS.contextDump(0);
+ }
}
}
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index db802c7..0fe84e7 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -21,6 +21,9 @@ import android.content.ContentValues;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
+import android.util.Log;
+
+import java.util.ArrayList;
/**
* Represents a launchable application. An application is made of a name (or title),
@@ -140,4 +143,15 @@ class ApplicationInfo extends ItemInfo {
super.unbind();
icon.setCallback(null);
}
+
+
+ public static void dumpApplicationInfoList(String tag, String label,
+ ArrayList<ApplicationInfo> list) {
+ Log.d(tag, label + " size=" + list.size());
+ for (ApplicationInfo info: list) {
+ Log.d(tag, " title=\"" + info.title + "\" titleBitmap=" + info.titleBitmap
+ + " icon=" + info.icon + " iconBitmap=" + info.iconBitmap
+ + " filtered=" + info.filtered + " customIcon=" + info.customIcon);
+ }
+ }
}
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index 51e3f25..7ae9891 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -18,6 +18,7 @@ package com.android.launcher2;
import android.content.Context;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.KeyEvent;
import android.widget.FrameLayout;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index a8235a2..3e878d6 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -48,6 +48,7 @@ import android.os.Handler;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.SystemProperties;
import android.provider.LiveFolders;
import android.text.Selection;
import android.text.SpannableStringBuilder;
@@ -1321,6 +1322,12 @@ public final class Launcher extends Activity
return true;
case KeyEvent.KEYCODE_HOME:
return true;
+ case KeyEvent.KEYCODE_VOLUME_DOWN:
+ if (SystemProperties.getInt("launcher2.dumpstate", 0) != 0) {
+ dumpState();
+ return true;
+ }
+ break;
}
} else if (event.getAction() == KeyEvent.ACTION_UP) {
switch (event.getKeyCode()) {
@@ -2192,4 +2199,14 @@ public final class Launcher extends Activity
mWorkspace.removeShortcutsForPackage(packageName);
mAllAppsGrid.removeApps(apps);
}
+
+ /**
+ * Prints out out state for debugging.
+ */
+ public void dumpState() {
+ Log.d(TAG, "BEGIN launcher2 dump state for launcher " + this);
+ mModel.dumpState();
+ mAllAppsGrid.dumpState();
+ Log.d(TAG, "END launcher2 dump state");
+ }
}
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 262190d..85d47a9 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -1000,6 +1000,27 @@ public class LauncherModel extends BroadcastReceiver {
});
}
}
+
+ public void dumpState() {
+ Log.d(TAG, "mLoader.mLoaderThread.mContext=" + mContext);
+ Log.d(TAG, "mLoader.mLoaderThread.mWaitThread=" + mWaitThread);
+ Log.d(TAG, "mLoader.mLoaderThread.mIsLaunching=" + mIsLaunching);
+ Log.d(TAG, "mLoader.mLoaderThread.mStopped=" + mStopped);
+ Log.d(TAG, "mLoader.mLoaderThread.mWorkspaceDoneBinding=" + mWorkspaceDoneBinding);
+ }
+ }
+
+ public void dumpState() {
+ Log.d(TAG, "mLoader.mLastWorkspaceSeq=" + mLoader.mLastWorkspaceSeq);
+ Log.d(TAG, "mLoader.mWorkspaceSeq=" + mLoader.mWorkspaceSeq);
+ Log.d(TAG, "mLoader.mLastAllAppsSeq=" + mLoader.mLastAllAppsSeq);
+ Log.d(TAG, "mLoader.mAllAppsSeq=" + mLoader.mAllAppsSeq);
+ Log.d(TAG, "mLoader.mItems size=" + mLoader.mItems.size());
+ if (mLoaderThread != null) {
+ mLoaderThread.dumpState();
+ } else {
+ Log.d(TAG, "mLoader.mLoaderThread=null");
+ }
}
}
@@ -1208,4 +1229,14 @@ public class LauncherModel extends BroadcastReceiver {
return sCollator.compare(a.title.toString(), b.title.toString());
}
};
+
+ public void dumpState() {
+ Log.d(TAG, "mBeforeFirstLoad=" + mBeforeFirstLoad);
+ Log.d(TAG, "mCallbacks=" + mCallbacks);
+ ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList.data", mAllAppsList.data);
+ ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList.added", mAllAppsList.added);
+ ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList.removed", mAllAppsList.removed);
+ ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList.modified", mAllAppsList.modified);
+ mLoader.dumpState();
+ }
}