summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2010-01-22 07:23:31 -0800
committerAndy McFadden <fadden@android.com>2010-01-22 09:36:03 -0800
commite577232406649450a513140bf09cb3fc8c3fe046 (patch)
treef9d9ce7240d343d1b52c12aa614beff649b99064 /core/java/android
parenta69a23b2a5fa7738a5c5c3b74865f20308a96190 (diff)
downloadframeworks_base-e577232406649450a513140bf09cb3fc8c3fe046.zip
frameworks_base-e577232406649450a513140bf09cb3fc8c3fe046.tar.gz
frameworks_base-e577232406649450a513140bf09cb3fc8c3fe046.tar.bz2
Move VM feature strings (used by DDMS) into VM.
Until now, we used a place-holder in frameworks/base. Disable a test that shouldn't have been on.
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/ddm/DdmHandleHello.java6
-rw-r--r--core/java/android/os/Debug.java11
2 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/ddm/DdmHandleHello.java b/core/java/android/ddm/DdmHandleHello.java
index 0603ca5..714a611 100644
--- a/core/java/android/ddm/DdmHandleHello.java
+++ b/core/java/android/ddm/DdmHandleHello.java
@@ -56,7 +56,7 @@ public class DdmHandleHello extends ChunkHandler {
if (Config.LOGV)
Log.v("ddm-hello", "Connected!");
- if (true) {
+ if (false) {
/* test spontaneous transmission */
byte[] data = new byte[] { 0, 1, 2, 3, 4, -4, -3, -2, -1, 127 };
Chunk testChunk =
@@ -148,9 +148,7 @@ public class DdmHandleHello extends ChunkHandler {
private Chunk handleFEAT(Chunk request) {
// TODO: query the VM to ensure that support for these features
// is actually compiled in
- final String[] features = {
- "hprof-heap-dump", "method-trace-profiling"
- };
+ final String[] features = Debug.getVmFeatureList();
if (Config.LOGV)
Log.v("ddm-heap", "Got feature list request");
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index b33e8be..7043c2e 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -264,6 +264,17 @@ public final class Debug
}
/**
+ * Returns an array of strings that identify VM features. This is
+ * used by DDMS to determine what sorts of operations the VM can
+ * perform.
+ *
+ * @hide
+ */
+ public static String[] getVmFeatureList() {
+ return VMDebug.getVmFeatureList();
+ }
+
+ /**
* Change the JDWP port.
*
* @deprecated no longer needed or useful