Merge "Fix capability/property checking methods to handle multi-bit capabilities."

This commit is contained in:
Tyler Gunn
2016-01-04 16:33:37 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 3 deletions

View File

@ -269,7 +269,7 @@ public final class Call {
* @return Whether the specified capability is supported.
*/
public static boolean can(int capabilities, int capability) {
return (capabilities & capability) != 0;
return (capabilities & capability) == capability;
}
/**
@ -351,7 +351,7 @@ public final class Call {
* @return Whether the specified property is supported.
*/
public static boolean hasProperty(int properties, int property) {
return (properties & property) != 0;
return (properties & property) == property;
}
/**