[ACR 1243] Add telephony privilege to use telephony API 82/181282/3 accepted/tizen/unified/20180621.141553 submit/tizen/20180621.132435
authorNilesh Trimbake <t.shripati@samsung.com>
Mon, 11 Jun 2018 09:22:07 +0000 (14:52 +0530)
committerNilesh Trimbake <t.shripati@samsung.com>
Tue, 19 Jun 2018 09:18:02 +0000 (14:48 +0530)
This patch add privilege
http://tizen.org/privilege/telephony,
for content category CAMERA.

Change-Id: Icc468ba7a55e75aec0066a16d183eea0cd8ac220

include/attach_panel.h
src/attach_panel.c

index 1a329a63da01f3d9c593d2bba5bcceb3580782e2..564f272dbb1610695e9a13da345630987105f86f 100644 (file)
@@ -344,6 +344,7 @@ int attach_panel_destroy(attach_panel_h attach_panel);
  * @privilege %http://tizen.org/privilege/camera
  * @privilege %http://tizen.org/privilege/recorder
  * @privilege %http://tizen.org/privilege/appmanager.launch
+ * @privilege %http://tizen.org/privilege/telephony
  * @remarks The caller app has to check the return value of this function.\n
  *          Content categories will be shown as the sequence of using @a attach_panel_add_content_category.\n
  *          Some contents need time to load it all.\n
@@ -353,6 +354,7 @@ int attach_panel_destroy(attach_panel_h attach_panel);
  *          %http://tizen.org/privilege/camera, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA or ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE\n
  *          %http://tizen.org/privilege/recorder, for using ATTACH_PANEL_CONTENT_CATEGORY_VOICE\n
  *          %http://tizen.org/privilege/appmanager.launch, for adding content categories on the More tab\n
+ *          %http://tizen.org/privilege/telephony, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA (Since 5.0)\n
  *          Deliver more information to the callee with a bundle if you need.\n
  *          %http://tizen.org/appcontrol/data/total_count\n
  *          %http://tizen.org/appcontrol/data/total_size
index c1dd903204f3d8a85c58347e98a82e527836a9c8..cf46d0cbd338352d75a903add2507e2ffa7a4a17 100755 (executable)
@@ -499,6 +499,7 @@ OUT:
 static const char *const PRIVILEGE_CAMERA = "http://tizen.org/privilege/camera";
 static const char *const PRIVILEGE_RECORDER = "http://tizen.org/privilege/recorder";
 static const char *const PRIVILEGE_APPMANAGER_LAUNCH = "http://tizen.org/privilege/appmanager.launch";
+static const char *const PRIVILEGE_TELEPHONY = "http://tizen.org/privilege/telephony";
 EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data)
 {
        content_s *content_info = NULL;
@@ -526,6 +527,9 @@ EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, at
 
                ret = __check_privilege(PRIVILEGE_CAMERA);
                retv_if(ret < 0, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
+
+               ret = __check_privilege(PRIVILEGE_TELEPHONY);
+               retv_if(ret < 0, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
                break;
        case ATTACH_PANEL_CONTENT_CATEGORY_VOICE:
                ret = system_info_get_platform_bool(PLATFORM_FEATURE_MICROPHONE, &value);