Also apply the rewriting for JDK-8272564 up to Andorid R

Bug: b/271408544
Change-Id: I240de7d301677668b9c13b3b49c7b7951e6434b6
diff --git a/src/main/java/com/android/tools/r8/utils/InternalOptions.java b/src/main/java/com/android/tools/r8/utils/InternalOptions.java
index bc9d193..e6c92f3 100644
--- a/src/main/java/com/android/tools/r8/utils/InternalOptions.java
+++ b/src/main/java/com/android/tools/r8/utils/InternalOptions.java
@@ -2806,14 +2806,15 @@
   // the symbolic reference java.lang.Object.
   //
   // The support was added in Android O, however at least for j.l.CharSequence.equals the handling
-  // in Art was incorrect (b/231450655).
+  // in Art was incorrect (b/231450655). Further down the line b/271408544 indicate that it is not
+  // until Android S that this is working.
   //
   // javac started generating code like this with the fix for JDK-8272564, which will be part of
   // JDK 18.
   //
   // See b/218298666.
   public boolean canHaveInvokeInterfaceToObjectMethodBug() {
-    return canHaveBugPresentUntil(AndroidApiLevel.P);
+    return canHaveBugPresentUntil(AndroidApiLevel.S);
   }
 
   // Until we fully drop support for API levels < 16, we have to emit an empty annotation set to