# Print output for @column tags ?>
public
final
class
TemperatureControlTemplate
extends ControlTemplate
| java.lang.Object | ||
| ↳ | android.service.controls.templates.ControlTemplate | |
| ↳ | android.service.controls.templates.TemperatureControlTemplate | |
A template for a temperature related Control that supports multiple modes.
Both the current mode and the active mode for the control can be specified. The combination of
the Control#getDeviceType and the current and active mode will determine colors and
transitions for the UI element.
Constants | |
|---|---|
int |
FLAG_MODE_COOL
Flag to indicate that the device supports cool mode. |
int |
FLAG_MODE_ECO
Flag to indicate that the device supports eco mode. |
int |
FLAG_MODE_HEAT
Flag to indicate that the device supports heat mode. |
int |
FLAG_MODE_HEAT_COOL
Flag to indicate that the device supports heat-cool mode. |
int |
FLAG_MODE_OFF
Flag to indicate that the device supports off mode. |
int |
MODE_COOL
Indicates that the current or active mode of the device is set to cool. |
int |
MODE_ECO
Indicates that the current or active mode of the device is set to eco. |
int |
MODE_HEAT
Indicates that the current or active mode of the device is set to heat. |
int |
MODE_HEAT_COOL
Indicates that the current or active mode of the device is set to heat-cool. |
int |
MODE_OFF
Indicates that the current or active mode of the device is off. |
int |
MODE_UNKNOWN
Use when the current or active mode of the device is not known
|
Inherited constants |
|---|
Public constructors | |
|---|---|
TemperatureControlTemplate(String templateId, ControlTemplate controlTemplate, int currentMode, int currentActiveMode, int modesFlag)
Construct a new |
|
Public methods | |
|---|---|
int
|
getCurrentActiveMode()
|
int
|
getCurrentMode()
|
int
|
getModes()
|
ControlTemplate
|
getTemplate()
|
int
|
getTemplateType()
The |
Inherited methods | |
|---|---|
public static final int FLAG_MODE_COOL
Flag to indicate that the device supports cool mode.
Constant Value: 8 (0x00000008)
public static final int FLAG_MODE_ECO
Flag to indicate that the device supports eco mode.
Constant Value: 32 (0x00000020)
public static final int FLAG_MODE_HEAT
Flag to indicate that the device supports heat mode.
Constant Value: 4 (0x00000004)
public static final int FLAG_MODE_HEAT_COOL
Flag to indicate that the device supports heat-cool mode.
Constant Value: 16 (0x00000010)
public static final int FLAG_MODE_OFF
Flag to indicate that the device supports off mode.
Constant Value: 2 (0x00000002)
public static final int MODE_COOL
Indicates that the current or active mode of the device is set to cool.
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 3 (0x00000003)
public static final int MODE_ECO
Indicates that the current or active mode of the device is set to eco.
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 5 (0x00000005)
public static final int MODE_HEAT
Indicates that the current or active mode of the device is set to heat.
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 2 (0x00000002)
public static final int MODE_HEAT_COOL
Indicates that the current or active mode of the device is set to heat-cool.
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 4 (0x00000004)
public static final int MODE_OFF
Indicates that the current or active mode of the device is off.
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 1 (0x00000001)
public static final int MODE_UNKNOWN
Use when the current or active mode of the device is not known
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 0 (0x00000000)
public TemperatureControlTemplate (String templateId, ControlTemplate controlTemplate, int currentMode, int currentActiveMode, int modesFlag)
Construct a new TemperatureControlTemplate.
The current and active mode have to be among the ones supported by the flags.
| Parameters | |
|---|---|
templateId |
String: the identifier for this template object
This value cannot be null. |
controlTemplate |
ControlTemplate: a template to use for interaction with the user
This value cannot be null. |
currentMode |
int: the current mode for the Control
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO |
currentActiveMode |
int: the current active mode for the Control
Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO |
modesFlag |
int: a flag representing the available modes for the Control
Value is either 0 or a combination of FLAG_MODE_OFF, FLAG_MODE_HEAT, FLAG_MODE_COOL, FLAG_MODE_HEAT_COOL, and FLAG_MODE_ECO |
| Throws | |
|---|---|
IllegalArgumentException |
if the parameters passed do not make a valid template. |
public int getCurrentActiveMode ()
| Returns | |
|---|---|
int |
|
public int getCurrentMode ()
| Returns | |
|---|---|
int |
|
public int getModes ()
| Returns | |
|---|---|
int |
|
public ControlTemplate getTemplate ()
| Returns | |
|---|---|
ControlTemplate |
This value cannot be null. |
public int getTemplateType ()
The TemplateType associated with this class.
| Returns | |
|---|---|
int |
ControlTemplate#TYPE_TEMPERATURE |