Lie about the value of java.version am: bc2d9e8197
am: bbe54875e2
Change-Id: I8206fd8f22a86922f6206333b803954b456d41cd
diff --git a/src/share/back/VirtualMachineImpl.c b/src/share/back/VirtualMachineImpl.c
index dfcdfb2..fde53c3 100644
--- a/src/share/back/VirtualMachineImpl.c
+++ b/src/share/back/VirtualMachineImpl.c
@@ -55,6 +55,12 @@
if (vmVersion == NULL) {
vmVersion = "<unknown>";
}
+ // ANDROID-CHANGED: The runtime value of the java.version property has always been "0" on
+ // android but the old debugger just sent a different value. Simply sending "0"
+ // can confuse some JDWP clients so we will simply say that we are version "8".
+ if (strcmp(gdata->property_java_vm_name, "Dalvik") == 0 && strcmp(vmVersion, "0") == 0) {
+ vmVersion = "8";
+ }
vmName = gdata->property_java_vm_name;
if (vmName == NULL) {
vmName = "<unknown>";