handle deprecated privilege
authorYoung Ik Cho <youngik.cho@samsung.com>
Fri, 12 Apr 2013 03:17:59 +0000 (12:17 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Fri, 12 Apr 2013 03:17:59 +0000 (12:17 +0900)
Change-Id: Ib716414ef7371574b849eda8273b23ff6456f357
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
inc/FAppAppManager.h
inc/FAppNotificationManager.h
src/app/FAppAppManager.cpp

index 8de4ddc..cd2a229 100755 (executable)
@@ -330,7 +330,8 @@ public:
         *
         * @since       2.0
         * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/application.kill
+        * @privilege   %http://tizen.org/privilege/appmanager.kill @n
+        *                              (%http://tizen.org/privilege/application.kill is deprecated.)
         *
         * @return      An error code
         * @param[in]   appId                           The application's ID to execute
index f6f8370..8249829 100755 (executable)
@@ -383,8 +383,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since       2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -409,8 +410,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since       2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -435,8 +437,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since       2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -465,8 +468,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since               2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return             An error code
         * @param[in]  appId                            The application ID
@@ -494,8 +498,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since                               2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -520,8 +525,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since                               2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -549,8 +555,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since                       2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
@@ -572,8 +579,9 @@ public:
         * @deprecated  This class is deprecated. Instead of using this class, use the Tizen::Shell::NotificationManager class.
         * @since                       2.0
         *
-        * @privlevel   partner
-        * @privilege   %http://tizen.org/privilege/notification
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/notification @n
+        *                              (%http://tizen.org/privilege/notificationmanager is deprecated.)
         *
         * @return              An error code
         * @param[in]   appId                           The application ID
index f578e32..8a253ef 100644 (file)
@@ -222,6 +222,9 @@ AppManager::TerminateApplication(const AppId& appId)
        SysTryReturnResult(NID_APP, appId.GetLength() <= WIDGET_APP_MAX_APPID_LENGTH, E_MAX_EXCEEDED,
                                                  "The length of appid exceeded the limit(%d).", WIDGET_APP_MAX_APPID_LENGTH);
 
+       result r = _AccessController::CheckUserPrivilege(_PRV_APPLICATION_KILL, _PRV_APPMANAGER_KILL);
+       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
        return __pAppManagerImpl->TerminateApplication(appId);
 }