--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+int _direct_launch_init(void);
+void _direct_launch_fini(void);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <aul_key.h>
+#include <aul_svc.h>
+#include <bundle_internal.h>
+
+#include "amd_appinfo.h"
+#include "amd_app_property.h"
+#include "amd_direct_launch.h"
+#include "amd_noti.h"
+#include "amd_util.h"
+
+#define KEY_DIRECT_LAUNCH "http://tizen.org/metadata/direct-launch"
+
+static int __on_check_direct_launch(const char *msg, int arg1, int arg2,
+ void *arg3, bundle *b)
+{
+ const struct appinfo *ai = (const struct appinfo *)arg3;
+ uid_t target_uid = (uid_t)arg2;
+ app_property_h app_property;
+ const char *appid;
+ const char *loader_id;
+
+ loader_id = bundle_get_val(b, AUL_K_LOADER_ID);
+ if (loader_id)
+ return NOTI_CONTINUE;
+
+ appid = _appinfo_get_value(ai, AIT_NAME);
+ app_property = _app_property_find(target_uid);
+ if (_app_property_metadata_match(app_property, appid,
+ KEY_DIRECT_LAUNCH, "yes"))
+ aul_svc_set_loader_id(b, PAD_LOADER_ID_DIRECT);
+
+ return NOTI_CONTINUE;
+}
+
+int _direct_launch_init(void)
+{
+ int r;
+
+ _D("direct launch init");
+ r = _app_property_metadata_add_filter(KEY_DIRECT_LAUNCH, "yes");
+ if (r < 0) {
+ _E("Failed to add metadata filter");
+ return -1;
+ }
+
+ _noti_listen(AMD_NOTI_MSG_LAUNCH_PREPARE_END,
+ __on_check_direct_launch);
+ return 0;
+}
+
+void _direct_launch_fini(void)
+{
+ _D("direct launch fini");
+ _app_property_metadata_remove_filter(KEY_DIRECT_LAUNCH, "yes");
+}
+
+