From 97257ca5d438a8cc92aab39e70041920fd3e4d2f Mon Sep 17 00:00:00 2001 From: Arron Wang Date: Wed, 14 May 2014 15:49:25 +0800 Subject: [PATCH] Check app permission on X11 environment Due to we only can get focus_app_pid at X11 environment through ecore API, in other environment like wayland, we just return true, else it may lead the API failed to work Change-Id: I516eef6cb24601b092cc84cdb23b52dceec14d8c --- src/nfc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nfc.c b/src/nfc.c index 860ce58..4d2d3e0 100755 --- a/src/nfc.c +++ b/src/nfc.c @@ -119,10 +119,14 @@ static bool _check_app_permission() LOGD("[check app permission] focus_app_pid [%d], current_app_pid [%d]", focus_app_pid, current_app_pid); +#ifdef HAVE_X11 if (-1 == current_app_pid) return false; else return (focus_app_pid == current_app_pid) ? true : false; +#endif + + return true; } static int _return_invalid_param(const char *func) -- 2.7.4