From 70bc54fef28d25f23b4552454ce73be45033d0c6 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Thu, 10 Dec 2015 14:32:16 +0900 Subject: [PATCH] do not check pincode when switching user Change-Id: I4df6b695bc94d87ba977150899d3e1c4f9d841f4 Signed-off-by: Soohye Shin --- src/view/view_user.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/view/view_user.c b/src/view/view_user.c index fd9c8c0..77552e2 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -25,6 +25,8 @@ #include "datamgr.h" #include "utils.h" +#define MAX_BUF 128 +#define MESSAGE_TOAST_SWITCH_FAILED "switch failed." #define MESSAGE_POPUP_CONTENT "Can not add users more than 8.
If you want to add another user, delete one of users" enum input_handler_type { @@ -166,6 +168,8 @@ static void _delete_popup(struct _priv *priv) static void _select(struct _priv *priv) { + char buf[MAX_BUF]; + switch (priv->foc->di->action) { case ITEM_SELECT_ACTION_POP: elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); @@ -180,11 +184,12 @@ static void _select(struct _priv *priv) datamgr_select_item(priv->dm, priv->foc->di); break; case ITEM_SELECT_ACTION_SWITCH: - if (datamgr_select_item(priv->dm, priv->foc->di) == - ITEM_SELECT_ERROR_SWITCH) { - viewmgr_update_view(VIEW_PIN, UPDATE_TYPE_SWITCH, - priv->foc->di); - viewmgr_show_view(VIEW_PIN); + if (datamgr_select_item(priv->dm, priv->foc->di) != + ITEM_SELECT_ERROR_NONE) { + snprintf(buf, sizeof(buf), "%s %s", + priv->foc->di->title, + MESSAGE_TOAST_SWITCH_FAILED); + utils_add_toast(priv->win, buf); } break; -- 2.7.4