Dears, Recently, I have tried to use the methods defined in the class,"android.os.PowerManager". I can't know very well about what the method,"goToSleep" means. I got the related source code, and studied it. I found the method only has the system turn the screen off, I don't know why turning the screen off could make the system go to sleep.
I find another topic about this method, the link is as follow, 1.http://groups.google.com/group/android-developers/ browse_thread/thread/94312b8093042beb/eaa3fa471072f0e6? lnk=gst&q=goToSleep#eaa3fa471072f0e6 In this list, we could know we can't use this method in the application regardless of using DEVICE_POWER permission. So, when could we use this method? BTW,the description of this method in framework reference document is here #public void goToSleep (long time)# Force the device to go to sleep. Overrides all the wake locks that are held. (Does the device mean the whole system?) Parameters time is used to order this correctly with the wake lock calls. The time should be in the SystemClock.uptimeMillis() time base. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---