power off animation

153 views
Skip to first unread message

Ellen

unread,
Jul 28, 2011, 4:18:10 AM7/28/11
to android-platform
Hi,

I want to play animation when device shutdown, now I tried
"SystemProperties.set("ctl.start","bootanim");" in
beginShutdownSequence.

it worked, but, there was already a power on animation in this
bootanim service. I want a different animation for power off. So, is
there any way to make this service know who is calling it?
Or could I define another service named "shutdownanim", but the real
service is still bootanim for it? it looks like this:
service shutdownanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
Then how could bootanimation_main.c know the value is "bootanim" or
"shutdownanim"?

By the way, from bootanimation_main.c, it called
"property_get("debug.sf.nobootanimation", value, "0");" to decide
whether play the animation, then who has been set this property value
0 or 1?

Dianne Hackborn

unread,
Jul 28, 2011, 3:08:03 PM7/28/11
to android-...@googlegroups.com
Why do you want to do this?  There is no facility in the platform for this.  While shutting down the entire user space UI is running, and it is showing a shutdown dialog.  At the time the userspace goes down, the device is essentially off.

I guess you could replace that shutdown dialog with your own window if that is what you want.


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Ellen

unread,
Jul 28, 2011, 10:14:53 PM7/28/11
to android-platform
yes, exactly! I want to replace the progress dialog with shut down
animation during power off process.
I don't want to make duplicate code, so is there any way to let shut
down process use the bootanim service to play animation?
> hack...@android.com

Dianne Hackborn

unread,
Jul 29, 2011, 3:50:46 AM7/29/11
to android-...@googlegroups.com
No the boot animation is for booting, before the system server and window manager is up.

2011/7/28 Ellen <elle...@hotmail.com>
hac...@android.com

Ellen

unread,
Jul 29, 2011, 4:20:55 AM7/29/11
to android-platform
But it seems only a service which do not care when will called.
Infact, when I tried to start this service in shut down process. It
worked normally, just the same animation as booting.

"before the system server and window manager is up."
this depend when to start this service, right? seems at
"SurfaceFlinger::readyToRun()".

what I was mean that bootanim is a independent service, when it will
be run depends when to call it.
Maybe I was wrong, I just do not understand why we couldn't use it any
time we want?

So, I need copy the bootanimation's code, give a new service name such
as "shutdownanimation" and use it for power off ?

On 7月29日, 下午3时50分, Dianne Hackborn <hack...@android.com> wrote:
> No the boot animation is for booting, before the system server and window
> manager is up.
>
> 2011/7/28 Ellen <ellen...@hotmail.com>
Reply all
Reply to author
Forward
0 new messages