public enum SuspendTimeout extends java.lang.Enum<SuspendTimeout>
SuspendTimeout enumeration defines different available display sleep timeouts.| Enum Constant and Description |
|---|
MINUTES_1
One minute
|
MINUTES_10
Ten minutes
|
MINUTES_15
Fifteen minutes
|
MINUTES_2
Two minutes
|
MINUTES_20
Twenty minutes
|
MINUTES_3
Three minutes
|
MINUTES_30
Thirty minutes
|
MINUTES_4
Four minutes
|
MINUTES_5
Five minutes
|
NEVER
Endless timeout, screen will not turn off
|
SECONDS_15
Fifteen seconds
|
SECONDS_30
Thirty seconds
|
| Modifier and Type | Method and Description |
|---|---|
static SuspendTimeout |
fromSeconds(int seconds)
Converts an amount of seconds to the right SuspendTimeout value, if
available.
|
int |
toSeconds()
Converts the SuspendTimeout to the corresponding number of seconds.
|
static SuspendTimeout |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SuspendTimeout[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SuspendTimeout NEVER
public static final SuspendTimeout SECONDS_15
public static final SuspendTimeout SECONDS_30
public static final SuspendTimeout MINUTES_1
public static final SuspendTimeout MINUTES_2
public static final SuspendTimeout MINUTES_3
public static final SuspendTimeout MINUTES_4
public static final SuspendTimeout MINUTES_5
public static final SuspendTimeout MINUTES_10
public static final SuspendTimeout MINUTES_15
public static final SuspendTimeout MINUTES_20
public static final SuspendTimeout MINUTES_30
public static SuspendTimeout[] values()
for (SuspendTimeout c : SuspendTimeout.values()) System.out.println(c);
public static SuspendTimeout valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int toSeconds()
int a number representing the amount of seconds associated.public static SuspendTimeout fromSeconds(int seconds)
seconds - int the amount of secondsSuspendTimeout the corresponding or the most close SuspendTimeout value. If no
corresponding value is found, NEVER will be chosen.