Snap for 7985315 from 4a6d27bc4053b345dc697d5f4bd1af45d300900a to sc-v2-release

Change-Id: I052ff45ce4c890ac5fa6af0f5fe8a667fef47397
diff --git a/README.android b/README.android
index 8fa2b90..aa28583 100644
--- a/README.android
+++ b/README.android
@@ -21,3 +21,6 @@
    more lightweight. The Agent is only created when it's actually
    needed. This makes it possible to instrument a lot of more core
    libraries without creating a circular dependency at runtime.
+4) Disable use of 'constant dynamic' bytecode in
+   org.jacoco.core.internal.instr.ProbeArrayStrategyFactory, because R8/D8 doesn't support it.
+   (https://issuetracker.google.com/178172809)
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
index d5756b7..bc957b9 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
@@ -50,10 +50,13 @@
 			if (counter.getCount() == 0) {
 				return new NoneProbeArrayStrategy();
 			}
-			if (version >= Opcodes.V11 && counter.hasMethods()) {
-				return new CondyProbeArrayStrategy(className, true, classId,
-						accessorGenerator);
-			}
+// BEGIN android-change
+			// See https://github.com/jacoco/jacoco/issues/1151
+			// if (version >= Opcodes.V11 && counter.hasMethods()) {
+			// 	return new CondyProbeArrayStrategy(className, true, classId,
+			// 			accessorGenerator);
+			// }
+// END android-change
 			if (version >= Opcodes.V1_8 && counter.hasMethods()) {
 				return new InterfaceFieldProbeArrayStrategy(className, classId,
 						counter.getCount(), accessorGenerator);
@@ -62,10 +65,13 @@
 						counter.getCount(), accessorGenerator);
 			}
 		} else {
-			if (version >= Opcodes.V11) {
-				return new CondyProbeArrayStrategy(className, false, classId,
-						accessorGenerator);
-			}
+// BEGIN android-change
+			// See https://github.com/jacoco/jacoco/issues/1151
+			// if (version >= Opcodes.V11) {
+			// 	return new CondyProbeArrayStrategy(className, false, classId,
+			// 			accessorGenerator);
+			// }
+// END android-change
 			return new ClassFieldProbeArrayStrategy(className, classId,
 					InstrSupport.needsFrames(version), accessorGenerator);
 		}