Merge "CEC : Add method for check range" am: aaae72e029
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1413607 Change-Id: I280c1b508c2065eb570f92f1e6d2e799d4f8ac44
This commit is contained in:
@@ -293,6 +293,11 @@ public class HdmiCecMessageValidator {
|
|||||||
return success ? OK : ERROR_PARAMETER;
|
return success ? OK : ERROR_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isWithinRange(int value, int min, int max) {
|
||||||
|
value = value & 0xFF;
|
||||||
|
return (value >= min && value <= max);
|
||||||
|
}
|
||||||
|
|
||||||
private class PhysicalAddressValidator implements ParameterValidator {
|
private class PhysicalAddressValidator implements ParameterValidator {
|
||||||
@Override
|
@Override
|
||||||
public int isValid(byte[] params) {
|
public int isValid(byte[] params) {
|
||||||
|
|||||||
Reference in New Issue
Block a user