public class PowerStatePermission
extends java.security.BasicPermission
PowerManager.setPowerState
method. If the name is "set", calls to
setPowerState(..., false)
are allowed. In order to grant any
call to setPowerState
method, including
setPowerState(..., true)
, the permission "setUrgent" is required.
Implementations are recommended to grant it only to system applications.
Possible names: "set", "setUrgent".Constructor and Description |
---|
PowerStatePermission(java.lang.String name)
Creates a new PowerStatePermission object.
|
public PowerStatePermission(java.lang.String name)
name
- Permission name. Must be "set" or "setUrgent".java.lang.NullPointerException
- if name is nulljava.lang.IllegalArgumentException
- if name is not validCopyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.