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

Commit 7a8e6e59 authored by Kristian Monsen's avatar Kristian Monsen Committed by Android (Google) Code Review
Browse files

Merge "Consider addAction(int action) to possibly be a bit mask"

parents 656c7b32 8d5f3fa6
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -995,13 +995,12 @@ public class AccessibilityNodeInfo implements Parcelable {
    public void addAction(int action) {
        enforceNotSealed();

        AccessibilityAction newAction = getActionSingleton(action);
        if (newAction == null) {
            // This means it is not one of the standard actions
            throw new IllegalArgumentException("Argument is not one of the standard actions");
        if ((action & ACTION_TYPE_MASK) != 0) {
            throw new IllegalArgumentException("Action is not a combination of the standard " +
                    "actions: " + action);
        }

        addAction(newAction);
        addLegacyStandardActions(action);
    }

    /**