4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 #include <vconf-keys.h>
27 #include "lockd-debug.h"
28 #include "lockd-process-mgr.h"
30 #define LOCKD_PHONE_LOCK_PKG_NAME "org.tizen.phone-lock"
32 int lockd_process_mgr_start_phone_lock(void)
39 bundle_add(b, "pwlock_type", "running_lock");
40 bundle_add(b, "window_type", "alpha");
42 pid = aul_launch_app(LOCKD_PHONE_LOCK_PKG_NAME, b);
43 LOCKD_DBG("aul_launch_app(%s, b), pid = %d", LOCKD_PHONE_LOCK_PKG_NAME,
51 void lockd_process_mgr_terminate_phone_lock(int phone_lock_pid)
53 LOCKD_DBG("Terminate Phone Lock(pid : %d)", phone_lock_pid);
54 aul_terminate_pid(phone_lock_pid);
57 int lockd_process_mgr_check_lock(int pid)
60 LOCKD_DBG("%s, %d", __func__, __LINE__);
61 if (aul_app_get_pkgname_bypid(pid, buf, sizeof(buf)) < 0) {
62 LOCKD_DBG("no such pkg by pid %d\n", pid);
64 LOCKD_DBG("lock screen pkgname = %s, pid = %d\n", buf, pid);
65 if (aul_app_is_running(buf) == TRUE) {
66 LOCKD_DBG("%s [pid = %d] is running\n", buf, pid);
69 LOCKD_DBG("[pid = %d] is exist but %s is not running\n",