return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (device < CAMERA_DEVICE_CAMERA0 || device > CAMERA_DEVICE_CAMERA1) {
+ if (device > CAMERA_DEVICE_CAMERA1) {
LOGE("invalid device %d", device);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (rotation < CAMERA_ROTATION_NONE || rotation > CAMERA_ROTATION_270) {
+ if (rotation > CAMERA_ROTATION_270) {
LOGE("invalid rotation %d", rotation);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (flip < CAMERA_FLIP_NONE || flip > CAMERA_FLIP_BOTH) {
+ if (flip > CAMERA_FLIP_BOTH) {
LOGE("invalid flip %d", flip);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_DISPLAY_MODE_LETTER_BOX || mode > CAMERA_DISPLAY_MODE_CUSTOM_ROI) {
+ if (mode > CAMERA_DISPLAY_MODE_CUSTOM_ROI) {
LOGE("invalid mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_THEATER_MODE_DISABLE || mode > CAMERA_ATTR_THEATER_MODE_ENABLE) {
+ if (mode > CAMERA_ATTR_THEATER_MODE_ENABLE) {
LOGE("invalid theater mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (fps < CAMERA_ATTR_FPS_AUTO || fps > CAMERA_ATTR_FPS_120) {
+ if (fps > CAMERA_ATTR_FPS_120) {
LOGE("invalid preview fps %d", fps);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_AF_NONE || mode > CAMERA_ATTR_AF_FULL) {
+ if (mode > CAMERA_ATTR_AF_FULL) {
LOGE("invalid mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_EXPOSURE_MODE_OFF || mode > CAMERA_ATTR_EXPOSURE_MODE_CUSTOM) {
+ if (mode > CAMERA_ATTR_EXPOSURE_MODE_CUSTOM) {
LOGE("invalid exposure mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (iso < CAMERA_ATTR_ISO_AUTO || iso > CAMERA_ATTR_ISO_3200) {
+ if (iso > CAMERA_ATTR_ISO_3200) {
LOGE("invalid iso %d", iso);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (wb < CAMERA_ATTR_WHITE_BALANCE_NONE || wb > CAMERA_ATTR_WHITE_BALANCE_CUSTOM) {
+ if (wb > CAMERA_ATTR_WHITE_BALANCE_CUSTOM) {
LOGE("invalid white balance %d", wb);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (effect < CAMERA_ATTR_EFFECT_NONE || effect > CAMERA_ATTR_EFFECT_OTHER_GRAPHICS) {
+ if (effect > CAMERA_ATTR_EFFECT_OTHER_GRAPHICS) {
LOGE("invalid effect %d", effect);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_SCENE_MODE_NORMAL || mode > CAMERA_ATTR_SCENE_MODE_AQUA) {
+ if (mode > CAMERA_ATTR_SCENE_MODE_AQUA) {
LOGE("invalid scene mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_FLASH_MODE_OFF || mode > CAMERA_ATTR_FLASH_MODE_PERMANENT) {
+ if (mode > CAMERA_ATTR_FLASH_MODE_PERMANENT) {
LOGE("invalid flash mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (rotation < CAMERA_ROTATION_NONE || rotation > CAMERA_ROTATION_270) {
+ if (rotation > CAMERA_ROTATION_270) {
LOGE("invalid stream rotation %d", rotation);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (flip < CAMERA_FLIP_NONE || flip > CAMERA_FLIP_BOTH) {
+ if (flip > CAMERA_FLIP_BOTH) {
LOGE("invalid stream flip %d", flip);
return CAMERA_ERROR_INVALID_PARAMETER;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (mode < CAMERA_ATTR_HDR_MODE_DISABLE || mode > CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL) {
+ if (mode > CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL) {
LOGE("invalid HDR mode %d", mode);
return CAMERA_ERROR_INVALID_PARAMETER;
}