LWN.net Logo

Blocking suspend blockers

Blocking suspend blockers

Posted May 21, 2010 11:03 UTC (Fri) by tialaramex (subscriber, #21167)
In reply to: Blocking suspend blockers by brendan_wright
Parent article: Blocking suspend blockers

My understanding is that in the Android phone world what happens is this:

• User A downloads "cow bouncer" and is impressed that now their phone constantly has bouncing cows. However an hour later their phone bleeps to warn the battery is low. The "low battery" screen shows a "Why so soon?" button or link, which implicates "cow bouncer" as the reason. User A chooses to uninstall the "cow bouncer" app because it's a waste of battery life.

• User B downloads "John the ripper Android edition" and sets it to work cracking password hashes. An hour later the phone bleeps due to exhausted battery. User B plugs it into the wall, he doesn't ask why because hey, he was running a password cracker on his phone, stands to reason it will exhaust the battery.

By obligating ordinary developers to ask for this functionality if they need it and then auditing how it is used, Android make them responsible to their users - if you need to block suspend for long periods, you will need to educate your users about why that is, and persuade them that the app functionality is worth the reduced battery life, otherwise they're going to throw your app away and probably warn off other potential customers.


(Log in to post comments)

Blocking suspend blockers

Posted May 21, 2010 12:57 UTC (Fri) by farnz (guest, #17727) [Link]

Close, but not quite for the HTC Hero running Android 1.5. When you download "cow bouncer" or "JTR Android", you get warned that the application can "Prevent the phone from sleeping", and have to say OK or Cancel to the "install anyway" prompt.

There's no in-built UI for catching bad apps, but there are third party applications in the Market that use the existing API to tell you which applications are using power - they're spotted not because they're CPU hogs, but because they're holding a wakelock preventing the phone from sleeping.

Blocking suspend blockers

Posted May 21, 2010 15:58 UTC (Fri) by Aissen (subscriber, #59976) [Link]

HTC Hero running Android 1.5

Although it was released just over a year ago, Android 1.5 is a pretty old in the Android timeline.
Wonderful things have happened, and three releases later Android 2.2 have been announced officially yesterday.
HTC promised to update the Hero to Android 2.1, and hopefully you'll get it sooner rather than later, and see the UI everyone's talking about in the default OS.

The most important is that susupend blockers are merged so that the future of Android is one where upstream matters, and Android kernel is no longer a fork.

Blocking suspend blockers

Posted May 21, 2010 16:00 UTC (Fri) by farnz (guest, #17727) [Link]

Android 1.5 is the latest version available for my device; I cannot in fairness tell you how Android behaves without qualifying it with the version number, because I can't tell you if it's been improved in later versions.

However, I'd hope that in this respect, Android isn't regressing in new versions. Power management is kinda critical on a phone.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds