diff options
author | Sebastien Hertz <shertz@google.com> | 2014-05-22 18:01:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-22 18:01:16 +0000 |
commit | 5973815f274bde0874d671e44ab43382e42454f2 (patch) | |
tree | 0fe76336ea32fd858bcd34659ea963a5d25c18b5 /core/java/android/ddm | |
parent | ae52657e5f84326e417e6ecbaf18e4c548c6c9e3 (diff) | |
parent | 0f293905646713a5e603f75e3fa92f14e9e650d1 (diff) | |
download | frameworks_base-5973815f274bde0874d671e44ab43382e42454f2.zip frameworks_base-5973815f274bde0874d671e44ab43382e42454f2.tar.gz frameworks_base-5973815f274bde0874d671e44ab43382e42454f2.tar.bz2 |
am 0f293905: am b2db356d: am fc1ffe89: Merge "Report runtime information to DDMS"
* commit '0f293905646713a5e603f75e3fa92f14e9e650d1':
Report runtime information to DDMS
Diffstat (limited to 'core/java/android/ddm')
-rw-r--r-- | core/java/android/ddm/DdmHandleHello.java | 22 |
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); |