Thanks Mark,

  Yes, it is public.  I did give the DEVICE_POWER permission to my app, but 
still get the security exception when I call the goToSleep function.  Somebody 
said it was a level 2 (signature) permission, so ordinary 3rd party apps (ones 
that don't hold the same signature as the API) can't use it.  I assumed that 
was correct, since that's the only explaination I could come up with as to why 
I get the security exception when my simple test app calls that function.  
This is all in the emulator, BTW.

  What I was really looking for was some documentation about which permissions 
are at what level.

Best Regards,

Richard

On Wednesday 16 June 2010 16:52:21 Mark Murphy wrote:
> On Wed, Jun 16, 2010 at 4:39 PM, Al <[email protected]> wrote:
> > Richard C. Cox wrote:
> >> Yeah, goToSleep may be restricted in the API, but it says nothing about
> >> that in the SDK Documentation.
> > 
> > Non-public APIs aren't mentioned in the sdk documentation. They may be
> > documented in the source code but suppressed from javadoc with @hide.
> 
> Actually, goToSleep() is public, just only accessible for applications
> that hold the DEVICE_POWER permission. The need for that permission is
> not documented there, which is simply a documentation bug.

-- 
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

Reply via email to