summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-05-21 14:53:16 -0700
committerThe Android Automerger <android-build@google.com>2014-05-21 16:44:58 -0700
commit89ea3cd0494a91de72eb566f146da41e5c769cb3 (patch)
tree76f5158e9541b9b3e0d14c565675dae5f3f8cdb8 /core/java
parentd23d0b8ea4c86ee5642c7ec5b838e9f28c5c4c0b (diff)
Fixing bugs due to the new custom accessibility action APIs.
1. AccessibiltiyAction was incorectly throwing an exception when a custom action was constructed. 2. AccessibilityManagerService should no longer enforce only standard actions as we allow custom ones too. bug:15110963 Change-Id: Iea57e0a6449b87bd8d103c55ca255e80705f2565
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/accessibility/AccessibilityNodeInfo.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index d5f0834267f0..66cc3f6b31d5 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -318,11 +318,6 @@ public class AccessibilityNodeInfo implements Parcelable {
*/
private static final int ACTION_TYPE_MASK = 0xFF000000;
- /**
- * Mask to define standard not legacy actions.
- */
- private static final int STANDARD_NON_LEGACY_ACTION_MASK = 0x01000000;
-
// Action arguments
/**
@@ -3262,14 +3257,10 @@ public class AccessibilityNodeInfo implements Parcelable {
* @param label The label for the new AccessibilityAction.
*/
public AccessibilityAction(int actionId, @Nullable CharSequence label) {
- if ((actionId & ACTION_TYPE_MASK) == 0 && Integer.bitCount(actionId) > 1) {
+ if ((actionId & ACTION_TYPE_MASK) == 0 && Integer.bitCount(actionId) != 1) {
throw new IllegalArgumentException("Invalid standard action id");
}
- if ((actionId & STANDARD_NON_LEGACY_ACTION_MASK) != 0) {
- throw new IllegalArgumentException("action id not a resource id");
- }
-
mActionId = actionId;
mLabel = label;
}