On Sat, Aug 7, 2010 at 9:28 AM, Ted Ts'o <tytso@mit.edu> wrote:Exactly the same happens on Android. Install one bad application, a request for PM permissions is made, you click Yes. There's no difference at all. No. You are assuming that PM permissions will be magically set appropriately; that's not the case. 1) Install a bad application that requests PM permissions and is granted those In this case you've gained nothing with user-space suspend blockers. 2) Install a good application that is not requesting PM permissions (or is denied them) Imagine this application requires expensive initialization, but afterwards it only needs to send a small packet each minute to a server. If this application forgets to request PM permission (or is denied them), then it might miss the 1 minute mark, and would have to re-initialize when a trusted app starts some work. In this case suspend blockers cause more battery drain (and the application to behave poorly). There's only one case when suspend blockers might actually help: a) The application is badly written (most probably a UI app drawing when it shouldn't, which incidentally is not a problem in Android since it's not multi-tasking) b) The application is either not requesting, or denied PM permissions c) The application is not affected too badly if it's not running all the time (piggy-backing on trusted apps is ok) For that it's much better to have a different strategy: all applications are trusted, bad applications must be manually tagged. Also, instead of having each and every user figure out which are the bad apps, such information is more pertinent in the app store, where users could vote when an app is bad PM-use or not; crowd-sourcing the problem. But guess what; once you have an app store system that can detect when an application is badly written, why would you expose the users to such bad apps? In Maemo, 3rd party applications have to go trough a community review (maemo.org extras testing) before they go into the main repository, and this way bad applications (functionality or PM-wise) don't make it to the general public. Also, on mobile phones in general there are 3 kinds of applications. 1) desktop widgets: by far the ones with the most danger of drawing the battery 2) foreground UI apps: also have some danger, but only on multi-tasking systems (not Android) 3) background services: usually don't do unnecessary work Suspend blockers are mostly useful for 1), but desktop widgets are platform-specific, so they are written for embedded anyway, and if you are writing for embedded, there's no point in relying on suspend-blockers; just write it PM optimized. -- Felipe Contreras --
