int hal_device_display_ipc_get_max_brightness(int *brightness)
{
- int ret = 0;
-
if (!brightness)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_brightness(int brightness)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_multi_brightness(int brightness, int step, int delay)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_auto_brightness(float lmax, float lmin, float light, int *brightness)
{
- int ret = 0;
-
if (!brightness)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_state(hal_device_display_state_e state)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_image_effect(hal_device_display_image_effect_e effect)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_panel_mode(hal_device_display_panel_mode_e mode)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_aod_brightness(int *max, int *normal, int *min, int *charging)
{
- int ret = 0;
-
if (!max ||!normal ||!min ||!charging)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_max_frame_rate(int *rate)
{
- int ret = 0;
-
if (!rate)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_min_frame_rate(int *rate)
{
- int ret = 0;
-
if (!rate)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_frame_rate(int *rate)
{
- int ret = 0;
-
if (!rate)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_frame_rate(int rate)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_set_white_balance(hal_device_display_white_balance_e white_balance_type, int value)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_display_ipc_get_white_balance(hal_device_display_white_balance_e white_balance_type, int* value)
{
- int ret = 0;
-
if (!value)
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
hal_device_display_rotation_angle_e angle,
hal_device_display_rotation_direction_e direction)
{
- int ret = 0;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_display_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_led_ipc_get_number(void)
{
- int ret;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_led_ipc_set_number(int number)
{
- int ret;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_led_ipc_get_max_num(void)
{
- int ret;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
return -EINVAL;
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}
int hal_device_keyled_ipc_get_state(int *keycode, int *brightness)
{
- int ret;
-
if (!g_hal_backend_service_connected) {
- if ((ret = hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE)) {
+ if (hal_device_led_ipc_get_backend() != RPC_PORT_ERROR_NONE) {
return -ENOTSUP;
}
}