Not using a WakeLock so why does the device stay awake?

by westmeadboy » Tue, 13 Apr 2010 19:56:17 GMT

Sponsored Links
 Hmmm, so in that case, why does the device not sleep after the user
has used the power button to turn off the screen? Or do you mean that
the activity is still considered in the foreground even after that?


Not using a WakeLock so why does the device stay awake?

by westmeadboy » Wed, 14 Apr 2010 15:19:10 GMT

 So I tried this:

Start service
Press Home
Start some other 3rd party app (so that activity is in the foreground)
Press power button to blank screen

A few minutes later, I press the power button to unblank the screen
and discover the service finished successfully.

This means the phone never went to sleep...

Any ideas why?


Sponsored Links

Not using a WakeLock so why does the device stay awake?

by THill » Fri, 23 Apr 2010 01:52:44 GMT

 I've seen similar behavior as the OP.

I have a simple activity that starts a timer in onCreate, logging a
message every second.  No wake lock is requested, so after the time
indicated in setting, the device sleeps (allowed to dim, then sleep
naturally, not with power button press).  After letting it sit like
that for a few minutes, I plug it in via USB & check the logs, where I
can see the timer continued running through the sleep.

If I then do 'adb shell dumpsys power', the only wake locks shown are:
  SCREEN_DIM_WAKE_LOCK           'StayOnWhilePluggedIn Screen Dim'
activated (minState=1)
  PARTIAL_WAKE_LOCK              'StayOnWhilePluggedIn Partial'
activated (minState=0)

which makes sense since the device is now plugged in via USB.

Is this expected behavior?  Seems to go against the idea that all
threads are suspended during the sleep...

Thanks for any clarification,


Other Threads

1. This bug is costing us money every month


I'd like to refer to the issue 2379 :

I know that I may be in infringement of the discussion group guideline
but this is a kind of "SOS" message.
This bug is actually costing money every month to all of us going
aboard very often (or just occasionnaly).
As of me, in my company, we have G2's as professional phones, and we
ALL get that charges every month (most of us don't live in the country
we are working in).

This bug has a "new" status since april, and we can't imagine it not
being fixed for the next 6 month as our phone provider wont refund us

We may try to correct it ourself, but we are very confident with the
lower level stack of android source code and we just don't really have
the time to do it.

Thanks for reading, and I feel sorry about this message, as I know
that this kind of message isn't percived very well but please
understand our situation.


2. Correct Way to handle Dialogs and Screen Orientation

Hi all,

I'm experiencing MAJOR problems in handling screen orientation when
there is a Dialog onscreen.
It seems there is no correct way (as far as my understanding goes) to
properly manage an onscreen Dialog (expecially a Progress Dialog
running)  when the user changes screen orientation (possibily 2 or
more times).

What it the recommended implementation of a manager AlertDialog?
The documentation I found is very brief about it.
Thanks a Lot


3. porting to arm

4. How to customize ExpandableList

5. android.process.acore has stopped unexpectedly

6. Questions about dexopt entry points

7. Relative Layout Limitation