<manifest>
- <define>
- <domain name="boot-animation"/>
<request>
- <smack request="e17::notification" type="rw"/>
+ <domain name="_"/>
</request>
- <permit>
- <smack permit="pulseaudio" type="rx"/>
- </permit>
- </define>
- <assign>
- <filesystem path="/usr/bin/boot-animation" label="_" exec_label="none" />
- </assign>
</manifest>
[Unit]
Description=Boot Animation
-After=wm_ready.service sound-server.service pulseaudio.service sound-init.service system-server.service
+After=sound-server.service pulseaudio.service sound-init.service system-server.service
Before=tizen-system.target
ConditionPathExists=!/tmp/restart
ConditionKernelCommandLine=|!bootmode=silent
mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
install -m 0644 %SOURCE1 %{buildroot}/usr/lib/systemd/system/boot-animation.service
-ln -s ../boot-animation.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/
install -m 0644 %SOURCE2 %{buildroot}/usr/lib/systemd/system/shutdown-animation.service
install -m 0644 %SOURCE3 %{buildroot}/usr/lib/systemd/system/silent-animation.service
ln -s ../silent-animation.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/
/usr/share/license/%{name}
%{_bindir}/boot-animation
/usr/lib/systemd/system/boot-animation.service
-/usr/lib/systemd/system/multi-user.target.wants/boot-animation.service
/usr/lib/systemd/system/shutdown-animation.service
/usr/lib/systemd/system/silent-animation.service
/usr/lib/systemd/system/multi-user.target.wants/silent-animation.service
static int check_window_validity(void)
{
_D("Check window validity");
+ printf("Check window validity\n");
DIR *dp;
struct dirent *dentry;
int ret = -1;
dp = opendir(CHECK_LCD);
- _D("Check window validity");
if (!dp) {
_E("Failed to get lcd node");
+ printf("Failed to get lcd node\n");
return -1;
}
while ((dentry = readdir(dp)) != NULL) {
- _D("Check window validity");
if ((!strcmp(dentry->d_name, ".")) || (!strcmp(dentry->d_name, ".."))) {
continue;
}
else {
- _D("Check window validity");
ret = 0;
break;
}
}
- _D("Check window validity");
closedir(dp);
return ret;
}
static int create_window(void)
{
_D("Create Window");
+ printf("Create Window\n");
int x, y = 0;
- s_animation.win = elm_win_add(NULL, "", ELM_WIN_NOTIFICATION);
+ s_animation.win = elm_win_add(NULL, "BOOT_ANIMATION", ELM_WIN_NOTIFICATION);
+ elm_win_role_set(s_animation.win, "alert");
if (!s_animation.win) {
_E("Failed to create a new window");
+ printf("Failed to create a new window\n");
return EXIT_FAILURE;
}
if (s_animation.state == TYPE_OFF || s_animation.state == TYPE_OFF_WITH_MSG) {
int init_animation(int state, const char *msg)
{
_D("Init animation");
+ printf("Init animation\n");
Ecore_Timer *timer = NULL;
//if (check_window_validity()) {
// _E("Failed to access LCD");
+ // printf("Failed to access LCD\n");
// return EXIT_FAILURE;
//}
if (create_window() == EXIT_FAILURE) {
_E("Failed to create a new window");
+ printf("Failed to create a new window\n");
return EXIT_FAILURE;
}
{
fini_layout();
evas_object_del(s_animation.win);
+ fflush(stdout);
+ close(1);
return EXIT_SUCCESS;
}
int argc;
char **argv;
int type = TYPE_UNKNOWN;
+ int clear_type = TYPE_UNKNOWN;
int soundon = 1; /* default sound on */
struct args *args = user_data;
char wav_path[256];
static int invoked_flag = 0;
_D("xready_cb");
+ printf("xready_cb\n");
if (invoked_flag == 1) {
_E("Already launched");
+ printf("Error Already launched\n");
return EXIT_FAILURE;
}
argc = args->argc;
argv = args->argv;
+ int i;
+ for (i = 0; i < argc; i++) {
+ _D("argc %d [%s]", i, argv[i]);
+ printf("argc %d [%s]\n", i, argv[i]);
+ }
while ((c = getopt_long(argc, argv, "spom:c", long_options, NULL)) >= 0) {
switch (c) {
if (!args->msg)
perror("strdup");
continue;
+ case 'c':
+ clear_type = TYPE_CLEAR;
+ continue;
default:
type = TYPE_UNKNOWN;
_D("[Boot-ani] unknown arg [%s]", optarg);
+ printf("[Boot-anim] unknown arg [%s]\n", optarg);
return EXIT_FAILURE;
}
}
/* check sound profile */
if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) < 0) {
_D("VCONFKEY_SETAPPL_SOUND_STATUS_BOOL ==> FAIL!!");
+ printf("VCONFKEY_SETAPPL_SOUND_STATUS_BOOL ==> FAIL!!\n");
}
_D("Sound status: %d", soundon);
+ printf("Sound status: %d\n", soundon);
if (init_animation(type, args->msg) != EXIT_SUCCESS) {
_D("Exit boot-animation");
+ printf("Exit boot-animation\n");
return EXIT_FAILURE;
}
if (soundon) {
+ _D("Sound on!!");
+ printf("Sound on!!\n");
if (!get_wav_file(type, wav_path)) {
+ _D("File path: %s", wav_path);
+ printf("File path: %s\n", wav_path);
mm_sound_boot_ready(3);
mm_sound_boot_play_sound(wav_path);
}
//int elm_main(int argc, char *argv[])
int main(int argc, char *argv[])
{
+ int fd = 0;
struct args args;
setenv("HOME", "/home/root", 1);
_boot_ani_ui_set_scale();
#endif
+ close(1);
+ fd = open("/tmp/myfile.txt", O_CREAT|O_RDWR, S_IRWXU|S_IRWXO);
+ _D("result of open: %d", fd);
+ printf("[%s/%s/%d] fd == %d\n", __FILE__, __func__, __LINE__, fd);
+
elm_init(argc, argv);
if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 0) != 0) {
_D("Failed to set finished value to 0\n");
+ printf("[%s/%s/%d] Failed to set finished value to 0\n", __FILE__, __func__, __LINE__);
}
if (xready_cb(NULL, &args) != EXIT_SUCCESS) {
vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1);