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 4456258..ce52ae2 100644
--- a/src/main/java/com/android/tools/r8/utils/InternalOptions.java
+++ b/src/main/java/com/android/tools/r8/utils/InternalOptions.java
@@ -2517,14 +2517,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 isGeneratingDex() && getMinApiLevel().isLessThan(AndroidApiLevel.P);
+    return isGeneratingDex() && getMinApiLevel().isLessThan(AndroidApiLevel.S);
   }
 
   // b/238399429 Some art 6 vms have issues with multiple monitors in the same method