Enum Class WakeLockErrorCode
- All Implemented Interfaces:
Serializable,Comparable<WakeLockErrorCode>,Constable
Reason a
WakeLock.request(onError) call failed.- Since:
- 25.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe browser refused the request — usually because the tab is currently hidden, the feature policy blocks wake lock in this frame, or the user's operating-system power-management settings prevent it.The browser rejected the request for a reason that does not match a more specific code, or the executeJs round-trip itself failed.The Screen Wake Lock API is unusable in this context — the browser does not implement it, or the page is served over an insecure connection. -
Method Summary
Modifier and TypeMethodDescriptionstatic WakeLockErrorCodeReturns the enum constant of this class with the specified name.static WakeLockErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSUPPORTED
The Screen Wake Lock API is unusable in this context — the browser does not implement it, or the page is served over an insecure connection. Matches theWakeLockAvailability.UNSUPPORTEDsignal value and is delivered without a server-to-client round-trip when the bootstrap probe already established unavailability. -
NOT_ALLOWED
The browser refused the request — usually because the tab is currently hidden, the feature policy blocks wake lock in this frame, or the user's operating-system power-management settings prevent it. Corresponds to aNotAllowedErrorDOMException fromnavigator.wakeLock.request('screen'). -
UNKNOWN
The browser rejected the request for a reason that does not match a more specific code, or the executeJs round-trip itself failed. TheWakeLockError.message()carries the underlying message for diagnostics.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-