Merge "Fix getSwitchState and others to check bitmasks. Bug: 5149443"