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

Commit 911dd88c authored by Priyank Singh's avatar Priyank Singh
Browse files

Add attr allowClickWhenDisabled for the new API View#setAllowClickWhenDisabled

Fix: 152628656
Test: Manual
Change-Id: I10d149b618dfc0f06d5e395e8d053dce2f5df452
parent f0d53133
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ package android {
    field public static final int allowAudioPlaybackCapture = 16844289; // 0x1010601
    field public static final int allowBackup = 16843392; // 0x1010280
    field public static final int allowClearUserData = 16842757; // 0x1010005
    field public static final int allowClickWhenDisabled = 16844325; // 0x1010625
    field public static final int allowEmbedded = 16843765; // 0x10103f5
    field public static final int allowNativeHeapPointerTagging = 16844307; // 0x1010613
    field public static final int allowParallelSyncs = 16843570; // 0x1010332
+6 −0
Original line number Diff line number Diff line
@@ -728,6 +728,7 @@ import java.util.function.Predicate;
 * </p>
 *
 * @attr ref android.R.styleable#View_accessibilityHeading
 * @attr ref android.R.styleable#View_allowClickWhenDisabled
 * @attr ref android.R.styleable#View_alpha
 * @attr ref android.R.styleable#View_background
 * @attr ref android.R.styleable#View_clickable
@@ -5586,6 +5587,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        viewFlagMasks |= CLICKABLE;
                    }
                    break;
                case com.android.internal.R.styleable.View_allowClickWhenDisabled:
                    setAllowClickWhenDisabled(a.getBoolean(attr, false));
                    break;
                case com.android.internal.R.styleable.View_longClickable:
                    if (a.getBoolean(attr, false)) {
                        viewFlagValues |= LONG_CLICKABLE;
@@ -12140,6 +12144,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * Enables or disables click events for this view when disabled.
     *
     * @param clickableWhenDisabled true to make the view clickable, false otherwise
     *
     * @attr ref android.R.styleable#View_allowClickWhenDisabled
     */
    public void setAllowClickWhenDisabled(boolean clickableWhenDisabled) {
        if (clickableWhenDisabled) {
+3 −0
Original line number Diff line number Diff line
@@ -3182,6 +3182,9 @@
        <!-- Whether or not this view is a heading for accessibility purposes. -->
        <attr name="accessibilityHeading" format="boolean"/>

        <!-- Whether or not allow clicks on disabled view. -->
        <attr name="allowClickWhenDisabled" format="boolean"/>

        <!-- Sets the color of the spot shadow that is drawn when the view has a positive Z or
             elevation value.
             <p>
+22 −0
Original line number Diff line number Diff line
@@ -3075,6 +3075,28 @@
      <!-- @hide -->
      <public name="config_customSessionPolicyProvider" />
    </public-group>

  <!-- ===============================================================
     Resources added in version S of the platform

     NOTE: add <public> elements within a <public-group> like so:

     <public-group type="attr" first-id="0x01010531">
         <public name="exampleAttr1" />
         <public name="exampleAttr2" />
     </public-group>

     To add a new public-group block, choose an id value that is 1 greater
     than the last of that item above. For example, the last "attr" id
     value above is 0x01010530, so the public-group of attrs below has
     the id value of 0x01010531.
     =============================================================== -->
  <eat-comment />

  <public-group type="attr" first-id="0x01010625">
    <public name="allowClickWhenDisabled" />
  </public-group>

  <!-- ===============================================================
       DO NOT ADD UN-GROUPED ITEMS HERE