summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt2
-rw-r--r--core/res/res/values/attrs.xml12
-rw-r--r--non-updatable-api/current.txt2
3 files changed, 12 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt
index c6af6beca60b..5b1ff91f0ac2 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 2b511706d024..20ef017f59f8 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
<code>android:onClick="sayHello"</code>, you must declare a
<code>public void sayHello(View v)</code> 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.}-->
<attr name="onClick" format="string" />
<!-- Defines over-scrolling behavior. This property is used only if the
@@ -7505,7 +7509,11 @@
<attr name="enabled" />
<!-- Name of a method on the Context used to inflate the menu that will be
- called when the item is clicked. -->
+ 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.} -->
<attr name="onClick" />
<!-- How this item should display in the Action Bar, if present. -->
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index e0ebec6cbd01..e1a7d7f05ccd 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