namespace {
-const char *errorToString(notification_error_e error) {
- if (error == NOTIFICATION_ERROR_INVALID_DATA)
- return "NOTIFICATION_ERROR_INVALID_DATA";
- if (error == NOTIFICATION_ERROR_NO_MEMORY)
- return "NOTIFICATION_ERROR_NO_MEMORY";
+const char *errorToString(int error) {
+ if (error == NOTIFICATION_ERROR_INVALID_PARAMETER)
+ return "NOTIFICATION_ERROR_INVALID_PARAMETER";
+ if (error == NOTIFICATION_ERROR_OUT_OF_MEMORY)
+ return "NOTIFICATION_ERROR_OUT_OF_MEMORY";
if (error == NOTIFICATION_ERROR_FROM_DB)
return "NOTIFICATION_ERROR_FROM_DB";
if (error == NOTIFICATION_ERROR_ALREADY_EXIST_ID)
return "NOTIFICATION_ERROR_FROM_DBUS";
if (error == NOTIFICATION_ERROR_NOT_EXIST_ID)
return "NOTIFICATION_ERROR_NOT_EXIST_ID";
- if (error == NOTIFICATION_ERROR_IO)
- return "NOTIFICATION_ERROR_IO";
+ if (error == NOTIFICATION_ERROR_IO_ERROR)
+ return "NOTIFICATION_ERROR_IO_ERROR";
if (error == NOTIFICATION_ERROR_SERVICE_NOT_READY)
return "NOTIFICATION_ERROR_SERVICE_NOT_READY";
if (error == NOTIFICATION_ERROR_NONE)
bool AskUINotificationBackend::createUI(const std::string &client, const std::string &user,
const std::string &privilege) {
- notification_error_e err;
+ int err;
m_notification = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE,
NOTIFICATION_PRIV_ID_NONE);
try {
int buttonClicked = 0;
- notification_error_e ret = notification_wait_response(m_notification, m_responseTimeout,
+ int ret = notification_wait_response(m_notification, m_responseTimeout,
&buttonClicked, nullptr);
ALOGD("notification_wait_response finished with ret code: [" << ret << "]");