diff --git a/api/current.txt b/api/current.txt
index c6af6beca60be..5b1ff91f0ac2d 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1005,7 +1005,7 @@ package android {
field public static final int numericModifiers = 16844111; // 0x101054f
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int offset = 16844052; // 0x1010514
- field public static final int onClick = 16843375; // 0x101026f
+ field @Deprecated public static final int onClick = 16843375; // 0x101026f
field public static final int oneshot = 16843159; // 0x1010197
field public static final int opacity = 16843550; // 0x101031e
field public static final int opticalInsetBottom = 16844171; // 0x101058b
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 2b511706d0241..20ef017f59f8b 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2784,7 +2784,11 @@
exactly one parameter of type View. For instance, if you specify
android:onClick="sayHello", you must declare a
public void sayHello(View v) method of your context
- (typically, your Activity). -->
+ (typically, your Activity).
+ {@deprecated View actually traverses the Context
+ hierarchy looking for the relevant method, which is fragile (an intermediate
+ ContextWrapper adding a same-named method would change behavior) and restricts
+ bytecode optimizers such as R8. Instead, use View.setOnClickListener.}-->
+ called when the item is clicked.
+ {@deprecated Menu actually traverses the Context hierarchy looking for the
+ relevant method, which is fragile (an intermediate ContextWrapper adding a
+ same-named method would change behavior) and restricts bytecode optimizers
+ such as R8. Instead, use MenuItem.setOnMenuItemClickListener.} -->
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index e0ebec6cbd014..e1a7d7f05ccd1 100644
--- a/non-updatable-api/current.txt
+++ b/non-updatable-api/current.txt
@@ -1005,7 +1005,7 @@ package android {
field public static final int numericModifiers = 16844111; // 0x101054f
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int offset = 16844052; // 0x1010514
- field public static final int onClick = 16843375; // 0x101026f
+ field @Deprecated public static final int onClick = 16843375; // 0x101026f
field public static final int oneshot = 16843159; // 0x1010197
field public static final int opacity = 16843550; // 0x101031e
field public static final int opticalInsetBottom = 16844171; // 0x101058b