On Sun, Jun 6, 2010 at 5:33 PM, Mark Murphy <[email protected]> wrote:
> Rob Y. wrote: > > I don't doubt that there's some cost to running an app that keeps > > drawing to a widget window. But it shouldn't be any worse than > > running a live wallpaper, should it? > There can only be one live wallpaper at a time, AFAIK. There can be many > app widgets at a time. A technique that works well for one may not work > well for a dozen. > Yep. And the whole management of the wallpaper is different -- it is directly managed by the window manager, which knows exactly when it is visible and not, and very carefully tells the wallpaper whenever it is not visible to keep it from wasting the battery. Widgets are much higher-level -- they don't even exist in their own window. In theory a widget host like Launcher could tell the system when any widgets that have been added to it are not visible, for that information to be propagated to the widget. However, this is a lot more complicated -- there can be multiple hosts, and the widget will need to correctly handle multiple instances potentially in multiple hosts. So there is a very good chance of a bug in many different places causing things to run when they shouldn't. Also, a bug in the host here would actually cause the battery use to be incorrectly attributed to the widget, and it would be very difficult to fix that. -- Dianne Hackborn Android framework engineer [email protected] 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. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

