2 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * This file is part of <starter>
5 * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
7 * PROPRIETARY/CONFIDENTIAL
9 * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
10 * You shall not disclose such Confidential Information and shall use it only in accordance
11 * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
12 * SAMSUNG make no representations or warranties about the suitability of the software,
13 * either express or implied, including but not limited to the implied warranties of merchantability,
14 * fitness for a particular purpose, or non-infringement.
15 * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
16 * modifying or distributing this software or its derivatives.
21 #include <vconf-keys.h>
25 #include "lockd-debug.h"
26 #include "lockd-process-mgr.h"
28 #define LOCKD_PHONE_LOCK_PKG_NAME "org.tizen.phone-lock"
30 int lockd_process_mgr_start_phone_lock(void)
37 bundle_add(b, "pwlock_type", "running_lock");
38 bundle_add(b, "window_type", "alpha");
40 pid = aul_launch_app(LOCKD_PHONE_LOCK_PKG_NAME, b);
41 LOCKD_DBG("aul_launch_app(%s, b), pid = %d", LOCKD_PHONE_LOCK_PKG_NAME,
49 void lockd_process_mgr_terminate_phone_lock(int phone_lock_pid)
51 LOCKD_DBG("Terminate Phone Lock(pid : %d)", phone_lock_pid);
52 aul_terminate_pid(phone_lock_pid);
55 int lockd_process_mgr_check_lock(int pid)
58 LOCKD_DBG("%s, %d", __func__, __LINE__);
59 if (aul_app_get_pkgname_bypid(pid, buf, sizeof(buf)) < 0) {
60 LOCKD_DBG("no such pkg by pid %d\n", pid);
62 LOCKD_DBG("lock screen pkgname = %s, pid = %d\n", buf, pid);
63 if (aul_app_is_running(buf) == TRUE) {
64 LOCKD_DBG("%s [pid = %d] is running\n", buf, pid);
67 LOCKD_DBG("[pid = %d] is exist but %s is not running\n",