diff options
| author | Matt Pietal <mpietal@google.com> | 2020-03-05 14:51:13 -0500 |
|---|---|---|
| committer | Matt Pietal <mpietal@google.com> | 2020-03-05 15:03:08 -0500 |
| commit | cd47696a5945f5a0b3d36ac4c2e03d5f3b635fcf (patch) | |
| tree | b58c0ed2a65ce7e5d0498f0a456f75fb8051d029 /core/java | |
| parent | 2f24aa6d89b331002321a039febd0d92ebebc002 (diff) | |
Controls API - Add support for routines
Apps can support the idea of a routine. Routines tie together multiple
actions across multiple controls to support everyday tasks that would
otherwise require multiple clicks.
Bug: 150869263
Test: atest ControlProviderTest
Change-Id: I3ee2c87c6130420032ebe407b2ffc1e3e8c1504f
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/service/controls/DeviceTypes.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/service/controls/DeviceTypes.java b/core/java/android/service/controls/DeviceTypes.java index 6594d2cf4ba2..ac3b36c72a25 100644 --- a/core/java/android/service/controls/DeviceTypes.java +++ b/core/java/android/service/controls/DeviceTypes.java @@ -27,7 +27,7 @@ import java.lang.annotation.RetentionPolicy; public class DeviceTypes { // Update this when adding new concrete types. Does not count TYPE_UNKNOWN - private static final int NUM_CONCRETE_TYPES = 51; + private static final int NUM_CONCRETE_TYPES = 52; public static final @DeviceType int TYPE_UNKNOWN = 0; public static final @DeviceType int TYPE_AC_HEATER = 1; @@ -87,6 +87,11 @@ public class DeviceTypes { public static final @DeviceType int TYPE_CAMERA = 50; public static final @DeviceType int TYPE_DOORBELL = 51; + /* + * Also known as macros, routines can aggregate a series of actions across multiple devices + */ + public static final @DeviceType int TYPE_ROUTINE = 52; + // Update this when adding new generic types. private static final int NUM_GENERIC_TYPES = 7; public static final @DeviceType int TYPE_GENERIC_ON_OFF = -1; @@ -165,7 +170,8 @@ public class DeviceTypes { TYPE_REFRIGERATOR, TYPE_THERMOSTAT, TYPE_CAMERA, - TYPE_DOORBELL + TYPE_DOORBELL, + TYPE_ROUTINE }) public @interface DeviceType {} |
