Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e1f4a2d authored by Charles Munger's avatar Charles Munger
Browse files

Mark the onClick view/menu attribute as deprecated.

Bug: 144042891
Change-Id: I62461085e6d507e3b5e725141380dd390c9b8b0b
parent ed539a47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+10 −2
Original line number Diff line number Diff line
@@ -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. -->
+1 −1
Original line number Diff line number Diff line
@@ -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