summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-05-30 17:31:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-30 17:31:52 +0000
commit8d07a14ee4cd47815ed42a86ce089c3de646658f (patch)
tree51ca8fd0c812c53e00568a5cb7cc1d3f7e88f88e /core/java
parent2d2e30eeac5b6799808c23b944f29d68ed0c205d (diff)
parent98d565856280a630bc5c35aaf047fb8d4ad0ddb5 (diff)
downloadframeworks_base-8d07a14ee4cd47815ed42a86ce089c3de646658f.zip
frameworks_base-8d07a14ee4cd47815ed42a86ce089c3de646658f.tar.gz
frameworks_base-8d07a14ee4cd47815ed42a86ce089c3de646658f.tar.bz2
Merge "Report runtime information to DDMS" into lmp-preview-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/ddm/DdmHandleHello.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/core/java/android/ddm/DdmHandleHello.java b/core/java/android/ddm/DdmHandleHello.java
index 220b40d..2dce425 100644
--- a/core/java/android/ddm/DdmHandleHello.java
+++ b/core/java/android/ddm/DdmHandleHello.java
@@ -22,6 +22,7 @@ import org.apache.harmony.dalvik.ddmc.DdmServer;
import android.util.Log;
import android.os.Debug;
import android.os.UserHandle;
+import dalvik.system.VMRuntime;
import java.nio.ByteBuffer;
@@ -126,8 +127,21 @@ public class DdmHandleHello extends ChunkHandler {
// appName = "unknown";
String appName = DdmHandleAppName.getAppName();
- ByteBuffer out = ByteBuffer.allocate(20
- + vmIdent.length()*2 + appName.length()*2);
+ VMRuntime vmRuntime = VMRuntime.getRuntime();
+ String instructionSetDescription =
+ vmRuntime.is64Bit() ? "64-bit" : "32-bit";
+ String vmInstructionSet = vmRuntime.vmInstructionSet();
+ if (vmInstructionSet != null && vmInstructionSet.length() > 0) {
+ instructionSetDescription += " (" + vmInstructionSet + ")";
+ }
+ String vmFlags = "CheckJNI="
+ + (vmRuntime.isCheckJniEnabled() ? "true" : "false");
+
+ ByteBuffer out = ByteBuffer.allocate(28
+ + vmIdent.length() * 2
+ + appName.length() * 2
+ + instructionSetDescription.length() * 2
+ + vmFlags.length() * 2);
out.order(ChunkHandler.CHUNK_ORDER);
out.putInt(DdmServer.CLIENT_PROTOCOL_VERSION);
out.putInt(android.os.Process.myPid());
@@ -136,6 +150,10 @@ public class DdmHandleHello extends ChunkHandler {
putString(out, vmIdent);
putString(out, appName);
out.putInt(UserHandle.myUserId());
+ out.putInt(instructionSetDescription.length());
+ putString(out, instructionSetDescription);
+ out.putInt(vmFlags.length());
+ putString(out, vmFlags);
Chunk reply = new Chunk(CHUNK_HELO, out);