Skip to content

Commit

Permalink
Update bad method
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Oct 11, 2018
1 parent 300ba7a commit 1592a8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public static String getValue(AccessibilityRole role) {

public static AccessibilityRole fromValue(@Nullable String value) {
for (AccessibilityRole role : AccessibilityRole.values()) {
if (role.getValue() != null && role.getValue().equals(value)) {
if (role.name().equalsIgnoreCase(value)) {
return role;
}
}
return AccessibilityRole.NONE;
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
}
}

Expand Down

0 comments on commit 1592a8d

Please sign in to comment.