Check app permission on X11 environment 55/20955/1 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0_ivi accepted/tizen/common/20140519.224035 accepted/tizen/ivi/20140521.203102 submit/tizen/20140515.021628 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0_ivi_release
authorArron Wang <arron.wang@intel.com>
Wed, 14 May 2014 07:49:25 +0000 (15:49 +0800)
committerArron Wang <arron.wang@intel.com>
Wed, 14 May 2014 07:49:28 +0000 (15:49 +0800)
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

index 860ce58..4d2d3e0 100755 (executable)
--- 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)