Change-Id: If32eb2c3c80cefc91d723541b9683066143b83de
Signed-off-by: Mu-Woong <muwoong.lee@samsung.com>
#include <shared_vars.h>
#include "system_info.h"
+#define CONNECTED 1
+#define NOT_CONNECTED 0
+
bool ctx::system_info::get_audio_jack_state(int* state)
{
- int value;
+ int value = NOT_CONNECTED;
int err = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value);
IF_FAIL_RETURN(err == RUNTIME_INFO_ERROR_NONE, false);
- //TODO: convert value to state properly.
- *state = value;
+ *state = (value == NOT_CONNECTED ? NOT_CONNECTED : CONNECTED);
return true;
}