Merge "Fix getSwitchState according to device capabilities."